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

com.amazonaws.services.eks.model.EksAnywhereSubscription Maven / Gradle / Ivy

/*
 * 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.eks.model;

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

/**
 * 

* An EKS Anywhere subscription authorizing the customer to support for licensed clusters and access to EKS Anywhere * Curated Packages. *

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

* UUID identifying a subscription. *

*/ private String id; /** *

* The Amazon Resource Name (ARN) for the subscription. *

*/ private String arn; /** *

* The Unix timestamp in seconds for when the subscription was created. *

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

* The Unix timestamp in seconds for when the subscription is effective. *

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

* The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto renew * configuration of the subscription object. *

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

* The number of licenses included in a subscription. Valid values are between 1 and 100. *

*/ private Integer licenseQuantity; /** *

* The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each * license covers support for a single EKS Anywhere cluster. *

*/ private String licenseType; /** *

* An EksAnywhereSubscriptionTerm object. *

*/ private EksAnywhereSubscriptionTerm term; /** *

* The status of a subscription. *

*/ private String status; /** *

* A boolean indicating whether or not a subscription will auto renew when it expires. *

*/ private Boolean autoRenew; /** *

* Amazon Web Services License Manager ARN associated with the subscription. *

*/ private java.util.List licenseArns; /** *

* The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an * optional value. Subscription tags do not propagate to any other resources associated with the subscription. *

*/ private java.util.Map tags; /** *

* UUID identifying a subscription. *

* * @param id * UUID identifying a subscription. */ public void setId(String id) { this.id = id; } /** *

* UUID identifying a subscription. *

* * @return UUID identifying a subscription. */ public String getId() { return this.id; } /** *

* UUID identifying a subscription. *

* * @param id * UUID identifying a subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withId(String id) { setId(id); return this; } /** *

* The Amazon Resource Name (ARN) for the subscription. *

* * @param arn * The Amazon Resource Name (ARN) for the subscription. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) for the subscription. *

* * @return The Amazon Resource Name (ARN) for the subscription. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) for the subscription. *

* * @param arn * The Amazon Resource Name (ARN) for the subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withArn(String arn) { setArn(arn); return this; } /** *

* The Unix timestamp in seconds for when the subscription was created. *

* * @param createdAt * The Unix timestamp in seconds for when the subscription was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The Unix timestamp in seconds for when the subscription was created. *

* * @return The Unix timestamp in seconds for when the subscription was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The Unix timestamp in seconds for when the subscription was created. *

* * @param createdAt * The Unix timestamp in seconds for when the subscription was created. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The Unix timestamp in seconds for when the subscription is effective. *

* * @param effectiveDate * The Unix timestamp in seconds for when the subscription is effective. */ public void setEffectiveDate(java.util.Date effectiveDate) { this.effectiveDate = effectiveDate; } /** *

* The Unix timestamp in seconds for when the subscription is effective. *

* * @return The Unix timestamp in seconds for when the subscription is effective. */ public java.util.Date getEffectiveDate() { return this.effectiveDate; } /** *

* The Unix timestamp in seconds for when the subscription is effective. *

* * @param effectiveDate * The Unix timestamp in seconds for when the subscription is effective. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withEffectiveDate(java.util.Date effectiveDate) { setEffectiveDate(effectiveDate); return this; } /** *

* The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto renew * configuration of the subscription object. *

* * @param expirationDate * The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto * renew configuration of the subscription object. */ public void setExpirationDate(java.util.Date expirationDate) { this.expirationDate = expirationDate; } /** *

* The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto renew * configuration of the subscription object. *

* * @return The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto * renew configuration of the subscription object. */ public java.util.Date getExpirationDate() { return this.expirationDate; } /** *

* The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto renew * configuration of the subscription object. *

* * @param expirationDate * The Unix timestamp in seconds for when the subscription will expire or auto renew, depending on the auto * renew configuration of the subscription object. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withExpirationDate(java.util.Date expirationDate) { setExpirationDate(expirationDate); return this; } /** *

* The number of licenses included in a subscription. Valid values are between 1 and 100. *

* * @param licenseQuantity * The number of licenses included in a subscription. Valid values are between 1 and 100. */ public void setLicenseQuantity(Integer licenseQuantity) { this.licenseQuantity = licenseQuantity; } /** *

* The number of licenses included in a subscription. Valid values are between 1 and 100. *

* * @return The number of licenses included in a subscription. Valid values are between 1 and 100. */ public Integer getLicenseQuantity() { return this.licenseQuantity; } /** *

* The number of licenses included in a subscription. Valid values are between 1 and 100. *

* * @param licenseQuantity * The number of licenses included in a subscription. Valid values are between 1 and 100. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withLicenseQuantity(Integer licenseQuantity) { setLicenseQuantity(licenseQuantity); return this; } /** *

* The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each * license covers support for a single EKS Anywhere cluster. *

* * @param licenseType * The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, * each license covers support for a single EKS Anywhere cluster. * @see EksAnywhereSubscriptionLicenseType */ public void setLicenseType(String licenseType) { this.licenseType = licenseType; } /** *

* The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each * license covers support for a single EKS Anywhere cluster. *

* * @return The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, * each license covers support for a single EKS Anywhere cluster. * @see EksAnywhereSubscriptionLicenseType */ public String getLicenseType() { return this.licenseType; } /** *

* The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each * license covers support for a single EKS Anywhere cluster. *

* * @param licenseType * The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, * each license covers support for a single EKS Anywhere cluster. * @return Returns a reference to this object so that method calls can be chained together. * @see EksAnywhereSubscriptionLicenseType */ public EksAnywhereSubscription withLicenseType(String licenseType) { setLicenseType(licenseType); return this; } /** *

* The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, each * license covers support for a single EKS Anywhere cluster. *

* * @param licenseType * The type of licenses included in the subscription. Valid value is CLUSTER. With the CLUSTER license type, * each license covers support for a single EKS Anywhere cluster. * @return Returns a reference to this object so that method calls can be chained together. * @see EksAnywhereSubscriptionLicenseType */ public EksAnywhereSubscription withLicenseType(EksAnywhereSubscriptionLicenseType licenseType) { this.licenseType = licenseType.toString(); return this; } /** *

* An EksAnywhereSubscriptionTerm object. *

* * @param term * An EksAnywhereSubscriptionTerm object. */ public void setTerm(EksAnywhereSubscriptionTerm term) { this.term = term; } /** *

* An EksAnywhereSubscriptionTerm object. *

* * @return An EksAnywhereSubscriptionTerm object. */ public EksAnywhereSubscriptionTerm getTerm() { return this.term; } /** *

* An EksAnywhereSubscriptionTerm object. *

* * @param term * An EksAnywhereSubscriptionTerm object. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withTerm(EksAnywhereSubscriptionTerm term) { setTerm(term); return this; } /** *

* The status of a subscription. *

* * @param status * The status of a subscription. */ public void setStatus(String status) { this.status = status; } /** *

* The status of a subscription. *

* * @return The status of a subscription. */ public String getStatus() { return this.status; } /** *

* The status of a subscription. *

* * @param status * The status of a subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withStatus(String status) { setStatus(status); return this; } /** *

* A boolean indicating whether or not a subscription will auto renew when it expires. *

* * @param autoRenew * A boolean indicating whether or not a subscription will auto renew when it expires. */ public void setAutoRenew(Boolean autoRenew) { this.autoRenew = autoRenew; } /** *

* A boolean indicating whether or not a subscription will auto renew when it expires. *

* * @return A boolean indicating whether or not a subscription will auto renew when it expires. */ public Boolean getAutoRenew() { return this.autoRenew; } /** *

* A boolean indicating whether or not a subscription will auto renew when it expires. *

* * @param autoRenew * A boolean indicating whether or not a subscription will auto renew when it expires. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withAutoRenew(Boolean autoRenew) { setAutoRenew(autoRenew); return this; } /** *

* A boolean indicating whether or not a subscription will auto renew when it expires. *

* * @return A boolean indicating whether or not a subscription will auto renew when it expires. */ public Boolean isAutoRenew() { return this.autoRenew; } /** *

* Amazon Web Services License Manager ARN associated with the subscription. *

* * @return Amazon Web Services License Manager ARN associated with the subscription. */ public java.util.List getLicenseArns() { return licenseArns; } /** *

* Amazon Web Services License Manager ARN associated with the subscription. *

* * @param licenseArns * Amazon Web Services License Manager ARN associated with the subscription. */ public void setLicenseArns(java.util.Collection licenseArns) { if (licenseArns == null) { this.licenseArns = null; return; } this.licenseArns = new java.util.ArrayList(licenseArns); } /** *

* Amazon Web Services License Manager ARN associated with the subscription. *

*

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

* * @param licenseArns * Amazon Web Services License Manager ARN associated with the subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withLicenseArns(String... licenseArns) { if (this.licenseArns == null) { setLicenseArns(new java.util.ArrayList(licenseArns.length)); } for (String ele : licenseArns) { this.licenseArns.add(ele); } return this; } /** *

* Amazon Web Services License Manager ARN associated with the subscription. *

* * @param licenseArns * Amazon Web Services License Manager ARN associated with the subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withLicenseArns(java.util.Collection licenseArns) { setLicenseArns(licenseArns); return this; } /** *

* The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an * optional value. Subscription tags do not propagate to any other resources associated with the subscription. *

* * @return The metadata for a subscription to assist with categorization and organization. Each tag consists of a * key and an optional value. Subscription tags do not propagate to any other resources associated with the * subscription. */ public java.util.Map getTags() { return tags; } /** *

* The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an * optional value. Subscription tags do not propagate to any other resources associated with the subscription. *

* * @param tags * The metadata for a subscription to assist with categorization and organization. Each tag consists of a key * and an optional value. Subscription tags do not propagate to any other resources associated with the * subscription. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The metadata for a subscription to assist with categorization and organization. Each tag consists of a key and an * optional value. Subscription tags do not propagate to any other resources associated with the subscription. *

* * @param tags * The metadata for a subscription to assist with categorization and organization. Each tag consists of a key * and an optional value. Subscription tags do not propagate to any other resources associated with the * subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see EksAnywhereSubscription#withTags * @returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public EksAnywhereSubscription clearTagsEntries() { this.tags = null; 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 (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getEffectiveDate() != null) sb.append("EffectiveDate: ").append(getEffectiveDate()).append(","); if (getExpirationDate() != null) sb.append("ExpirationDate: ").append(getExpirationDate()).append(","); if (getLicenseQuantity() != null) sb.append("LicenseQuantity: ").append(getLicenseQuantity()).append(","); if (getLicenseType() != null) sb.append("LicenseType: ").append(getLicenseType()).append(","); if (getTerm() != null) sb.append("Term: ").append(getTerm()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getAutoRenew() != null) sb.append("AutoRenew: ").append(getAutoRenew()).append(","); if (getLicenseArns() != null) sb.append("LicenseArns: ").append(getLicenseArns()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EksAnywhereSubscription == false) return false; EksAnywhereSubscription other = (EksAnywhereSubscription) 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.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getEffectiveDate() == null ^ this.getEffectiveDate() == null) return false; if (other.getEffectiveDate() != null && other.getEffectiveDate().equals(this.getEffectiveDate()) == false) return false; if (other.getExpirationDate() == null ^ this.getExpirationDate() == null) return false; if (other.getExpirationDate() != null && other.getExpirationDate().equals(this.getExpirationDate()) == false) return false; if (other.getLicenseQuantity() == null ^ this.getLicenseQuantity() == null) return false; if (other.getLicenseQuantity() != null && other.getLicenseQuantity().equals(this.getLicenseQuantity()) == false) return false; if (other.getLicenseType() == null ^ this.getLicenseType() == null) return false; if (other.getLicenseType() != null && other.getLicenseType().equals(this.getLicenseType()) == false) return false; if (other.getTerm() == null ^ this.getTerm() == null) return false; if (other.getTerm() != null && other.getTerm().equals(this.getTerm()) == 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.getAutoRenew() == null ^ this.getAutoRenew() == null) return false; if (other.getAutoRenew() != null && other.getAutoRenew().equals(this.getAutoRenew()) == false) return false; if (other.getLicenseArns() == null ^ this.getLicenseArns() == null) return false; if (other.getLicenseArns() != null && other.getLicenseArns().equals(this.getLicenseArns()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode()); hashCode = prime * hashCode + ((getExpirationDate() == null) ? 0 : getExpirationDate().hashCode()); hashCode = prime * hashCode + ((getLicenseQuantity() == null) ? 0 : getLicenseQuantity().hashCode()); hashCode = prime * hashCode + ((getLicenseType() == null) ? 0 : getLicenseType().hashCode()); hashCode = prime * hashCode + ((getTerm() == null) ? 0 : getTerm().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getAutoRenew() == null) ? 0 : getAutoRenew().hashCode()); hashCode = prime * hashCode + ((getLicenseArns() == null) ? 0 : getLicenseArns().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public EksAnywhereSubscription clone() { try { return (EksAnywhereSubscription) 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.eks.model.transform.EksAnywhereSubscriptionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy