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.opsworks.model;
 
 
Container for the parameters to the DescribeUserProfiles operation.

Describe specified users.

Required Permissions : To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

 
 public class DescribeUserProfilesRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
An array of IAM user ARNs that identify the users to be described.
 
An array of IAM user ARNs that identify the users to be described.

Returns:
An array of IAM user ARNs that identify the users to be described.
 
     public java.util.List<StringgetIamUserArns() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array of IAM user ARNs that identify the users to be described.

Parameters:
iamUserArns An array of IAM user ARNs that identify the users to be described.
 
     public void setIamUserArns(java.util.Collection<StringiamUserArns) {
         if (iamUserArns == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringiamUserArnsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(iamUserArns.size());
         iamUserArnsCopy.addAll(iamUserArns);
         this. = iamUserArnsCopy;
     }
    
    
An array of IAM user ARNs that identify the users to be described.

NOTE: This method appends the values to the existing list (if any). Use setIamUserArns(java.util.Collection) or withIamUserArns(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:
iamUserArns An array of IAM user ARNs that identify the users to be described.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DescribeUserProfilesRequest withIamUserArns(String... iamUserArns) {
         if (getIamUserArns() == nullsetIamUserArns(new java.util.ArrayList<String>(iamUserArns.length));
         for (String value : iamUserArns) {
             getIamUserArns().add(value);
         }
         return this;
     }
    
    
An array of IAM user ARNs that identify the users to be described.

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

Parameters:
iamUserArns An array of IAM user ARNs that identify the users to be described.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (iamUserArns == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringiamUserArnsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(iamUserArns.size());
            iamUserArnsCopy.addAll(iamUserArns);
            this. = iamUserArnsCopy;
        }
        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 (getIamUserArns() != nullsb.append("IamUserArns: " + getIamUserArns() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getIamUserArns() == null) ? 0 : getIamUserArns().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeUserProfilesRequest == falsereturn false;
        
        if (other.getIamUserArns() == null ^ this.getIamUserArns() == nullreturn false;
        if (other.getIamUserArns() != null && other.getIamUserArns().equals(this.getIamUserArns()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DescribeUserProfilesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X