com.amazonaws.services.apprunner.model.VpcDNSTarget Maven / Gradle / Ivy
Show all versions of aws-java-sdk-apprunner Show documentation
/*
* Copyright 2019-2024 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.apprunner.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* DNS Target record for a custom domain of this Amazon VPC.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VpcDNSTarget implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*
*/
private String vpcIngressConnectionArn;
/**
*
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*
*/
private String vpcId;
/**
*
* The domain name of your target DNS that is associated with the Amazon VPC.
*
*/
private String domainName;
/**
*
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*
*
* @param vpcIngressConnectionArn
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*/
public void setVpcIngressConnectionArn(String vpcIngressConnectionArn) {
this.vpcIngressConnectionArn = vpcIngressConnectionArn;
}
/**
*
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*
*
* @return The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*/
public String getVpcIngressConnectionArn() {
return this.vpcIngressConnectionArn;
}
/**
*
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
*
*
* @param vpcIngressConnectionArn
* The Amazon Resource Name (ARN) of the VPC Ingress Connection that is associated with your service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcDNSTarget withVpcIngressConnectionArn(String vpcIngressConnectionArn) {
setVpcIngressConnectionArn(vpcIngressConnectionArn);
return this;
}
/**
*
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*
*
* @param vpcId
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*/
public void setVpcId(String vpcId) {
this.vpcId = vpcId;
}
/**
*
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*
*
* @return The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*/
public String getVpcId() {
return this.vpcId;
}
/**
*
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
*
*
* @param vpcId
* The ID of the Amazon VPC that is associated with the custom domain name of the target DNS.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcDNSTarget withVpcId(String vpcId) {
setVpcId(vpcId);
return this;
}
/**
*
* The domain name of your target DNS that is associated with the Amazon VPC.
*
*
* @param domainName
* The domain name of your target DNS that is associated with the Amazon VPC.
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* The domain name of your target DNS that is associated with the Amazon VPC.
*
*
* @return The domain name of your target DNS that is associated with the Amazon VPC.
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* The domain name of your target DNS that is associated with the Amazon VPC.
*
*
* @param domainName
* The domain name of your target DNS that is associated with the Amazon VPC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpcDNSTarget withDomainName(String domainName) {
setDomainName(domainName);
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 (getVpcIngressConnectionArn() != null)
sb.append("VpcIngressConnectionArn: ").append(getVpcIngressConnectionArn()).append(",");
if (getVpcId() != null)
sb.append("VpcId: ").append(getVpcId()).append(",");
if (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VpcDNSTarget == false)
return false;
VpcDNSTarget other = (VpcDNSTarget) obj;
if (other.getVpcIngressConnectionArn() == null ^ this.getVpcIngressConnectionArn() == null)
return false;
if (other.getVpcIngressConnectionArn() != null && other.getVpcIngressConnectionArn().equals(this.getVpcIngressConnectionArn()) == false)
return false;
if (other.getVpcId() == null ^ this.getVpcId() == null)
return false;
if (other.getVpcId() != null && other.getVpcId().equals(this.getVpcId()) == false)
return false;
if (other.getDomainName() == null ^ this.getDomainName() == null)
return false;
if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVpcIngressConnectionArn() == null) ? 0 : getVpcIngressConnectionArn().hashCode());
hashCode = prime * hashCode + ((getVpcId() == null) ? 0 : getVpcId().hashCode());
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
return hashCode;
}
@Override
public VpcDNSTarget clone() {
try {
return (VpcDNSTarget) 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.apprunner.model.transform.VpcDNSTargetMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}