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.cognitosync.model;
 

Returned for a successful ListIdentityPoolUsage request.

 
 public class ListIdentityPoolUsageResult implements SerializableCloneable {

    
Usage information for the identity pools.
 
The maximum number of results to be returned.
 
     private Integer maxResults;

    
Total number of identities for the identity pool.
 
     private Integer count;

    
A pagination token for obtaining the next page of results.
 
     private String nextToken;

    
Usage information for the identity pools.

Returns:
Usage information for the identity pools.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
Usage information for the identity pools.

Parameters:
identityPoolUsages Usage information for the identity pools.
 
     public void setIdentityPoolUsages(java.util.Collection<IdentityPoolUsageidentityPoolUsages) {
         if (identityPoolUsages == null) {
             this. = null;
             return;
         }
         identityPoolUsagesCopy.addAll(identityPoolUsages);
         this. = identityPoolUsagesCopy;
     }
    
    
Usage information for the identity pools.

NOTE: This method appends the values to the existing list (if any). Use setIdentityPoolUsages(java.util.Collection) or withIdentityPoolUsages(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:
identityPoolUsages Usage information for the identity pools.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public ListIdentityPoolUsageResult withIdentityPoolUsages(IdentityPoolUsage... identityPoolUsages) {
         if (getIdentityPoolUsages() == nullsetIdentityPoolUsages(new java.util.ArrayList<IdentityPoolUsage>(identityPoolUsages.length));
         for (IdentityPoolUsage value : identityPoolUsages) {
             getIdentityPoolUsages().add(value);
         }
         return this;
     }
    
    
Usage information for the identity pools.

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

Parameters:
identityPoolUsages Usage information for the identity pools.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (identityPoolUsages == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<IdentityPoolUsageidentityPoolUsagesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<IdentityPoolUsage>(identityPoolUsages.size());
            identityPoolUsagesCopy.addAll(identityPoolUsages);
            this. = identityPoolUsagesCopy;
        }
        return this;
    }

    
The maximum number of results to be returned.

Returns:
The maximum number of results to be returned.
    public Integer getMaxResults() {
        return ;
    }
    
    
The maximum number of results to be returned.

Parameters:
maxResults The maximum number of results to be returned.
    public void setMaxResults(Integer maxResults) {
        this. = maxResults;
    }
    
    
The maximum number of results to be returned.

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

Parameters:
maxResults The maximum number of results to be returned.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListIdentityPoolUsageResult withMaxResults(Integer maxResults) {
        this. = maxResults;
        return this;
    }

    
Total number of identities for the identity pool.

Returns:
Total number of identities for the identity pool.
    public Integer getCount() {
        return ;
    }
    
    
Total number of identities for the identity pool.

Parameters:
count Total number of identities for the identity pool.
    public void setCount(Integer count) {
        this. = count;
    }
    
    
Total number of identities for the identity pool.

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

Parameters:
count Total number of identities for the identity pool.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = count;
        return this;
    }

    
A pagination token for obtaining the next page of results.

Returns:
A pagination token for obtaining the next page of results.
    public String getNextToken() {
        return ;
    }
    
    
A pagination token for obtaining the next page of results.

Parameters:
nextToken A pagination token for obtaining the next page of results.
    public void setNextToken(String nextToken) {
        this. = nextToken;
    }
    
    
A pagination token for obtaining the next page of results.

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

Parameters:
nextToken A pagination token for obtaining the next page of results.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ListIdentityPoolUsageResult withNextToken(String nextToken) {
        this. = nextToken;
        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 (getIdentityPoolUsages() != nullsb.append("IdentityPoolUsages: " + getIdentityPoolUsages() + ",");
        if (getMaxResults() != nullsb.append("MaxResults: " + getMaxResults() + ",");
        if (getCount() != nullsb.append("Count: " + getCount() + ",");
        if (getNextToken() != nullsb.append("NextToken: " + getNextToken() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIdentityPoolUsages() == null) ? 0 : getIdentityPoolUsages().hashCode()); 
        hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); 
        hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode()); 
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ListIdentityPoolUsageResult == falsereturn false;
        
        if (other.getIdentityPoolUsages() == null ^ this.getIdentityPoolUsages() == nullreturn false;
        if (other.getIdentityPoolUsages() != null && other.getIdentityPoolUsages().equals(this.getIdentityPoolUsages()) == falsereturn false
        if (other.getMaxResults() == null ^ this.getMaxResults() == nullreturn false;
        if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == falsereturn false
        if (other.getCount() == null ^ this.getCount() == nullreturn false;
        if (other.getCount() != null && other.getCount().equals(this.getCount()) == falsereturn false
        if (other.getNextToken() == null ^ this.getNextToken() == nullreturn false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == falsereturn false
        return true;
    }
    
    @Override
        try {
            return (ListIdentityPoolUsageResultsuper.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