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 name server information.

 
 public class DelegationSet implements SerializableCloneable {
 
     private String id;
 
     private String callerReference;

    
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.

Constraints:
Length: 1 -

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

Parameters:
nameServers A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.
 
     public DelegationSet(java.util.List<StringnameServers) {
         setNameServers(nameServers);
     }

    
Returns the value of the Id property for this object.

Constraints:
Length: 0 - 32

Returns:
The value of the Id property for this object.
 
     public String getId() {
         return ;
     }
    
    
Sets the value of the Id property for this object.

Constraints:
Length: 0 - 32

Parameters:
id The new value for the Id property for this object.
 
     public void setId(String id) {
         this. = id;
     }
    
    
Sets the value of the Id property for this object.

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

Constraints:
Length: 0 - 32

Parameters:
id The new value for the Id property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public DelegationSet withId(String id) {
         this. = id;
        return this;
    }

    
Returns the value of the CallerReference property for this object.

Constraints:
Length: 1 - 128

Returns:
The value of the CallerReference property for this object.
    public String getCallerReference() {
        return ;
    }
    
    
Sets the value of the CallerReference property for this object.

Constraints:
Length: 1 - 128

Parameters:
callerReference The new value for the CallerReference property for this object.
    public void setCallerReference(String callerReference) {
        this. = callerReference;
    }
    
    
Sets the value of the CallerReference property for this object.

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

Constraints:
Length: 1 - 128

Parameters:
callerReference The new value for the CallerReference property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DelegationSet withCallerReference(String callerReference) {
        this. = callerReference;
        return this;
    }

    
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.

Constraints:
Length: 1 -

Returns:
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.
    public java.util.List<StringgetNameServers() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.

Constraints:
Length: 1 -

Parameters:
nameServers A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.
    public void setNameServers(java.util.Collection<StringnameServers) {
        if (nameServers == null) {
            this. = null;
            return;
        }
        nameServersCopy.addAll(nameServers);
        this. = nameServersCopy;
    }
    
    
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.

NOTE: This method appends the values to the existing list (if any). Use setNameServers(java.util.Collection) or withNameServers(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:
nameServers A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DelegationSet withNameServers(String... nameServers) {
        if (getNameServers() == nullsetNameServers(new java.util.ArrayList<String>(nameServers.length));
        for (String value : nameServers) {
            getNameServers().add(value);
        }
        return this;
    }
    
    
A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.

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

Constraints:
Length: 1 -

Parameters:
nameServers A complex type that contains the authoritative name servers for the hosted zone. Use the method provided by your domain registrar to add an NS record to your domain for each NameServer that is assigned to your hosted zone.
Returns:
A reference to this updated object so that method calls can be chained together.
    public DelegationSet withNameServers(java.util.Collection<StringnameServers) {
        if (nameServers == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<StringnameServersCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(nameServers.size());
            nameServersCopy.addAll(nameServers);
            this. = nameServersCopy;
        }
        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 (getId() != nullsb.append("Id: " + getId() + ",");
        if (getCallerReference() != nullsb.append("CallerReference: " + getCallerReference() + ",");
        if (getNameServers() != nullsb.append("NameServers: " + getNameServers() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); 
        hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); 
        hashCode = prime * hashCode + ((getNameServers() == null) ? 0 : getNameServers().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof DelegationSet == falsereturn false;
        DelegationSet other = (DelegationSet)obj;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getCallerReference() == null ^ this.getCallerReference() == nullreturn false;
        if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == falsereturn false
        if (other.getNameServers() == null ^ this.getNameServers() == nullreturn false;
        if (other.getNameServers() != null && other.getNameServers().equals(this.getNameServers()) == falsereturn false
        return true;
    }
    
    @Override
    public DelegationSet clone() {
        try {
            return (DelegationSetsuper.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