/* * 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.private5g.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Determines the duration and renewal status of the commitment period for a radio unit. *

*

* For pricing, see Amazon Web Services Private 5G Pricing. *

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

* Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year * after your current commitment period expires. *

*

* Set to True, if you want your commitment period to automatically renew. Set to False if * you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. *

*/ private Boolean automaticRenewal; /** *

* The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period. *

*/ private String commitmentLength; /** *

* Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year * after your current commitment period expires. *

*

* Set to True, if you want your commitment period to automatically renew. Set to False if * you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. *

* * @param automaticRenewal * Determines whether the commitment period for a radio unit is set to automatically renew for an additional * 1 year after your current commitment period expires.

*

* Set to True, if you want your commitment period to automatically renew. Set to * False if you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. */ public void setAutomaticRenewal(Boolean automaticRenewal) { this.automaticRenewal = automaticRenewal; } /** *

* Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year * after your current commitment period expires. *

*

* Set to True, if you want your commitment period to automatically renew. Set to False if * you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. *

* * @return Determines whether the commitment period for a radio unit is set to automatically renew for an additional * 1 year after your current commitment period expires.

*

* Set to True, if you want your commitment period to automatically renew. Set to * False if you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. */ public Boolean getAutomaticRenewal() { return this.automaticRenewal; } /** *

* Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year * after your current commitment period expires. *

*

* Set to True, if you want your commitment period to automatically renew. Set to False if * you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. *

* * @param automaticRenewal * Determines whether the commitment period for a radio unit is set to automatically renew for an additional * 1 year after your current commitment period expires.

*

* Set to True, if you want your commitment period to automatically renew. Set to * False if you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. * @return Returns a reference to this object so that method calls can be chained together. */ public CommitmentConfiguration withAutomaticRenewal(Boolean automaticRenewal) { setAutomaticRenewal(automaticRenewal); return this; } /** *

* Determines whether the commitment period for a radio unit is set to automatically renew for an additional 1 year * after your current commitment period expires. *

*

* Set to True, if you want your commitment period to automatically renew. Set to False if * you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. *

* * @return Determines whether the commitment period for a radio unit is set to automatically renew for an additional * 1 year after your current commitment period expires.

*

* Set to True, if you want your commitment period to automatically renew. Set to * False if you do not want your commitment to automatically renew. *

*

* You can do the following: *

* *

* You cannot use the automatic-renewal option for a 60-day commitment. */ public Boolean isAutomaticRenewal() { return this.automaticRenewal; } /** *

* The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period. *

* * @param commitmentLength * The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year * period. * @see CommitmentLength */ public void setCommitmentLength(String commitmentLength) { this.commitmentLength = commitmentLength; } /** *

* The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period. *

* * @return The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year * period. * @see CommitmentLength */ public String getCommitmentLength() { return this.commitmentLength; } /** *

* The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period. *

* * @param commitmentLength * The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year * period. * @return Returns a reference to this object so that method calls can be chained together. * @see CommitmentLength */ public CommitmentConfiguration withCommitmentLength(String commitmentLength) { setCommitmentLength(commitmentLength); return this; } /** *

* The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year period. *

* * @param commitmentLength * The duration of the commitment period for the radio unit. You can choose a 60-day, 1-year, or 3-year * period. * @return Returns a reference to this object so that method calls can be chained together. * @see CommitmentLength */ public CommitmentConfiguration withCommitmentLength(CommitmentLength commitmentLength) { this.commitmentLength = commitmentLength.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 (getAutomaticRenewal() != null) sb.append("AutomaticRenewal: ").append(getAutomaticRenewal()).append(","); if (getCommitmentLength() != null) sb.append("CommitmentLength: ").append(getCommitmentLength()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CommitmentConfiguration == false) return false; CommitmentConfiguration other = (CommitmentConfiguration) obj; if (other.getAutomaticRenewal() == null ^ this.getAutomaticRenewal() == null) return false; if (other.getAutomaticRenewal() != null && other.getAutomaticRenewal().equals(this.getAutomaticRenewal()) == false) return false; if (other.getCommitmentLength() == null ^ this.getCommitmentLength() == null) return false; if (other.getCommitmentLength() != null && other.getCommitmentLength().equals(this.getCommitmentLength()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutomaticRenewal() == null) ? 0 : getAutomaticRenewal().hashCode()); hashCode = prime * hashCode + ((getCommitmentLength() == null) ? 0 : getCommitmentLength().hashCode()); return hashCode; } @Override public CommitmentConfiguration clone() { try { return (CommitmentConfiguration) 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.private5g.model.transform.CommitmentConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }