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;
 

A description of the identity.

 
 public class IdentityDescription implements SerializableCloneable {

    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

 
     private String identityId;

    
A set of optional name-value pairs that map provider names to provider tokens.
 
Date on which the identity was created.
 
     private java.util.Date creationDate;

    
Date on which the identity was last modified.
 
     private java.util.Date lastModifiedDate;

    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Returns:
A unique identifier in the format REGION:GUID.
 
     public String getIdentityId() {
         return ;
     }
    
    
A unique identifier in the format REGION:GUID.

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityId A unique identifier in the format REGION:GUID.
 
     public void setIdentityId(String identityId) {
         this. = identityId;
     }
    
    
A unique identifier in the format REGION:GUID.

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

Constraints:
Length: 1 - 50
Pattern: [\w-]+:[0-9a-f-]+

Parameters:
identityId A unique identifier in the format REGION:GUID.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public IdentityDescription withIdentityId(String identityId) {
         this. = identityId;
         return this;
     }

    
A set of optional name-value pairs that map provider names to provider tokens.

Returns:
A set of optional name-value pairs that map provider names to provider tokens.
    public java.util.List<StringgetLogins() {
        return ;
    }
    
    
A set of optional name-value pairs that map provider names to provider tokens.

Parameters:
logins A set of optional name-value pairs that map provider names to provider tokens.
    public void setLogins(java.util.Collection<Stringlogins) {
        if (logins == null) {
            this. = null;
            return;
        }
        loginsCopy.addAll(logins);
        this. = loginsCopy;
    }
    
    
A set of optional name-value pairs that map provider names to provider tokens.

NOTE: This method appends the values to the existing list (if any). Use setLogins(java.util.Collection) or withLogins(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:
logins A set of optional name-value pairs that map provider names to provider tokens.
Returns:
A reference to this updated object so that method calls can be chained together.
    public IdentityDescription withLogins(String... logins) {
        if (getLogins() == nullsetLogins(new java.util.ArrayList<String>(logins.length));
        for (String value : logins) {
            getLogins().add(value);
        }
        return this;
    }
    
    
A set of optional name-value pairs that map provider names to provider tokens.

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

Parameters:
logins A set of optional name-value pairs that map provider names to provider tokens.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (logins == null) {
            this. = null;
        } else {
            loginsCopy.addAll(logins);
            this. = loginsCopy;
        }
        return this;
    }

    
Date on which the identity was created.

Returns:
Date on which the identity was created.
    public java.util.Date getCreationDate() {
        return ;
    }
    
    
Date on which the identity was created.

Parameters:
creationDate Date on which the identity was created.
    public void setCreationDate(java.util.Date creationDate) {
        this. = creationDate;
    }
    
    
Date on which the identity was created.

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

Parameters:
creationDate Date on which the identity was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public IdentityDescription withCreationDate(java.util.Date creationDate) {
        this. = creationDate;
        return this;
    }

    
Date on which the identity was last modified.

Returns:
Date on which the identity was last modified.
    public java.util.Date getLastModifiedDate() {
        return ;
    }
    
    
Date on which the identity was last modified.

Parameters:
lastModifiedDate Date on which the identity was last modified.
    public void setLastModifiedDate(java.util.Date lastModifiedDate) {
        this. = lastModifiedDate;
    }
    
    
Date on which the identity was last modified.

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

Parameters:
lastModifiedDate Date on which the identity was last modified.
Returns:
A reference to this updated object so that method calls can be chained together.
    public IdentityDescription withLastModifiedDate(java.util.Date lastModifiedDate) {
        this. = lastModifiedDate;
        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 (getIdentityId() != nullsb.append("IdentityId: " + getIdentityId() + ",");
        if (getLogins() != nullsb.append("Logins: " + getLogins() + ",");
        if (getCreationDate() != nullsb.append("CreationDate: " + getCreationDate() + ",");
        if (getLastModifiedDate() != nullsb.append("LastModifiedDate: " + getLastModifiedDate() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIdentityId() == null) ? 0 : getIdentityId().hashCode()); 
        hashCode = prime * hashCode + ((getLogins() == null) ? 0 : getLogins().hashCode()); 
        hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); 
        hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof IdentityDescription == falsereturn false;
        IdentityDescription other = (IdentityDescription)obj;
        
        if (other.getIdentityId() == null ^ this.getIdentityId() == nullreturn false;
        if (other.getIdentityId() != null && other.getIdentityId().equals(this.getIdentityId()) == falsereturn false
        if (other.getLogins() == null ^ this.getLogins() == nullreturn false;
        if (other.getLogins() != null && other.getLogins().equals(this.getLogins()) == falsereturn false
        if (other.getCreationDate() == null ^ this.getCreationDate() == nullreturn false;
        if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == falsereturn false
        if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == nullreturn false;
        if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == falsereturn false
        return true;
    }
    
    @Override
    public IdentityDescription clone() {
        try {
            return (IdentityDescriptionsuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X