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

* Contains information about the ACM certificates and code signing configuration parameters that can be used by a given * code signing user. *

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

* The name of the signing profile. *

*/ private String profileName; /** *

* The version of a signing profile. *

*/ private String profileVersion; /** *

* The ARN of a signing profile, including the profile version. *

*/ private String profileVersionArn; /** *

* The ACM certificate that is available for use by a signing profile. *

*/ private SigningMaterial signingMaterial; /** *

* The validity period for a signing job created using this signing profile. *

*/ private SignatureValidityPeriod signatureValidityPeriod; /** *

* The ID of a platform that is available for use by a signing profile. *

*/ private String platformId; /** *

* The name of the signing platform. *

*/ private String platformDisplayName; /** *

* The parameters that are available for use by a code signing user. *

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

* The status of a code signing profile. *

*/ private String status; /** *

* The Amazon Resource Name (ARN) for the signing profile. *

*/ private String arn; /** *

* A list of tags associated with the signing profile. *

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

* The name of the signing profile. *

* * @param profileName * The name of the signing profile. */ public void setProfileName(String profileName) { this.profileName = profileName; } /** *

* The name of the signing profile. *

* * @return The name of the signing profile. */ public String getProfileName() { return this.profileName; } /** *

* The name of the signing profile. *

* * @param profileName * The name of the signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withProfileName(String profileName) { setProfileName(profileName); return this; } /** *

* The version of a signing profile. *

* * @param profileVersion * The version of a signing profile. */ public void setProfileVersion(String profileVersion) { this.profileVersion = profileVersion; } /** *

* The version of a signing profile. *

* * @return The version of a signing profile. */ public String getProfileVersion() { return this.profileVersion; } /** *

* The version of a signing profile. *

* * @param profileVersion * The version of a signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withProfileVersion(String profileVersion) { setProfileVersion(profileVersion); return this; } /** *

* The ARN of a signing profile, including the profile version. *

* * @param profileVersionArn * The ARN of a signing profile, including the profile version. */ public void setProfileVersionArn(String profileVersionArn) { this.profileVersionArn = profileVersionArn; } /** *

* The ARN of a signing profile, including the profile version. *

* * @return The ARN of a signing profile, including the profile version. */ public String getProfileVersionArn() { return this.profileVersionArn; } /** *

* The ARN of a signing profile, including the profile version. *

* * @param profileVersionArn * The ARN of a signing profile, including the profile version. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withProfileVersionArn(String profileVersionArn) { setProfileVersionArn(profileVersionArn); return this; } /** *

* The ACM certificate that is available for use by a signing profile. *

* * @param signingMaterial * The ACM certificate that is available for use by a signing profile. */ public void setSigningMaterial(SigningMaterial signingMaterial) { this.signingMaterial = signingMaterial; } /** *

* The ACM certificate that is available for use by a signing profile. *

* * @return The ACM certificate that is available for use by a signing profile. */ public SigningMaterial getSigningMaterial() { return this.signingMaterial; } /** *

* The ACM certificate that is available for use by a signing profile. *

* * @param signingMaterial * The ACM certificate that is available for use by a signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withSigningMaterial(SigningMaterial signingMaterial) { setSigningMaterial(signingMaterial); return this; } /** *

* The validity period for a signing job created using this signing profile. *

* * @param signatureValidityPeriod * The validity period for a signing job created using this signing profile. */ public void setSignatureValidityPeriod(SignatureValidityPeriod signatureValidityPeriod) { this.signatureValidityPeriod = signatureValidityPeriod; } /** *

* The validity period for a signing job created using this signing profile. *

* * @return The validity period for a signing job created using this signing profile. */ public SignatureValidityPeriod getSignatureValidityPeriod() { return this.signatureValidityPeriod; } /** *

* The validity period for a signing job created using this signing profile. *

* * @param signatureValidityPeriod * The validity period for a signing job created using this signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withSignatureValidityPeriod(SignatureValidityPeriod signatureValidityPeriod) { setSignatureValidityPeriod(signatureValidityPeriod); return this; } /** *

* The ID of a platform that is available for use by a signing profile. *

* * @param platformId * The ID of a platform that is available for use by a signing profile. */ public void setPlatformId(String platformId) { this.platformId = platformId; } /** *

* The ID of a platform that is available for use by a signing profile. *

* * @return The ID of a platform that is available for use by a signing profile. */ public String getPlatformId() { return this.platformId; } /** *

* The ID of a platform that is available for use by a signing profile. *

* * @param platformId * The ID of a platform that is available for use by a signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withPlatformId(String platformId) { setPlatformId(platformId); return this; } /** *

* The name of the signing platform. *

* * @param platformDisplayName * The name of the signing platform. */ public void setPlatformDisplayName(String platformDisplayName) { this.platformDisplayName = platformDisplayName; } /** *

* The name of the signing platform. *

* * @return The name of the signing platform. */ public String getPlatformDisplayName() { return this.platformDisplayName; } /** *

* The name of the signing platform. *

* * @param platformDisplayName * The name of the signing platform. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withPlatformDisplayName(String platformDisplayName) { setPlatformDisplayName(platformDisplayName); return this; } /** *

* The parameters that are available for use by a code signing user. *

* * @return The parameters that are available for use by a code signing user. */ public java.util.Map getSigningParameters() { return signingParameters; } /** *

* The parameters that are available for use by a code signing user. *

* * @param signingParameters * The parameters that are available for use by a code signing user. */ public void setSigningParameters(java.util.Map signingParameters) { this.signingParameters = signingParameters; } /** *

* The parameters that are available for use by a code signing user. *

* * @param signingParameters * The parameters that are available for use by a code signing user. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withSigningParameters(java.util.Map signingParameters) { setSigningParameters(signingParameters); return this; } /** * Add a single SigningParameters entry * * @see SigningProfile#withSigningParameters * @returns a reference to this object so that method calls can be chained together. */ public SigningProfile addSigningParametersEntry(String key, String value) { if (null == this.signingParameters) { this.signingParameters = new java.util.HashMap(); } if (this.signingParameters.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.signingParameters.put(key, value); return this; } /** * Removes all the entries added into SigningParameters. * * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile clearSigningParametersEntries() { this.signingParameters = null; return this; } /** *

* The status of a code signing profile. *

* * @param status * The status of a code signing profile. * @see SigningProfileStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of a code signing profile. *

* * @return The status of a code signing profile. * @see SigningProfileStatus */ public String getStatus() { return this.status; } /** *

* The status of a code signing profile. *

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

* The status of a code signing profile. *

* * @param status * The status of a code signing profile. * @return Returns a reference to this object so that method calls can be chained together. * @see SigningProfileStatus */ public SigningProfile withStatus(SigningProfileStatus status) { this.status = status.toString(); return this; } /** *

* The Amazon Resource Name (ARN) for the signing profile. *

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

* The Amazon Resource Name (ARN) for the signing profile. *

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

* The Amazon Resource Name (ARN) for the signing profile. *

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

* A list of tags associated with the signing profile. *

* * @return A list of tags associated with the signing profile. */ public java.util.Map getTags() { return tags; } /** *

* A list of tags associated with the signing profile. *

* * @param tags * A list of tags associated with the signing profile. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* A list of tags associated with the signing profile. *

* * @param tags * A list of tags associated with the signing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningProfile withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see SigningProfile#withTags * @returns a reference to this object so that method calls can be chained together. */ public SigningProfile 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 SigningProfile 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 (getProfileName() != null) sb.append("ProfileName: ").append(getProfileName()).append(","); if (getProfileVersion() != null) sb.append("ProfileVersion: ").append(getProfileVersion()).append(","); if (getProfileVersionArn() != null) sb.append("ProfileVersionArn: ").append(getProfileVersionArn()).append(","); if (getSigningMaterial() != null) sb.append("SigningMaterial: ").append(getSigningMaterial()).append(","); if (getSignatureValidityPeriod() != null) sb.append("SignatureValidityPeriod: ").append(getSignatureValidityPeriod()).append(","); if (getPlatformId() != null) sb.append("PlatformId: ").append(getPlatformId()).append(","); if (getPlatformDisplayName() != null) sb.append("PlatformDisplayName: ").append(getPlatformDisplayName()).append(","); if (getSigningParameters() != null) sb.append("SigningParameters: ").append(getSigningParameters()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getArn() != null) sb.append("Arn: ").append(getArn()).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 SigningProfile == false) return false; SigningProfile other = (SigningProfile) obj; if (other.getProfileName() == null ^ this.getProfileName() == null) return false; if (other.getProfileName() != null && other.getProfileName().equals(this.getProfileName()) == false) return false; if (other.getProfileVersion() == null ^ this.getProfileVersion() == null) return false; if (other.getProfileVersion() != null && other.getProfileVersion().equals(this.getProfileVersion()) == false) return false; if (other.getProfileVersionArn() == null ^ this.getProfileVersionArn() == null) return false; if (other.getProfileVersionArn() != null && other.getProfileVersionArn().equals(this.getProfileVersionArn()) == false) return false; if (other.getSigningMaterial() == null ^ this.getSigningMaterial() == null) return false; if (other.getSigningMaterial() != null && other.getSigningMaterial().equals(this.getSigningMaterial()) == false) return false; if (other.getSignatureValidityPeriod() == null ^ this.getSignatureValidityPeriod() == null) return false; if (other.getSignatureValidityPeriod() != null && other.getSignatureValidityPeriod().equals(this.getSignatureValidityPeriod()) == false) return false; if (other.getPlatformId() == null ^ this.getPlatformId() == null) return false; if (other.getPlatformId() != null && other.getPlatformId().equals(this.getPlatformId()) == false) return false; if (other.getPlatformDisplayName() == null ^ this.getPlatformDisplayName() == null) return false; if (other.getPlatformDisplayName() != null && other.getPlatformDisplayName().equals(this.getPlatformDisplayName()) == false) return false; if (other.getSigningParameters() == null ^ this.getSigningParameters() == null) return false; if (other.getSigningParameters() != null && other.getSigningParameters().equals(this.getSigningParameters()) == 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.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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 + ((getProfileName() == null) ? 0 : getProfileName().hashCode()); hashCode = prime * hashCode + ((getProfileVersion() == null) ? 0 : getProfileVersion().hashCode()); hashCode = prime * hashCode + ((getProfileVersionArn() == null) ? 0 : getProfileVersionArn().hashCode()); hashCode = prime * hashCode + ((getSigningMaterial() == null) ? 0 : getSigningMaterial().hashCode()); hashCode = prime * hashCode + ((getSignatureValidityPeriod() == null) ? 0 : getSignatureValidityPeriod().hashCode()); hashCode = prime * hashCode + ((getPlatformId() == null) ? 0 : getPlatformId().hashCode()); hashCode = prime * hashCode + ((getPlatformDisplayName() == null) ? 0 : getPlatformDisplayName().hashCode()); hashCode = prime * hashCode + ((getSigningParameters() == null) ? 0 : getSigningParameters().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public SigningProfile clone() { try { return (SigningProfile) 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.signer.model.transform.SigningProfileMarshaller.getInstance().marshall(this, protocolMarshaller); } }