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

Information about a policy type.

 
 public class PolicyTypeDescription implements SerializableCloneable {

    
The name of the policy type.
 
     private String policyTypeName;

    
A description of the policy type.
 
     private String description;

    
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
 
The name of the policy type.

Returns:
The name of the policy type.
 
     public String getPolicyTypeName() {
         return ;
     }
    
    
The name of the policy type.

Parameters:
policyTypeName The name of the policy type.
 
     public void setPolicyTypeName(String policyTypeName) {
         this. = policyTypeName;
     }
    
    
The name of the policy type.

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

Parameters:
policyTypeName The name of the policy type.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public PolicyTypeDescription withPolicyTypeName(String policyTypeName) {
         this. = policyTypeName;
         return this;
     }

    
A description of the policy type.

Returns:
A description of the policy type.
 
     public String getDescription() {
         return ;
     }
    
    
A description of the policy type.

Parameters:
description A description of the policy type.
 
     public void setDescription(String description) {
         this. = description;
     }
    
    
A description of the policy type.

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

Parameters:
description A description of the policy type.
Returns:
A reference to this updated object so that method calls can be chained together.
    public PolicyTypeDescription withDescription(String description) {
        this. = description;
        return this;
    }

    
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.

Returns:
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
        if ( == null) {
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.

Parameters:
policyAttributeTypeDescriptions The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
    public void setPolicyAttributeTypeDescriptions(java.util.Collection<PolicyAttributeTypeDescriptionpolicyAttributeTypeDescriptions) {
        if (policyAttributeTypeDescriptions == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<PolicyAttributeTypeDescriptionpolicyAttributeTypeDescriptionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<PolicyAttributeTypeDescription>(policyAttributeTypeDescriptions.size());
        policyAttributeTypeDescriptionsCopy.addAll(policyAttributeTypeDescriptions);
        this. = policyAttributeTypeDescriptionsCopy;
    }
    
    
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.

NOTE: This method appends the values to the existing list (if any). Use setPolicyAttributeTypeDescriptions(java.util.Collection) or withPolicyAttributeTypeDescriptions(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:
policyAttributeTypeDescriptions The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (getPolicyAttributeTypeDescriptions() == nullsetPolicyAttributeTypeDescriptions(new java.util.ArrayList<PolicyAttributeTypeDescription>(policyAttributeTypeDescriptions.length));
        for (PolicyAttributeTypeDescription value : policyAttributeTypeDescriptions) {
            getPolicyAttributeTypeDescriptions().add(value);
        }
        return this;
    }
    
    
The description of the policy attributes associated with the policies defined by Elastic Load Balancing.

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

Parameters:
policyAttributeTypeDescriptions The description of the policy attributes associated with the policies defined by Elastic Load Balancing.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (policyAttributeTypeDescriptions == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<PolicyAttributeTypeDescriptionpolicyAttributeTypeDescriptionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<PolicyAttributeTypeDescription>(policyAttributeTypeDescriptions.size());
            policyAttributeTypeDescriptionsCopy.addAll(policyAttributeTypeDescriptions);
            this. = policyAttributeTypeDescriptionsCopy;
        }
        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 (getPolicyTypeName() != nullsb.append("PolicyTypeName: " + getPolicyTypeName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getPolicyAttributeTypeDescriptions() != nullsb.append("PolicyAttributeTypeDescriptions: " + getPolicyAttributeTypeDescriptions() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getPolicyTypeName() == null) ? 0 : getPolicyTypeName().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getPolicyAttributeTypeDescriptions() == null) ? 0 : getPolicyAttributeTypeDescriptions().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof PolicyTypeDescription == falsereturn false;
        PolicyTypeDescription other = (PolicyTypeDescription)obj;
        
        if (other.getPolicyTypeName() == null ^ this.getPolicyTypeName() == nullreturn false;
        if (other.getPolicyTypeName() != null && other.getPolicyTypeName().equals(this.getPolicyTypeName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getPolicyAttributeTypeDescriptions() == null ^ this.getPolicyAttributeTypeDescriptions() == nullreturn false;
        if (other.getPolicyAttributeTypeDescriptions() != null && other.getPolicyAttributeTypeDescriptions().equals(this.getPolicyAttributeTypeDescriptions()) == falsereturn false
        return true;
    }
    
    @Override
    public PolicyTypeDescription clone() {
        try {
            return (PolicyTypeDescriptionsuper.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