All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.servicediscovery.model.Namespace Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Route 53 Auto Naming module holds the client classes that are used for communicating with Amazon Route 53 Auto Naming Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 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.servicediscovery.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A complex type that contains information about a specified namespace. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Namespace implements Serializable, Cloneable, StructuredPojo { /** *

* The ID of a namespace. *

*/ private String id; /** *

* The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. *

*/ private String arn; /** *

* The name of the namespace, such as example.com. *

*/ private String name; /** *

* The type of the namespace. The methods for discovering instances depends on the value that you specify: *

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
*
*/ private String type; /** *

* The description that you specify for the namespace when you create it. *

*/ private String description; /** *

* The number of services that are associated with the namespace. *

*/ private Integer serviceCount; /** *

* A complex type that contains information that's specific to the type of the namespace. *

*/ private NamespaceProperties properties; /** *

* The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). The value * of CreateDate is accurate to milliseconds. For example, the value 1516925490.087 * represents Friday, January 26, 2018 12:11:30.087 AM. *

*/ private java.util.Date createDate; /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running an operation twice. *

*/ private String creatorRequestId; /** *

* The ID of a namespace. *

* * @param id * The ID of a namespace. */ public void setId(String id) { this.id = id; } /** *

* The ID of a namespace. *

* * @return The ID of a namespace. */ public String getId() { return this.id; } /** *

* The ID of a namespace. *

* * @param id * The ID of a namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withId(String id) { setId(id); return this; } /** *

* The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. *

* * @param arn * The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. *

* * @return The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. *

* * @param arn * The Amazon Resource Name (ARN) that Cloud Map assigns to the namespace when you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withArn(String arn) { setArn(arn); return this; } /** *

* The name of the namespace, such as example.com. *

* * @param name * The name of the namespace, such as example.com. */ public void setName(String name) { this.name = name; } /** *

* The name of the namespace, such as example.com. *

* * @return The name of the namespace, such as example.com. */ public String getName() { return this.name; } /** *

* The name of the namespace, such as example.com. *

* * @param name * The name of the namespace, such as example.com. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withName(String name) { setName(name); return this; } /** *

* The type of the namespace. The methods for discovering instances depends on the value that you specify: *

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
*
* * @param type * The type of the namespace. The methods for discovering instances depends on the value that you * specify:

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
* @see NamespaceType */ public void setType(String type) { this.type = type; } /** *

* The type of the namespace. The methods for discovering instances depends on the value that you specify: *

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
*
* * @return The type of the namespace. The methods for discovering instances depends on the value that you * specify:

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances * API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
* @see NamespaceType */ public String getType() { return this.type; } /** *

* The type of the namespace. The methods for discovering instances depends on the value that you specify: *

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
*
* * @param type * The type of the namespace. The methods for discovering instances depends on the value that you * specify:

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see NamespaceType */ public Namespace withType(String type) { setType(type); return this; } /** *

* The type of the namespace. The methods for discovering instances depends on the value that you specify: *

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
*
* * @param type * The type of the namespace. The methods for discovering instances depends on the value that you * specify:

*
*
HTTP
*
*

* Instances can be discovered only programmatically, using the Cloud Map DiscoverInstances API. *

*
*
DNS_PUBLIC
*
*

* Instances can be discovered using public DNS queries and using the DiscoverInstances API. *

*
*
DNS_PRIVATE
*
*

* Instances can be discovered using DNS queries in VPCs and using the DiscoverInstances API. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see NamespaceType */ public Namespace withType(NamespaceType type) { this.type = type.toString(); return this; } /** *

* The description that you specify for the namespace when you create it. *

* * @param description * The description that you specify for the namespace when you create it. */ public void setDescription(String description) { this.description = description; } /** *

* The description that you specify for the namespace when you create it. *

* * @return The description that you specify for the namespace when you create it. */ public String getDescription() { return this.description; } /** *

* The description that you specify for the namespace when you create it. *

* * @param description * The description that you specify for the namespace when you create it. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withDescription(String description) { setDescription(description); return this; } /** *

* The number of services that are associated with the namespace. *

* * @param serviceCount * The number of services that are associated with the namespace. */ public void setServiceCount(Integer serviceCount) { this.serviceCount = serviceCount; } /** *

* The number of services that are associated with the namespace. *

* * @return The number of services that are associated with the namespace. */ public Integer getServiceCount() { return this.serviceCount; } /** *

* The number of services that are associated with the namespace. *

* * @param serviceCount * The number of services that are associated with the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withServiceCount(Integer serviceCount) { setServiceCount(serviceCount); return this; } /** *

* A complex type that contains information that's specific to the type of the namespace. *

* * @param properties * A complex type that contains information that's specific to the type of the namespace. */ public void setProperties(NamespaceProperties properties) { this.properties = properties; } /** *

* A complex type that contains information that's specific to the type of the namespace. *

* * @return A complex type that contains information that's specific to the type of the namespace. */ public NamespaceProperties getProperties() { return this.properties; } /** *

* A complex type that contains information that's specific to the type of the namespace. *

* * @param properties * A complex type that contains information that's specific to the type of the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withProperties(NamespaceProperties properties) { setProperties(properties); return this; } /** *

* The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). The value * of CreateDate is accurate to milliseconds. For example, the value 1516925490.087 * represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @param createDate * The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public void setCreateDate(java.util.Date createDate) { this.createDate = createDate; } /** *

* The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). The value * of CreateDate is accurate to milliseconds. For example, the value 1516925490.087 * represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @return The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. */ public java.util.Date getCreateDate() { return this.createDate; } /** *

* The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). The value * of CreateDate is accurate to milliseconds. For example, the value 1516925490.087 * represents Friday, January 26, 2018 12:11:30.087 AM. *

* * @param createDate * The date that the namespace was created, in Unix date/time format and Coordinated Universal Time (UTC). * The value of CreateDate is accurate to milliseconds. For example, the value * 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withCreateDate(java.util.Date createDate) { setCreateDate(createDate); return this; } /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running an operation twice. *

* * @param creatorRequestId * A unique string that identifies the request and that allows failed requests to be retried without the risk * of running an operation twice. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running an operation twice. *

* * @return A unique string that identifies the request and that allows failed requests to be retried without the * risk of running an operation twice. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *

* A unique string that identifies the request and that allows failed requests to be retried without the risk of * running an operation twice. *

* * @param creatorRequestId * A unique string that identifies the request and that allows failed requests to be retried without the risk * of running an operation twice. * @return Returns a reference to this object so that method calls can be chained together. */ public Namespace withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getServiceCount() != null) sb.append("ServiceCount: ").append(getServiceCount()).append(","); if (getProperties() != null) sb.append("Properties: ").append(getProperties()).append(","); if (getCreateDate() != null) sb.append("CreateDate: ").append(getCreateDate()).append(","); if (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Namespace == false) return false; Namespace other = (Namespace) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getServiceCount() == null ^ this.getServiceCount() == null) return false; if (other.getServiceCount() != null && other.getServiceCount().equals(this.getServiceCount()) == false) return false; if (other.getProperties() == null ^ this.getProperties() == null) return false; if (other.getProperties() != null && other.getProperties().equals(this.getProperties()) == false) return false; if (other.getCreateDate() == null ^ this.getCreateDate() == null) return false; if (other.getCreateDate() != null && other.getCreateDate().equals(this.getCreateDate()) == false) return false; if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null) return false; if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getServiceCount() == null) ? 0 : getServiceCount().hashCode()); hashCode = prime * hashCode + ((getProperties() == null) ? 0 : getProperties().hashCode()); hashCode = prime * hashCode + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); return hashCode; } @Override public Namespace clone() { try { return (Namespace) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.servicediscovery.model.transform.NamespaceMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy