/* * 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.licensemanager.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateLicenseConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Amazon Resource Name (ARN) of the license configuration. *
*/ private String licenseConfigurationArn; /** ** New status of the license configuration. *
*/ private String licenseConfigurationStatus; /** ** New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. *
*/ private java.util.List* New number of licenses managed by the license configuration. *
*/ private Long licenseCount; /** ** New hard limit of the number of available licenses. *
*/ private Boolean licenseCountHardLimit; /** ** New name of the license configuration. *
*/ private String name; /** ** New description of the license configuration. *
*/ private String description; /** ** New product information. *
*/ private java.util.List* When true, disassociates a resource when software is uninstalled. *
*/ private Boolean disassociateWhenNotFound; /** ** Amazon Resource Name (ARN) of the license configuration. *
* * @param licenseConfigurationArn * Amazon Resource Name (ARN) of the license configuration. */ public void setLicenseConfigurationArn(String licenseConfigurationArn) { this.licenseConfigurationArn = licenseConfigurationArn; } /** ** Amazon Resource Name (ARN) of the license configuration. *
* * @return Amazon Resource Name (ARN) of the license configuration. */ public String getLicenseConfigurationArn() { return this.licenseConfigurationArn; } /** ** Amazon Resource Name (ARN) of the license configuration. *
* * @param licenseConfigurationArn * Amazon Resource Name (ARN) of the license configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withLicenseConfigurationArn(String licenseConfigurationArn) { setLicenseConfigurationArn(licenseConfigurationArn); return this; } /** ** New status of the license configuration. *
* * @param licenseConfigurationStatus * New status of the license configuration. * @see LicenseConfigurationStatus */ public void setLicenseConfigurationStatus(String licenseConfigurationStatus) { this.licenseConfigurationStatus = licenseConfigurationStatus; } /** ** New status of the license configuration. *
* * @return New status of the license configuration. * @see LicenseConfigurationStatus */ public String getLicenseConfigurationStatus() { return this.licenseConfigurationStatus; } /** ** New status of the license configuration. *
* * @param licenseConfigurationStatus * New status of the license configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see LicenseConfigurationStatus */ public UpdateLicenseConfigurationRequest withLicenseConfigurationStatus(String licenseConfigurationStatus) { setLicenseConfigurationStatus(licenseConfigurationStatus); return this; } /** ** New status of the license configuration. *
* * @param licenseConfigurationStatus * New status of the license configuration. * @return Returns a reference to this object so that method calls can be chained together. * @see LicenseConfigurationStatus */ public UpdateLicenseConfigurationRequest withLicenseConfigurationStatus(LicenseConfigurationStatus licenseConfigurationStatus) { this.licenseConfigurationStatus = licenseConfigurationStatus.toString(); return this; } /** ** New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. *
* * @return New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. */ public java.util.List* New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. *
* * @param licenseRules * New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. */ public void setLicenseRules(java.util.Collection* New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setLicenseRules(java.util.Collection)} or {@link #withLicenseRules(java.util.Collection)} if you want to * override the existing values. *
* * @param licenseRules * New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withLicenseRules(String... licenseRules) { if (this.licenseRules == null) { setLicenseRules(new java.util.ArrayList* New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. *
* * @param licenseRules * New license rule. The only rule that you can add after you create a license configuration is * licenseAffinityToHost. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withLicenseRules(java.util.Collection* New number of licenses managed by the license configuration. *
* * @param licenseCount * New number of licenses managed by the license configuration. */ public void setLicenseCount(Long licenseCount) { this.licenseCount = licenseCount; } /** ** New number of licenses managed by the license configuration. *
* * @return New number of licenses managed by the license configuration. */ public Long getLicenseCount() { return this.licenseCount; } /** ** New number of licenses managed by the license configuration. *
* * @param licenseCount * New number of licenses managed by the license configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withLicenseCount(Long licenseCount) { setLicenseCount(licenseCount); return this; } /** ** New hard limit of the number of available licenses. *
* * @param licenseCountHardLimit * New hard limit of the number of available licenses. */ public void setLicenseCountHardLimit(Boolean licenseCountHardLimit) { this.licenseCountHardLimit = licenseCountHardLimit; } /** ** New hard limit of the number of available licenses. *
* * @return New hard limit of the number of available licenses. */ public Boolean getLicenseCountHardLimit() { return this.licenseCountHardLimit; } /** ** New hard limit of the number of available licenses. *
* * @param licenseCountHardLimit * New hard limit of the number of available licenses. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withLicenseCountHardLimit(Boolean licenseCountHardLimit) { setLicenseCountHardLimit(licenseCountHardLimit); return this; } /** ** New hard limit of the number of available licenses. *
* * @return New hard limit of the number of available licenses. */ public Boolean isLicenseCountHardLimit() { return this.licenseCountHardLimit; } /** ** New name of the license configuration. *
* * @param name * New name of the license configuration. */ public void setName(String name) { this.name = name; } /** ** New name of the license configuration. *
* * @return New name of the license configuration. */ public String getName() { return this.name; } /** ** New name of the license configuration. *
* * @param name * New name of the license configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withName(String name) { setName(name); return this; } /** ** New description of the license configuration. *
* * @param description * New description of the license configuration. */ public void setDescription(String description) { this.description = description; } /** ** New description of the license configuration. *
* * @return New description of the license configuration. */ public String getDescription() { return this.description; } /** ** New description of the license configuration. *
* * @param description * New description of the license configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withDescription(String description) { setDescription(description); return this; } /** ** New product information. *
* * @return New product information. */ public java.util.List* New product information. *
* * @param productInformationList * New product information. */ public void setProductInformationList(java.util.Collection* New product information. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProductInformationList(java.util.Collection)} or * {@link #withProductInformationList(java.util.Collection)} if you want to override the existing values. *
* * @param productInformationList * New product information. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withProductInformationList(ProductInformation... productInformationList) { if (this.productInformationList == null) { setProductInformationList(new java.util.ArrayList* New product information. *
* * @param productInformationList * New product information. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withProductInformationList(java.util.Collection* When true, disassociates a resource when software is uninstalled. *
* * @param disassociateWhenNotFound * When true, disassociates a resource when software is uninstalled. */ public void setDisassociateWhenNotFound(Boolean disassociateWhenNotFound) { this.disassociateWhenNotFound = disassociateWhenNotFound; } /** ** When true, disassociates a resource when software is uninstalled. *
* * @return When true, disassociates a resource when software is uninstalled. */ public Boolean getDisassociateWhenNotFound() { return this.disassociateWhenNotFound; } /** ** When true, disassociates a resource when software is uninstalled. *
* * @param disassociateWhenNotFound * When true, disassociates a resource when software is uninstalled. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateLicenseConfigurationRequest withDisassociateWhenNotFound(Boolean disassociateWhenNotFound) { setDisassociateWhenNotFound(disassociateWhenNotFound); return this; } /** ** When true, disassociates a resource when software is uninstalled. *
* * @return When true, disassociates a resource when software is uninstalled. */ public Boolean isDisassociateWhenNotFound() { return this.disassociateWhenNotFound; } /** * 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 (getLicenseConfigurationArn() != null) sb.append("LicenseConfigurationArn: ").append(getLicenseConfigurationArn()).append(","); if (getLicenseConfigurationStatus() != null) sb.append("LicenseConfigurationStatus: ").append(getLicenseConfigurationStatus()).append(","); if (getLicenseRules() != null) sb.append("LicenseRules: ").append(getLicenseRules()).append(","); if (getLicenseCount() != null) sb.append("LicenseCount: ").append(getLicenseCount()).append(","); if (getLicenseCountHardLimit() != null) sb.append("LicenseCountHardLimit: ").append(getLicenseCountHardLimit()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getProductInformationList() != null) sb.append("ProductInformationList: ").append(getProductInformationList()).append(","); if (getDisassociateWhenNotFound() != null) sb.append("DisassociateWhenNotFound: ").append(getDisassociateWhenNotFound()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateLicenseConfigurationRequest == false) return false; UpdateLicenseConfigurationRequest other = (UpdateLicenseConfigurationRequest) obj; if (other.getLicenseConfigurationArn() == null ^ this.getLicenseConfigurationArn() == null) return false; if (other.getLicenseConfigurationArn() != null && other.getLicenseConfigurationArn().equals(this.getLicenseConfigurationArn()) == false) return false; if (other.getLicenseConfigurationStatus() == null ^ this.getLicenseConfigurationStatus() == null) return false; if (other.getLicenseConfigurationStatus() != null && other.getLicenseConfigurationStatus().equals(this.getLicenseConfigurationStatus()) == false) return false; if (other.getLicenseRules() == null ^ this.getLicenseRules() == null) return false; if (other.getLicenseRules() != null && other.getLicenseRules().equals(this.getLicenseRules()) == false) return false; if (other.getLicenseCount() == null ^ this.getLicenseCount() == null) return false; if (other.getLicenseCount() != null && other.getLicenseCount().equals(this.getLicenseCount()) == false) return false; if (other.getLicenseCountHardLimit() == null ^ this.getLicenseCountHardLimit() == null) return false; if (other.getLicenseCountHardLimit() != null && other.getLicenseCountHardLimit().equals(this.getLicenseCountHardLimit()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getProductInformationList() == null ^ this.getProductInformationList() == null) return false; if (other.getProductInformationList() != null && other.getProductInformationList().equals(this.getProductInformationList()) == false) return false; if (other.getDisassociateWhenNotFound() == null ^ this.getDisassociateWhenNotFound() == null) return false; if (other.getDisassociateWhenNotFound() != null && other.getDisassociateWhenNotFound().equals(this.getDisassociateWhenNotFound()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLicenseConfigurationArn() == null) ? 0 : getLicenseConfigurationArn().hashCode()); hashCode = prime * hashCode + ((getLicenseConfigurationStatus() == null) ? 0 : getLicenseConfigurationStatus().hashCode()); hashCode = prime * hashCode + ((getLicenseRules() == null) ? 0 : getLicenseRules().hashCode()); hashCode = prime * hashCode + ((getLicenseCount() == null) ? 0 : getLicenseCount().hashCode()); hashCode = prime * hashCode + ((getLicenseCountHardLimit() == null) ? 0 : getLicenseCountHardLimit().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getProductInformationList() == null) ? 0 : getProductInformationList().hashCode()); hashCode = prime * hashCode + ((getDisassociateWhenNotFound() == null) ? 0 : getDisassociateWhenNotFound().hashCode()); return hashCode; } @Override public UpdateLicenseConfigurationRequest clone() { return (UpdateLicenseConfigurationRequest) super.clone(); } }