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

Describes a failed association.

 
 public class FailedCreateAssociation implements SerializableCloneable {

    
The association.
 
     private CreateAssociationBatchRequestEntry entry;

    
A description of the failure.
 
     private String message;

    
The source of the failure.

Constraints:
Allowed Values: Client, Server, Unknown

 
     private String fault;

    
The association.

Returns:
The association.
 
         return ;
     }
    
    
The association.

Parameters:
entry The association.
 
     public void setEntry(CreateAssociationBatchRequestEntry entry) {
         this. = entry;
     }
    
    
The association.

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

Parameters:
entry The association.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         this. = entry;
         return this;
     }

    
A description of the failure.

Returns:
A description of the failure.
 
     public String getMessage() {
         return ;
     }
    
    
A description of the failure.

Parameters:
message A description of the failure.
 
     public void setMessage(String message) {
         this. = message;
     }
    
    
A description of the failure.

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

Parameters:
message A description of the failure.
Returns:
A reference to this updated object so that method calls can be chained together.
    public FailedCreateAssociation withMessage(String message) {
        this. = message;
        return this;
    }

    
The source of the failure.

Constraints:
Allowed Values: Client, Server, Unknown

Returns:
The source of the failure.
See also:
Fault
    public String getFault() {
        return ;
    }
    
    
The source of the failure.

Constraints:
Allowed Values: Client, Server, Unknown

Parameters:
fault The source of the failure.
See also:
Fault
    public void setFault(String fault) {
        this. = fault;
    }
    
    
The source of the failure.

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

Constraints:
Allowed Values: Client, Server, Unknown

Parameters:
fault The source of the failure.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Fault
    public FailedCreateAssociation withFault(String fault) {
        this. = fault;
        return this;
    }

    
The source of the failure.

Constraints:
Allowed Values: Client, Server, Unknown

Parameters:
fault The source of the failure.
See also:
Fault
    public void setFault(Fault fault) {
        this. = fault.toString();
    }
    
    
The source of the failure.

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

Constraints:
Allowed Values: Client, Server, Unknown

Parameters:
fault The source of the failure.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
Fault
    public FailedCreateAssociation withFault(Fault fault) {
        this. = fault.toString();
        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 (getEntry() != nullsb.append("Entry: " + getEntry() + ",");
        if (getMessage() != nullsb.append("Message: " + getMessage() + ",");
        if (getFault() != nullsb.append("Fault: " + getFault() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getEntry() == null) ? 0 : getEntry().hashCode()); 
        hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); 
        hashCode = prime * hashCode + ((getFault() == null) ? 0 : getFault().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof FailedCreateAssociation == falsereturn false;
        FailedCreateAssociation other = (FailedCreateAssociation)obj;
        
        if (other.getEntry() == null ^ this.getEntry() == nullreturn false;
        if (other.getEntry() != null && other.getEntry().equals(this.getEntry()) == falsereturn false
        if (other.getMessage() == null ^ this.getMessage() == nullreturn false;
        if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == falsereturn false
        if (other.getFault() == null ^ this.getFault() == nullreturn false;
        if (other.getFault() != null && other.getFault().equals(this.getFault()) == falsereturn false
        return true;
    }
    
    @Override
    public FailedCreateAssociation clone() {
        try {
            return (FailedCreateAssociationsuper.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