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

A complex type that contains an optional comment and the changes that you want to make with a change batch request.

 
 public class ChangeBatch implements SerializableCloneable {

    
Optional: Any comments you want to include about a change batch request.

Constraints:
Length: 0 - 256

 
     private String comment;

    
A complex type that contains one Change element for each resource record set that you want to create or delete.

Constraints:
Length: 1 -

 
Default constructor for a new ChangeBatch object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public ChangeBatch() {}
    
    
Constructs a new ChangeBatch object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
changes A complex type that contains one Change element for each resource record set that you want to create or delete.
 
     public ChangeBatch(java.util.List<Changechanges) {
         setChanges(changes);
     }

    
Optional: Any comments you want to include about a change batch request.

Constraints:
Length: 0 - 256

Returns:
Optional: Any comments you want to include about a change batch request.
 
     public String getComment() {
         return ;
     }
    
    
Optional: Any comments you want to include about a change batch request.

Constraints:
Length: 0 - 256

Parameters:
comment Optional: Any comments you want to include about a change batch request.
 
     public void setComment(String comment) {
         this. = comment;
     }
    
    
Optional: Any comments you want to include about a change batch request.

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

Constraints:
Length: 0 - 256

Parameters:
comment Optional: Any comments you want to include about a change batch request.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChangeBatch withComment(String comment) {
        this. = comment;
        return this;
    }

    
A complex type that contains one Change element for each resource record set that you want to create or delete.

Constraints:
Length: 1 -

Returns:
A complex type that contains one Change element for each resource record set that you want to create or delete.
    public java.util.List<ChangegetChanges() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Change>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A complex type that contains one Change element for each resource record set that you want to create or delete.

Constraints:
Length: 1 -

Parameters:
changes A complex type that contains one Change element for each resource record set that you want to create or delete.
    public void setChanges(java.util.Collection<Changechanges) {
        if (changes == null) {
            this. = null;
            return;
        }
        changesCopy.addAll(changes);
        this. = changesCopy;
    }
    
    
A complex type that contains one Change element for each resource record set that you want to create or delete.

NOTE: This method appends the values to the existing list (if any). Use setChanges(java.util.Collection) or withChanges(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.

Constraints:
Length: 1 -

Parameters:
changes A complex type that contains one Change element for each resource record set that you want to create or delete.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChangeBatch withChanges(Change... changes) {
        if (getChanges() == nullsetChanges(new java.util.ArrayList<Change>(changes.length));
        for (Change value : changes) {
            getChanges().add(value);
        }
        return this;
    }
    
    
A complex type that contains one Change element for each resource record set that you want to create or delete.

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

Constraints:
Length: 1 -

Parameters:
changes A complex type that contains one Change element for each resource record set that you want to create or delete.
Returns:
A reference to this updated object so that method calls can be chained together.
    public ChangeBatch withChanges(java.util.Collection<Changechanges) {
        if (changes == null) {
            this. = null;
        } else {
            changesCopy.addAll(changes);
            this. = changesCopy;
        }
        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 (getComment() != nullsb.append("Comment: " + getComment() + ",");
        if (getChanges() != nullsb.append("Changes: " + getChanges() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getComment() == null) ? 0 : getComment().hashCode()); 
        hashCode = prime * hashCode + ((getChanges() == null) ? 0 : getChanges().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof ChangeBatch == falsereturn false;
        ChangeBatch other = (ChangeBatch)obj;
        
        if (other.getComment() == null ^ this.getComment() == nullreturn false;
        if (other.getComment() != null && other.getComment().equals(this.getComment()) == falsereturn false
        if (other.getChanges() == null ^ this.getChanges() == nullreturn false;
        if (other.getChanges() != null && other.getChanges().equals(this.getChanges()) == falsereturn false
        return true;
    }
    
    @Override
    public ChangeBatch clone() {
        try {
            return (ChangeBatchsuper.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