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

com.amazonaws.services.ecs.model.ServiceRegistry Maven / Gradle / Ivy

Go to download

The AWS Java SDK for the Amazon EC2 Container Service holds the client classes that are used for communicating with the Amazon EC2 Container Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.ecs.model;

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

/**
 * 

* Details of the service registry. *

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

* The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud * Map. For more information, see CreateService. *

*/ private String registryArn; /** *

* The port value used if your service discovery service specified an SRV record. This field may be used if both the * awsvpc network mode and SRV records are used. *

*/ private Integer port; /** *

* The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and containerPort * combination from the task definition. If the task definition that your service task specifies uses the * awsvpc network mode and a type SRV DNS record is used, you must specify either a * containerName and containerPort combination or a port value, but not both. *

*/ private String containerName; /** *

* The port value, already specified in the task definition, to be used for your service discovery service. If the * task definition your service task specifies uses the bridge or host network mode, you * must specify a containerName and containerPort combination from the task definition. If * the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS * record is used, you must specify either a containerName and containerPort combination * or a port value, but not both. *

*/ private Integer containerPort; /** *

* The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud * Map. For more information, see CreateService. *

* * @param registryArn * The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS * Cloud Map. For more information, see CreateService. */ public void setRegistryArn(String registryArn) { this.registryArn = registryArn; } /** *

* The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud * Map. For more information, see CreateService. *

* * @return The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS * Cloud Map. For more information, see CreateService. */ public String getRegistryArn() { return this.registryArn; } /** *

* The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud * Map. For more information, see CreateService. *

* * @param registryArn * The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS * Cloud Map. For more information, see CreateService. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceRegistry withRegistryArn(String registryArn) { setRegistryArn(registryArn); return this; } /** *

* The port value used if your service discovery service specified an SRV record. This field may be used if both the * awsvpc network mode and SRV records are used. *

* * @param port * The port value used if your service discovery service specified an SRV record. This field may be used if * both the awsvpc network mode and SRV records are used. */ public void setPort(Integer port) { this.port = port; } /** *

* The port value used if your service discovery service specified an SRV record. This field may be used if both the * awsvpc network mode and SRV records are used. *

* * @return The port value used if your service discovery service specified an SRV record. This field may be used if * both the awsvpc network mode and SRV records are used. */ public Integer getPort() { return this.port; } /** *

* The port value used if your service discovery service specified an SRV record. This field may be used if both the * awsvpc network mode and SRV records are used. *

* * @param port * The port value used if your service discovery service specified an SRV record. This field may be used if * both the awsvpc network mode and SRV records are used. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceRegistry withPort(Integer port) { setPort(port); return this; } /** *

* The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and containerPort * combination from the task definition. If the task definition that your service task specifies uses the * awsvpc network mode and a type SRV DNS record is used, you must specify either a * containerName and containerPort combination or a port value, but not both. *

* * @param containerName * The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and * containerPort combination from the task definition. If the task definition that your service * task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must * specify either a containerName and containerPort combination or a * port value, but not both. */ public void setContainerName(String containerName) { this.containerName = containerName; } /** *

* The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and containerPort * combination from the task definition. If the task definition that your service task specifies uses the * awsvpc network mode and a type SRV DNS record is used, you must specify either a * containerName and containerPort combination or a port value, but not both. *

* * @return The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and * containerPort combination from the task definition. If the task definition that your service * task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must * specify either a containerName and containerPort combination or a * port value, but not both. */ public String getContainerName() { return this.containerName; } /** *

* The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and containerPort * combination from the task definition. If the task definition that your service task specifies uses the * awsvpc network mode and a type SRV DNS record is used, you must specify either a * containerName and containerPort combination or a port value, but not both. *

* * @param containerName * The container name value, already specified in the task definition, to be used for your service discovery * service. If the task definition that your service task specifies uses the bridge or * host network mode, you must specify a containerName and * containerPort combination from the task definition. If the task definition that your service * task specifies uses the awsvpc network mode and a type SRV DNS record is used, you must * specify either a containerName and containerPort combination or a * port value, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceRegistry withContainerName(String containerName) { setContainerName(containerName); return this; } /** *

* The port value, already specified in the task definition, to be used for your service discovery service. If the * task definition your service task specifies uses the bridge or host network mode, you * must specify a containerName and containerPort combination from the task definition. If * the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS * record is used, you must specify either a containerName and containerPort combination * or a port value, but not both. *

* * @param containerPort * The port value, already specified in the task definition, to be used for your service discovery service. * If the task definition your service task specifies uses the bridge or host * network mode, you must specify a containerName and containerPort combination * from the task definition. If the task definition your service task specifies uses the awsvpc * network mode and a type SRV DNS record is used, you must specify either a containerName and * containerPort combination or a port value, but not both. */ public void setContainerPort(Integer containerPort) { this.containerPort = containerPort; } /** *

* The port value, already specified in the task definition, to be used for your service discovery service. If the * task definition your service task specifies uses the bridge or host network mode, you * must specify a containerName and containerPort combination from the task definition. If * the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS * record is used, you must specify either a containerName and containerPort combination * or a port value, but not both. *

* * @return The port value, already specified in the task definition, to be used for your service discovery service. * If the task definition your service task specifies uses the bridge or host * network mode, you must specify a containerName and containerPort combination * from the task definition. If the task definition your service task specifies uses the awsvpc * network mode and a type SRV DNS record is used, you must specify either a containerName and * containerPort combination or a port value, but not both. */ public Integer getContainerPort() { return this.containerPort; } /** *

* The port value, already specified in the task definition, to be used for your service discovery service. If the * task definition your service task specifies uses the bridge or host network mode, you * must specify a containerName and containerPort combination from the task definition. If * the task definition your service task specifies uses the awsvpc network mode and a type SRV DNS * record is used, you must specify either a containerName and containerPort combination * or a port value, but not both. *

* * @param containerPort * The port value, already specified in the task definition, to be used for your service discovery service. * If the task definition your service task specifies uses the bridge or host * network mode, you must specify a containerName and containerPort combination * from the task definition. If the task definition your service task specifies uses the awsvpc * network mode and a type SRV DNS record is used, you must specify either a containerName and * containerPort combination or a port value, but not both. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceRegistry withContainerPort(Integer containerPort) { setContainerPort(containerPort); 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 (getRegistryArn() != null) sb.append("RegistryArn: ").append(getRegistryArn()).append(","); if (getPort() != null) sb.append("Port: ").append(getPort()).append(","); if (getContainerName() != null) sb.append("ContainerName: ").append(getContainerName()).append(","); if (getContainerPort() != null) sb.append("ContainerPort: ").append(getContainerPort()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceRegistry == false) return false; ServiceRegistry other = (ServiceRegistry) obj; if (other.getRegistryArn() == null ^ this.getRegistryArn() == null) return false; if (other.getRegistryArn() != null && other.getRegistryArn().equals(this.getRegistryArn()) == false) return false; if (other.getPort() == null ^ this.getPort() == null) return false; if (other.getPort() != null && other.getPort().equals(this.getPort()) == false) return false; if (other.getContainerName() == null ^ this.getContainerName() == null) return false; if (other.getContainerName() != null && other.getContainerName().equals(this.getContainerName()) == false) return false; if (other.getContainerPort() == null ^ this.getContainerPort() == null) return false; if (other.getContainerPort() != null && other.getContainerPort().equals(this.getContainerPort()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRegistryArn() == null) ? 0 : getRegistryArn().hashCode()); hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); hashCode = prime * hashCode + ((getContainerName() == null) ? 0 : getContainerName().hashCode()); hashCode = prime * hashCode + ((getContainerPort() == null) ? 0 : getContainerPort().hashCode()); return hashCode; } @Override public ServiceRegistry clone() { try { return (ServiceRegistry) 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.ecs.model.transform.ServiceRegistryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy