
com.amazonaws.services.route53resolver.model.UpdateIpAddress Maven / Gradle / Ivy
/*
* Copyright 2018-2023 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.route53resolver.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides information about the IP address type in response to UpdateResolverEndpoint.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateIpAddress implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the IP address, specified by the ResolverEndpointId
.
*
*/
private String ipId;
/**
*
* The IPv6 address that you want to use for DNS queries.
*
*/
private String ipv6;
/**
*
* The ID of the IP address, specified by the ResolverEndpointId
.
*
*
* @param ipId
* The ID of the IP address, specified by the ResolverEndpointId
.
*/
public void setIpId(String ipId) {
this.ipId = ipId;
}
/**
*
* The ID of the IP address, specified by the ResolverEndpointId
.
*
*
* @return The ID of the IP address, specified by the ResolverEndpointId
.
*/
public String getIpId() {
return this.ipId;
}
/**
*
* The ID of the IP address, specified by the ResolverEndpointId
.
*
*
* @param ipId
* The ID of the IP address, specified by the ResolverEndpointId
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateIpAddress withIpId(String ipId) {
setIpId(ipId);
return this;
}
/**
*
* The IPv6 address that you want to use for DNS queries.
*
*
* @param ipv6
* The IPv6 address that you want to use for DNS queries.
*/
public void setIpv6(String ipv6) {
this.ipv6 = ipv6;
}
/**
*
* The IPv6 address that you want to use for DNS queries.
*
*
* @return The IPv6 address that you want to use for DNS queries.
*/
public String getIpv6() {
return this.ipv6;
}
/**
*
* The IPv6 address that you want to use for DNS queries.
*
*
* @param ipv6
* The IPv6 address that you want to use for DNS queries.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateIpAddress withIpv6(String ipv6) {
setIpv6(ipv6);
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 (getIpId() != null)
sb.append("IpId: ").append(getIpId()).append(",");
if (getIpv6() != null)
sb.append("Ipv6: ").append(getIpv6());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateIpAddress == false)
return false;
UpdateIpAddress other = (UpdateIpAddress) obj;
if (other.getIpId() == null ^ this.getIpId() == null)
return false;
if (other.getIpId() != null && other.getIpId().equals(this.getIpId()) == false)
return false;
if (other.getIpv6() == null ^ this.getIpv6() == null)
return false;
if (other.getIpv6() != null && other.getIpv6().equals(this.getIpv6()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIpId() == null) ? 0 : getIpId().hashCode());
hashCode = prime * hashCode + ((getIpv6() == null) ? 0 : getIpv6().hashCode());
return hashCode;
}
@Override
public UpdateIpAddress clone() {
try {
return (UpdateIpAddress) 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.route53resolver.model.transform.UpdateIpAddressMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy