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

The TestRoleResponse structure.

 
 public class TestRoleResult implements SerializableCloneable {

    
If the operation is successful, this value is true; otherwise, the value is false.

Constraints:
Pattern: (^true$)|(^false$)

 
     private String success;

    
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.
 
If the operation is successful, this value is true; otherwise, the value is false.

Constraints:
Pattern: (^true$)|(^false$)

Returns:
If the operation is successful, this value is true; otherwise, the value is false.
 
     public String getSuccess() {
         return ;
     }
    
    
If the operation is successful, this value is true; otherwise, the value is false.

Constraints:
Pattern: (^true$)|(^false$)

Parameters:
success If the operation is successful, this value is true; otherwise, the value is false.
 
     public void setSuccess(String success) {
         this. = success;
     }
    
    
If the operation is successful, this value is true; otherwise, the value is false.

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

Constraints:
Pattern: (^true$)|(^false$)

Parameters:
success If the operation is successful, this value is true; otherwise, the value is false.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public TestRoleResult withSuccess(String success) {
         this. = success;
         return this;
     }

    
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.

Returns:
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.
 
     public java.util.List<StringgetMessages() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.

Parameters:
messages If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.
    public void setMessages(java.util.Collection<Stringmessages) {
        if (messages == null) {
            this. = null;
            return;
        }
        messagesCopy.addAll(messages);
        this. = messagesCopy;
    }
    
    
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.

NOTE: This method appends the values to the existing list (if any). Use setMessages(java.util.Collection) or withMessages(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:
messages If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TestRoleResult withMessages(String... messages) {
        if (getMessages() == nullsetMessages(new java.util.ArrayList<String>(messages.length));
        for (String value : messages) {
            getMessages().add(value);
        }
        return this;
    }
    
    
If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.

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

Parameters:
messages If the Success element contains false, this value is an array of one or more error messages that were generated during the test process.
Returns:
A reference to this updated object so that method calls can be chained together.
    public TestRoleResult withMessages(java.util.Collection<Stringmessages) {
        if (messages == null) {
            this. = null;
        } else {
            messagesCopy.addAll(messages);
            this. = messagesCopy;
        }
        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 (getSuccess() != nullsb.append("Success: " + getSuccess() + ",");
        if (getMessages() != nullsb.append("Messages: " + getMessages() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getSuccess() == null) ? 0 : getSuccess().hashCode()); 
        hashCode = prime * hashCode + ((getMessages() == null) ? 0 : getMessages().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof TestRoleResult == falsereturn false;
        TestRoleResult other = (TestRoleResult)obj;
        
        if (other.getSuccess() == null ^ this.getSuccess() == nullreturn false;
        if (other.getSuccess() != null && other.getSuccess().equals(this.getSuccess()) == falsereturn false
        if (other.getMessages() == null ^ this.getMessages() == nullreturn false;
        if (other.getMessages() != null && other.getMessages().equals(this.getMessages()) == falsereturn false
        return true;
    }
    
    @Override
    public TestRoleResult clone() {
        try {
            return (TestRoleResultsuper.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