Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.cognitoidentity.model;
 
 
Container for the parameters to the CreateIdentityPool operation.

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. You must use AWS Developer credentials to call this API.

 
 public class CreateIdentityPoolRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
A string that you provide.

Constraints:
Length: 1 - 128
Pattern: [\w ]+

 
     private String identityPoolName;

    
TRUE if the identity pool supports unauthenticated logins.
 
     private Boolean allowUnauthenticatedIdentities;

    
Optional key:value pairs mapping provider names to provider app IDs.

Constraints:
Length: 0 - 10

 
     private java.util.Map<String,StringsupportedLoginProviders;

    
The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

Constraints:
Length: 1 - 128
Pattern: [\w._-]+

 
     private String developerProviderName;

    
A list of OpendID Connect provider ARNs.
 
A string that you provide.

Constraints:
Length: 1 - 128
Pattern: [\w ]+

Returns:
A string that you provide.
 
     public String getIdentityPoolName() {
         return ;
     }
    
    
A string that you provide.

Constraints:
Length: 1 - 128
Pattern: [\w ]+

Parameters:
identityPoolName A string that you provide.
 
     public void setIdentityPoolName(String identityPoolName) {
         this. = identityPoolName;
    }
    
    
A string that you provide.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [\w ]+

Parameters:
identityPoolName A string that you provide.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withIdentityPoolName(String identityPoolName) {
        this. = identityPoolName;
        return this;
    }

    
TRUE if the identity pool supports unauthenticated logins.

Returns:
TRUE if the identity pool supports unauthenticated logins.
        return ;
    }
    
    
TRUE if the identity pool supports unauthenticated logins.

Parameters:
allowUnauthenticatedIdentities TRUE if the identity pool supports unauthenticated logins.
    public void setAllowUnauthenticatedIdentities(Boolean allowUnauthenticatedIdentities) {
        this. = allowUnauthenticatedIdentities;
    }
    
    
TRUE if the identity pool supports unauthenticated logins.

Returns a reference to this object so that method calls can be chained together.

Parameters:
allowUnauthenticatedIdentities TRUE if the identity pool supports unauthenticated logins.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withAllowUnauthenticatedIdentities(Boolean allowUnauthenticatedIdentities) {
        this. = allowUnauthenticatedIdentities;
        return this;
    }

    
TRUE if the identity pool supports unauthenticated logins.

Returns:
TRUE if the identity pool supports unauthenticated logins.
        return ;
    }

    
Optional key:value pairs mapping provider names to provider app IDs.

Constraints:
Length: 0 - 10

Returns:
Optional key:value pairs mapping provider names to provider app IDs.
        
        return ;
    }
    
    
Optional key:value pairs mapping provider names to provider app IDs.

Constraints:
Length: 0 - 10

Parameters:
supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs.
    public void setSupportedLoginProviders(java.util.Map<String,StringsupportedLoginProviders) {
        this. = supportedLoginProviders;
    }
    
    
Optional key:value pairs mapping provider names to provider app IDs.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
supportedLoginProviders Optional key:value pairs mapping provider names to provider app IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withSupportedLoginProviders(java.util.Map<String,StringsupportedLoginProviders) {
        setSupportedLoginProviders(supportedLoginProviders);
        return this;
    }

    
Optional key:value pairs mapping provider names to provider app IDs.

The method adds a new key-value pair into SupportedLoginProviders parameter, and returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 10

Parameters:
key The key of the entry to be added into SupportedLoginProviders.
value The corresponding value of the entry to be added into SupportedLoginProviders.
    if (null == this.) {
    }
    if (this..containsKey(key))
      throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
    this..put(keyvalue);
    return this;
  }

  
Removes all the entries added into SupportedLoginProviders.

Returns a reference to this object so that method calls can be chained together.

    this. = null;
    return this;
  }
  
    
The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

Constraints:
Length: 1 - 128
Pattern: [\w._-]+

Returns:
The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

    public String getDeveloperProviderName() {
        return ;
    }
    
    
The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

Constraints:
Length: 1 - 128
Pattern: [\w._-]+

Parameters:
developerProviderName The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

    public void setDeveloperProviderName(String developerProviderName) {
        this. = developerProviderName;
    }
    
    
The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 128
Pattern: [\w._-]+

Parameters:
developerProviderName The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withDeveloperProviderName(String developerProviderName) {
        this. = developerProviderName;
        return this;
    }

    
A list of OpendID Connect provider ARNs.

Returns:
A list of OpendID Connect provider ARNs.
        return ;
    }
    
    
A list of OpendID Connect provider ARNs.

Parameters:
openIdConnectProviderARNs A list of OpendID Connect provider ARNs.
    public void setOpenIdConnectProviderARNs(java.util.Collection<StringopenIdConnectProviderARNs) {
        if (openIdConnectProviderARNs == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<StringopenIdConnectProviderARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(openIdConnectProviderARNs.size());
        openIdConnectProviderARNsCopy.addAll(openIdConnectProviderARNs);
        this. = openIdConnectProviderARNsCopy;
    }
    
    
A list of OpendID Connect provider ARNs.

NOTE: This method appends the values to the existing list (if any). Use setOpenIdConnectProviderARNs(java.util.Collection) or withOpenIdConnectProviderARNs(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
openIdConnectProviderARNs A list of OpendID Connect provider ARNs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withOpenIdConnectProviderARNs(String... openIdConnectProviderARNs) {
        if (getOpenIdConnectProviderARNs() == nullsetOpenIdConnectProviderARNs(new java.util.ArrayList<String>(openIdConnectProviderARNs.length));
        for (String value : openIdConnectProviderARNs) {
            getOpenIdConnectProviderARNs().add(value);
        }
        return this;
    }
    
    
A list of OpendID Connect provider ARNs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
openIdConnectProviderARNs A list of OpendID Connect provider ARNs.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateIdentityPoolRequest withOpenIdConnectProviderARNs(java.util.Collection<StringopenIdConnectProviderARNs) {
        if (openIdConnectProviderARNs == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringopenIdConnectProviderARNsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(openIdConnectProviderARNs.size());
            openIdConnectProviderARNsCopy.addAll(openIdConnectProviderARNs);
            this. = openIdConnectProviderARNsCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getIdentityPoolName() != nullsb.append("IdentityPoolName: " + getIdentityPoolName() + ",");
        if (isAllowUnauthenticatedIdentities() != nullsb.append("AllowUnauthenticatedIdentities: " + isAllowUnauthenticatedIdentities() + ",");
        if (getSupportedLoginProviders() != nullsb.append("SupportedLoginProviders: " + getSupportedLoginProviders() + ",");
        if (getDeveloperProviderName() != nullsb.append("DeveloperProviderName: " + getDeveloperProviderName() + ",");
        if (getOpenIdConnectProviderARNs() != nullsb.append("OpenIdConnectProviderARNs: " + getOpenIdConnectProviderARNs() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIdentityPoolName() == null) ? 0 : getIdentityPoolName().hashCode()); 
        hashCode = prime * hashCode + ((isAllowUnauthenticatedIdentities() == null) ? 0 : isAllowUnauthenticatedIdentities().hashCode()); 
        hashCode = prime * hashCode + ((getSupportedLoginProviders() == null) ? 0 : getSupportedLoginProviders().hashCode()); 
        hashCode = prime * hashCode + ((getDeveloperProviderName() == null) ? 0 : getDeveloperProviderName().hashCode()); 
        hashCode = prime * hashCode + ((getOpenIdConnectProviderARNs() == null) ? 0 : getOpenIdConnectProviderARNs().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateIdentityPoolRequest == falsereturn false;
        
        if (other.getIdentityPoolName() == null ^ this.getIdentityPoolName() == nullreturn false;
        if (other.getIdentityPoolName() != null && other.getIdentityPoolName().equals(this.getIdentityPoolName()) == falsereturn false
        if (other.isAllowUnauthenticatedIdentities() == null ^ this.isAllowUnauthenticatedIdentities() == nullreturn false;
        if (other.isAllowUnauthenticatedIdentities() != null && other.isAllowUnauthenticatedIdentities().equals(this.isAllowUnauthenticatedIdentities()) == falsereturn false
        if (other.getSupportedLoginProviders() == null ^ this.getSupportedLoginProviders() == nullreturn false;
        if (other.getSupportedLoginProviders() != null && other.getSupportedLoginProviders().equals(this.getSupportedLoginProviders()) == falsereturn false
        if (other.getDeveloperProviderName() == null ^ this.getDeveloperProviderName() == nullreturn false;
        if (other.getDeveloperProviderName() != null && other.getDeveloperProviderName().equals(this.getDeveloperProviderName()) == falsereturn false
        if (other.getOpenIdConnectProviderARNs() == null ^ this.getOpenIdConnectProviderARNs() == nullreturn false;
        if (other.getOpenIdConnectProviderARNs() != null && other.getOpenIdConnectProviderARNs().equals(this.getOpenIdConnectProviderARNs()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateIdentityPoolRequest clone() {
        
            return (CreateIdentityPoolRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X