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

Describes attributes of your AWS account. The following are the supported account attributes:

  • supported-platforms : Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.

  • default-vpc : The ID of the default VPC for your account, or none .

  • max-instances : The maximum number of On-Demand instances that you can run.

  • vpc-max-security-groups-per-interface : The maximum number of security groups that you can assign to a network interface.

  • max-elastic-ips : The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.

  • vpc-max-elastic-ips : The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.

 
One or more account attribute names.
 
One or more account attribute names.

Returns:
One or more account attribute names.
 
     public java.util.List<StringgetAttributeNames() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
One or more account attribute names.

Parameters:
attributeNames One or more account attribute names.
 
     public void setAttributeNames(java.util.Collection<StringattributeNames) {
         if (attributeNames == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringattributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(attributeNames.size());
         attributeNamesCopy.addAll(attributeNames);
         this. = attributeNamesCopy;
     }
    
    
One or more account attribute names.

NOTE: This method appends the values to the existing list (if any). Use setAttributeNames(java.util.Collection) or withAttributeNames(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:
attributeNames One or more account attribute names.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DescribeAccountAttributesRequest withAttributeNames(String... attributeNames) {
        if (getAttributeNames() == nullsetAttributeNames(new java.util.ArrayList<String>(attributeNames.length));
        for (String value : attributeNames) {
            getAttributeNames().add(value);
        }
        return this;
    }
    
    
One or more account attribute names.

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

Parameters:
attributeNames One or more account attribute names.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (attributeNames == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringattributeNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(attributeNames.size());
            attributeNamesCopy.addAll(attributeNames);
            this. = attributeNamesCopy;
        }
        return this;
    }

    
One or more account attribute names.

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

Parameters:
attributeNames One or more account attribute names.
Returns:
A reference to this updated object so that method calls can be chained together.
        java.util.ArrayList<StringattributeNamesCopy = new java.util.ArrayList<String>(attributeNames.length);
        for (AccountAttributeName member : attributeNames) {
            attributeNamesCopy.add(member.toString());
        }
        if (getAttributeNames() == null) {
            setAttributeNames(attributeNamesCopy);
        } else {
            getAttributeNames().addAll(attributeNamesCopy);
        }
        return this;
    }

    
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.
    @Override
        request.addParameter("DryRun", Boolean.toString(true));
        return request;
    }
    
    
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 (getAttributeNames() != nullsb.append("AttributeNames: " + getAttributeNames() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DescribeAccountAttributesRequest == falsereturn false;
        
        if (other.getAttributeNames() == null ^ this.getAttributeNames() == nullreturn false;
        if (other.getAttributeNames() != null && other.getAttributeNames().equals(this.getAttributeNames()) == falsereturn false
        return true;
    }
    
    @Override
        
            return (DescribeAccountAttributesRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X