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

com.amazonaws.services.ec2.model.IpamExternalResourceVerificationToken Maven / Gradle / Ivy

Go to download

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

The newest version!
/*
 * 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.ec2.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* A verification token is an Amazon Web Services-generated random value that you can use to prove ownership of an * external resource. For example, you can use a verification token to validate that you control a public IP address * range when you bring an IP address range to Amazon Web Services (BYOIP). *

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

* The ID of the token. *

*/ private String ipamExternalResourceVerificationTokenId; /** *

* Token ARN. *

*/ private String ipamExternalResourceVerificationTokenArn; /** *

* The ID of the IPAM that created the token. *

*/ private String ipamId; /** *

* ARN of the IPAM that created the token. *

*/ private String ipamArn; /** *

* Region of the IPAM that created the token. *

*/ private String ipamRegion; /** *

* Token value. *

*/ private String tokenValue; /** *

* Token name. *

*/ private String tokenName; /** *

* Token expiration. *

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

* Token status. *

*/ private String status; /** *

* Token tags. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* Token state. *

*/ private String state; /** *

* The ID of the token. *

* * @param ipamExternalResourceVerificationTokenId * The ID of the token. */ public void setIpamExternalResourceVerificationTokenId(String ipamExternalResourceVerificationTokenId) { this.ipamExternalResourceVerificationTokenId = ipamExternalResourceVerificationTokenId; } /** *

* The ID of the token. *

* * @return The ID of the token. */ public String getIpamExternalResourceVerificationTokenId() { return this.ipamExternalResourceVerificationTokenId; } /** *

* The ID of the token. *

* * @param ipamExternalResourceVerificationTokenId * The ID of the token. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withIpamExternalResourceVerificationTokenId(String ipamExternalResourceVerificationTokenId) { setIpamExternalResourceVerificationTokenId(ipamExternalResourceVerificationTokenId); return this; } /** *

* Token ARN. *

* * @param ipamExternalResourceVerificationTokenArn * Token ARN. */ public void setIpamExternalResourceVerificationTokenArn(String ipamExternalResourceVerificationTokenArn) { this.ipamExternalResourceVerificationTokenArn = ipamExternalResourceVerificationTokenArn; } /** *

* Token ARN. *

* * @return Token ARN. */ public String getIpamExternalResourceVerificationTokenArn() { return this.ipamExternalResourceVerificationTokenArn; } /** *

* Token ARN. *

* * @param ipamExternalResourceVerificationTokenArn * Token ARN. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withIpamExternalResourceVerificationTokenArn(String ipamExternalResourceVerificationTokenArn) { setIpamExternalResourceVerificationTokenArn(ipamExternalResourceVerificationTokenArn); return this; } /** *

* The ID of the IPAM that created the token. *

* * @param ipamId * The ID of the IPAM that created the token. */ public void setIpamId(String ipamId) { this.ipamId = ipamId; } /** *

* The ID of the IPAM that created the token. *

* * @return The ID of the IPAM that created the token. */ public String getIpamId() { return this.ipamId; } /** *

* The ID of the IPAM that created the token. *

* * @param ipamId * The ID of the IPAM that created the token. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withIpamId(String ipamId) { setIpamId(ipamId); return this; } /** *

* ARN of the IPAM that created the token. *

* * @param ipamArn * ARN of the IPAM that created the token. */ public void setIpamArn(String ipamArn) { this.ipamArn = ipamArn; } /** *

* ARN of the IPAM that created the token. *

* * @return ARN of the IPAM that created the token. */ public String getIpamArn() { return this.ipamArn; } /** *

* ARN of the IPAM that created the token. *

* * @param ipamArn * ARN of the IPAM that created the token. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withIpamArn(String ipamArn) { setIpamArn(ipamArn); return this; } /** *

* Region of the IPAM that created the token. *

* * @param ipamRegion * Region of the IPAM that created the token. */ public void setIpamRegion(String ipamRegion) { this.ipamRegion = ipamRegion; } /** *

* Region of the IPAM that created the token. *

* * @return Region of the IPAM that created the token. */ public String getIpamRegion() { return this.ipamRegion; } /** *

* Region of the IPAM that created the token. *

* * @param ipamRegion * Region of the IPAM that created the token. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withIpamRegion(String ipamRegion) { setIpamRegion(ipamRegion); return this; } /** *

* Token value. *

* * @param tokenValue * Token value. */ public void setTokenValue(String tokenValue) { this.tokenValue = tokenValue; } /** *

* Token value. *

* * @return Token value. */ public String getTokenValue() { return this.tokenValue; } /** *

* Token value. *

* * @param tokenValue * Token value. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withTokenValue(String tokenValue) { setTokenValue(tokenValue); return this; } /** *

* Token name. *

* * @param tokenName * Token name. */ public void setTokenName(String tokenName) { this.tokenName = tokenName; } /** *

* Token name. *

* * @return Token name. */ public String getTokenName() { return this.tokenName; } /** *

* Token name. *

* * @param tokenName * Token name. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withTokenName(String tokenName) { setTokenName(tokenName); return this; } /** *

* Token expiration. *

* * @param notAfter * Token expiration. */ public void setNotAfter(java.util.Date notAfter) { this.notAfter = notAfter; } /** *

* Token expiration. *

* * @return Token expiration. */ public java.util.Date getNotAfter() { return this.notAfter; } /** *

* Token expiration. *

* * @param notAfter * Token expiration. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withNotAfter(java.util.Date notAfter) { setNotAfter(notAfter); return this; } /** *

* Token status. *

* * @param status * Token status. * @see TokenState */ public void setStatus(String status) { this.status = status; } /** *

* Token status. *

* * @return Token status. * @see TokenState */ public String getStatus() { return this.status; } /** *

* Token status. *

* * @param status * Token status. * @return Returns a reference to this object so that method calls can be chained together. * @see TokenState */ public IpamExternalResourceVerificationToken withStatus(String status) { setStatus(status); return this; } /** *

* Token status. *

* * @param status * Token status. * @return Returns a reference to this object so that method calls can be chained together. * @see TokenState */ public IpamExternalResourceVerificationToken withStatus(TokenState status) { this.status = status.toString(); return this; } /** *

* Token tags. *

* * @return Token tags. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* Token tags. *

* * @param tags * Token tags. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* Token tags. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *

* * @param tags * Token tags. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* Token tags. *

* * @param tags * Token tags. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamExternalResourceVerificationToken withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* Token state. *

* * @param state * Token state. * @see IpamExternalResourceVerificationTokenState */ public void setState(String state) { this.state = state; } /** *

* Token state. *

* * @return Token state. * @see IpamExternalResourceVerificationTokenState */ public String getState() { return this.state; } /** *

* Token state. *

* * @param state * Token state. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamExternalResourceVerificationTokenState */ public IpamExternalResourceVerificationToken withState(String state) { setState(state); return this; } /** *

* Token state. *

* * @param state * Token state. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamExternalResourceVerificationTokenState */ public IpamExternalResourceVerificationToken withState(IpamExternalResourceVerificationTokenState state) { this.state = state.toString(); 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 (getIpamExternalResourceVerificationTokenId() != null) sb.append("IpamExternalResourceVerificationTokenId: ").append(getIpamExternalResourceVerificationTokenId()).append(","); if (getIpamExternalResourceVerificationTokenArn() != null) sb.append("IpamExternalResourceVerificationTokenArn: ").append(getIpamExternalResourceVerificationTokenArn()).append(","); if (getIpamId() != null) sb.append("IpamId: ").append(getIpamId()).append(","); if (getIpamArn() != null) sb.append("IpamArn: ").append(getIpamArn()).append(","); if (getIpamRegion() != null) sb.append("IpamRegion: ").append(getIpamRegion()).append(","); if (getTokenValue() != null) sb.append("TokenValue: ").append(getTokenValue()).append(","); if (getTokenName() != null) sb.append("TokenName: ").append(getTokenName()).append(","); if (getNotAfter() != null) sb.append("NotAfter: ").append(getNotAfter()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getState() != null) sb.append("State: ").append(getState()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof IpamExternalResourceVerificationToken == false) return false; IpamExternalResourceVerificationToken other = (IpamExternalResourceVerificationToken) obj; if (other.getIpamExternalResourceVerificationTokenId() == null ^ this.getIpamExternalResourceVerificationTokenId() == null) return false; if (other.getIpamExternalResourceVerificationTokenId() != null && other.getIpamExternalResourceVerificationTokenId().equals(this.getIpamExternalResourceVerificationTokenId()) == false) return false; if (other.getIpamExternalResourceVerificationTokenArn() == null ^ this.getIpamExternalResourceVerificationTokenArn() == null) return false; if (other.getIpamExternalResourceVerificationTokenArn() != null && other.getIpamExternalResourceVerificationTokenArn().equals(this.getIpamExternalResourceVerificationTokenArn()) == false) return false; if (other.getIpamId() == null ^ this.getIpamId() == null) return false; if (other.getIpamId() != null && other.getIpamId().equals(this.getIpamId()) == false) return false; if (other.getIpamArn() == null ^ this.getIpamArn() == null) return false; if (other.getIpamArn() != null && other.getIpamArn().equals(this.getIpamArn()) == false) return false; if (other.getIpamRegion() == null ^ this.getIpamRegion() == null) return false; if (other.getIpamRegion() != null && other.getIpamRegion().equals(this.getIpamRegion()) == false) return false; if (other.getTokenValue() == null ^ this.getTokenValue() == null) return false; if (other.getTokenValue() != null && other.getTokenValue().equals(this.getTokenValue()) == false) return false; if (other.getTokenName() == null ^ this.getTokenName() == null) return false; if (other.getTokenName() != null && other.getTokenName().equals(this.getTokenName()) == false) return false; if (other.getNotAfter() == null ^ this.getNotAfter() == null) return false; if (other.getNotAfter() != null && other.getNotAfter().equals(this.getNotAfter()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIpamExternalResourceVerificationTokenId() == null) ? 0 : getIpamExternalResourceVerificationTokenId().hashCode()); hashCode = prime * hashCode + ((getIpamExternalResourceVerificationTokenArn() == null) ? 0 : getIpamExternalResourceVerificationTokenArn().hashCode()); hashCode = prime * hashCode + ((getIpamId() == null) ? 0 : getIpamId().hashCode()); hashCode = prime * hashCode + ((getIpamArn() == null) ? 0 : getIpamArn().hashCode()); hashCode = prime * hashCode + ((getIpamRegion() == null) ? 0 : getIpamRegion().hashCode()); hashCode = prime * hashCode + ((getTokenValue() == null) ? 0 : getTokenValue().hashCode()); hashCode = prime * hashCode + ((getTokenName() == null) ? 0 : getTokenName().hashCode()); hashCode = prime * hashCode + ((getNotAfter() == null) ? 0 : getNotAfter().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); return hashCode; } @Override public IpamExternalResourceVerificationToken clone() { try { return (IpamExternalResourceVerificationToken) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy