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 contain information about the specified hosted zone.

 
 public class HostedZone implements SerializableCloneable {

    
The ID of the specified hosted zone.

Constraints:
Length: 0 - 32

 
     private String id;

    
The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

Constraints:
Length: 0 - 1024

 
     private String name;

    
A unique string that identifies the request to create the hosted zone.

Constraints:
Length: 1 - 128

 
     private String callerReference;

    
A complex type that contains the Comment element.
 
     private HostedZoneConfig config;

    
Total number of resource record sets in the hosted zone.
 
     private Long resourceRecordSetCount;

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

Parameters:
id The ID of the specified hosted zone.
name The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

callerReference A unique string that identifies the request to create the hosted zone.
 
     public HostedZone(String idString nameString callerReference) {
         setId(id);
         setName(name);
         setCallerReference(callerReference);
     }

    
The ID of the specified hosted zone.

Constraints:
Length: 0 - 32

Returns:
The ID of the specified hosted zone.
    public String getId() {
        return ;
    }
    
    
The ID of the specified hosted zone.

Constraints:
Length: 0 - 32

Parameters:
id The ID of the specified hosted zone.
    public void setId(String id) {
        this. = id;
    }
    
    
The ID of the specified hosted zone.

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

Constraints:
Length: 0 - 32

Parameters:
id The ID of the specified hosted zone.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HostedZone withId(String id) {
        this. = id;
        return this;
    }

    
The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

Constraints:
Length: 0 - 1024

Returns:
The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

    public String getName() {
        return ;
    }
    
    
The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

Constraints:
Length: 0 - 1024

Parameters:
name The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

    public void setName(String name) {
        this. = name;
    }
    
    
The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

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

Constraints:
Length: 0 - 1024

Parameters:
name The name of the domain. This must be a fully-specified domain, for example, www.example.com. The trailing dot is optional; Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical.

This is the name you have registered with your DNS registrar. You should ask your registrar to change the authoritative name servers for your domain to the set of NameServers elements returned in DelegationSet.

Returns:
A reference to this updated object so that method calls can be chained together.
    public HostedZone withName(String name) {
        this. = name;
        return this;
    }

    
A unique string that identifies the request to create the hosted zone.

Constraints:
Length: 1 - 128

Returns:
A unique string that identifies the request to create the hosted zone.
    public String getCallerReference() {
        return ;
    }
    
    
A unique string that identifies the request to create the hosted zone.

Constraints:
Length: 1 - 128

Parameters:
callerReference A unique string that identifies the request to create the hosted zone.
    public void setCallerReference(String callerReference) {
        this. = callerReference;
    }
    
    
A unique string that identifies the request to create the hosted zone.

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

Constraints:
Length: 1 - 128

Parameters:
callerReference A unique string that identifies the request to create the hosted zone.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HostedZone withCallerReference(String callerReference) {
        this. = callerReference;
        return this;
    }

    
A complex type that contains the Comment element.

Returns:
A complex type that contains the Comment element.
    public HostedZoneConfig getConfig() {
        return ;
    }
    
    
A complex type that contains the Comment element.

Parameters:
config A complex type that contains the Comment element.
    public void setConfig(HostedZoneConfig config) {
        this. = config;
    }
    
    
A complex type that contains the Comment element.

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

Parameters:
config A complex type that contains the Comment element.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HostedZone withConfig(HostedZoneConfig config) {
        this. = config;
        return this;
    }

    
Total number of resource record sets in the hosted zone.

Returns:
Total number of resource record sets in the hosted zone.
    public Long getResourceRecordSetCount() {
        return ;
    }
    
    
Total number of resource record sets in the hosted zone.

Parameters:
resourceRecordSetCount Total number of resource record sets in the hosted zone.
    public void setResourceRecordSetCount(Long resourceRecordSetCount) {
        this. = resourceRecordSetCount;
    }
    
    
Total number of resource record sets in the hosted zone.

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

Parameters:
resourceRecordSetCount Total number of resource record sets in the hosted zone.
Returns:
A reference to this updated object so that method calls can be chained together.
    public HostedZone withResourceRecordSetCount(Long resourceRecordSetCount) {
        this. = resourceRecordSetCount;
        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 (getName() != nullsb.append("Name: " + getName() + ",");
        if (getCallerReference() != nullsb.append("CallerReference: " + getCallerReference() + ",");
        if (getConfig() != nullsb.append("Config: " + getConfig() + ",");
        if (getResourceRecordSetCount() != nullsb.append("ResourceRecordSetCount: " + getResourceRecordSetCount() );
        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 + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getCallerReference() == null) ? 0 : getCallerReference().hashCode()); 
        hashCode = prime * hashCode + ((getConfig() == null) ? 0 : getConfig().hashCode()); 
        hashCode = prime * hashCode + ((getResourceRecordSetCount() == null) ? 0 : getResourceRecordSetCount().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof HostedZone == falsereturn false;
        HostedZone other = (HostedZone)obj;
        
        if (other.getId() == null ^ this.getId() == nullreturn false;
        if (other.getId() != null && other.getId().equals(this.getId()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getCallerReference() == null ^ this.getCallerReference() == nullreturn false;
        if (other.getCallerReference() != null && other.getCallerReference().equals(this.getCallerReference()) == falsereturn false
        if (other.getConfig() == null ^ this.getConfig() == nullreturn false;
        if (other.getConfig() != null && other.getConfig().equals(this.getConfig()) == falsereturn false
        if (other.getResourceRecordSetCount() == null ^ this.getResourceRecordSetCount() == nullreturn false;
        if (other.getResourceRecordSetCount() != null && other.getResourceRecordSetCount().equals(this.getResourceRecordSetCount()) == falsereturn false
        return true;
    }
    
    @Override
    public HostedZone clone() {
        try {
            return (HostedZonesuper.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