/* * 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 a signing job. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SigningJob implements Serializable, Cloneable, StructuredPojo { /** ** The ID of the signing job. *
*/ private String jobId; /** *
* A Source that contains information about a signing job's code image source.
*
* A SignedObject structure that contains information about a signing job's signed code image.
*
* A SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used for
* the signing job.
*
* The date and time that the signing job was created. *
*/ private java.util.Date createdAt; /** ** The status of the signing job. *
*/ private String status; /** ** Indicates whether the signing job is revoked. *
*/ private Boolean isRevoked; /** ** The name of the signing profile that created a signing job. *
*/ private String profileName; /** ** The version of the signing profile that created a signing job. *
*/ private String profileVersion; /** ** The unique identifier for a signing platform. *
*/ private String platformId; /** ** The name of a signing platform. *
*/ private String platformDisplayName; /** ** The time when the signature of a signing job expires. *
*/ private java.util.Date signatureExpiresAt; /** ** The AWS account ID of the job owner. *
*/ private String jobOwner; /** ** The AWS account ID of the job invoker. *
*/ private String jobInvoker; /** ** The ID of the signing job. *
* * @param jobId * The ID of the signing job. */ public void setJobId(String jobId) { this.jobId = jobId; } /** ** The ID of the signing job. *
* * @return The ID of the signing job. */ public String getJobId() { return this.jobId; } /** ** The ID of the signing job. *
* * @param jobId * The ID of the signing job. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withJobId(String jobId) { setJobId(jobId); return this; } /** *
* A Source that contains information about a signing job's code image source.
*
Source that contains information about a signing job's code image source.
*/
public void setSource(Source source) {
this.source = source;
}
/**
*
* A Source that contains information about a signing job's code image source.
*
Source that contains information about a signing job's code image source.
*/
public Source getSource() {
return this.source;
}
/**
*
* A Source that contains information about a signing job's code image source.
*
Source that contains information about a signing job's code image source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SigningJob withSource(Source source) {
setSource(source);
return this;
}
/**
*
* A SignedObject structure that contains information about a signing job's signed code image.
*
SignedObject structure that contains information about a signing job's signed code image.
*/
public void setSignedObject(SignedObject signedObject) {
this.signedObject = signedObject;
}
/**
*
* A SignedObject structure that contains information about a signing job's signed code image.
*
SignedObject structure that contains information about a signing job's signed code image.
*/
public SignedObject getSignedObject() {
return this.signedObject;
}
/**
*
* A SignedObject structure that contains information about a signing job's signed code image.
*
SignedObject structure that contains information about a signing job's signed code image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SigningJob withSignedObject(SignedObject signedObject) {
setSignedObject(signedObject);
return this;
}
/**
*
* A SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used for
* the signing job.
*
SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used
* for the signing job.
*/
public void setSigningMaterial(SigningMaterial signingMaterial) {
this.signingMaterial = signingMaterial;
}
/**
*
* A SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used for
* the signing job.
*
SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate
* used for the signing job.
*/
public SigningMaterial getSigningMaterial() {
return this.signingMaterial;
}
/**
*
* A SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used for
* the signing job.
*
SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used
* for the signing job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SigningJob withSigningMaterial(SigningMaterial signingMaterial) {
setSigningMaterial(signingMaterial);
return this;
}
/**
* * The date and time that the signing job was created. *
* * @param createdAt * The date and time that the signing job was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The date and time that the signing job was created. *
* * @return The date and time that the signing job was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The date and time that the signing job was created. *
* * @param createdAt * The date and time that the signing job was created. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The status of the signing job. *
* * @param status * The status of the signing job. * @see SigningStatus */ public void setStatus(String status) { this.status = status; } /** ** The status of the signing job. *
* * @return The status of the signing job. * @see SigningStatus */ public String getStatus() { return this.status; } /** ** The status of the signing job. *
* * @param status * The status of the signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see SigningStatus */ public SigningJob withStatus(String status) { setStatus(status); return this; } /** ** The status of the signing job. *
* * @param status * The status of the signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see SigningStatus */ public SigningJob withStatus(SigningStatus status) { this.status = status.toString(); return this; } /** ** Indicates whether the signing job is revoked. *
* * @param isRevoked * Indicates whether the signing job is revoked. */ public void setIsRevoked(Boolean isRevoked) { this.isRevoked = isRevoked; } /** ** Indicates whether the signing job is revoked. *
* * @return Indicates whether the signing job is revoked. */ public Boolean getIsRevoked() { return this.isRevoked; } /** ** Indicates whether the signing job is revoked. *
* * @param isRevoked * Indicates whether the signing job is revoked. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withIsRevoked(Boolean isRevoked) { setIsRevoked(isRevoked); return this; } /** ** Indicates whether the signing job is revoked. *
* * @return Indicates whether the signing job is revoked. */ public Boolean isRevoked() { return this.isRevoked; } /** ** The name of the signing profile that created a signing job. *
* * @param profileName * The name of the signing profile that created a signing job. */ public void setProfileName(String profileName) { this.profileName = profileName; } /** ** The name of the signing profile that created a signing job. *
* * @return The name of the signing profile that created a signing job. */ public String getProfileName() { return this.profileName; } /** ** The name of the signing profile that created a signing job. *
* * @param profileName * The name of the signing profile that created a signing job. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withProfileName(String profileName) { setProfileName(profileName); return this; } /** ** The version of the signing profile that created a signing job. *
* * @param profileVersion * The version of the signing profile that created a signing job. */ public void setProfileVersion(String profileVersion) { this.profileVersion = profileVersion; } /** ** The version of the signing profile that created a signing job. *
* * @return The version of the signing profile that created a signing job. */ public String getProfileVersion() { return this.profileVersion; } /** ** The version of the signing profile that created a signing job. *
* * @param profileVersion * The version of the signing profile that created a signing job. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withProfileVersion(String profileVersion) { setProfileVersion(profileVersion); return this; } /** ** The unique identifier for a signing platform. *
* * @param platformId * The unique identifier for a signing platform. */ public void setPlatformId(String platformId) { this.platformId = platformId; } /** ** The unique identifier for a signing platform. *
* * @return The unique identifier for a signing platform. */ public String getPlatformId() { return this.platformId; } /** ** The unique identifier for a signing platform. *
* * @param platformId * The unique identifier for a signing platform. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withPlatformId(String platformId) { setPlatformId(platformId); return this; } /** ** The name of a signing platform. *
* * @param platformDisplayName * The name of a signing platform. */ public void setPlatformDisplayName(String platformDisplayName) { this.platformDisplayName = platformDisplayName; } /** ** The name of a signing platform. *
* * @return The name of a signing platform. */ public String getPlatformDisplayName() { return this.platformDisplayName; } /** ** The name of a signing platform. *
* * @param platformDisplayName * The name of a signing platform. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withPlatformDisplayName(String platformDisplayName) { setPlatformDisplayName(platformDisplayName); return this; } /** ** The time when the signature of a signing job expires. *
* * @param signatureExpiresAt * The time when the signature of a signing job expires. */ public void setSignatureExpiresAt(java.util.Date signatureExpiresAt) { this.signatureExpiresAt = signatureExpiresAt; } /** ** The time when the signature of a signing job expires. *
* * @return The time when the signature of a signing job expires. */ public java.util.Date getSignatureExpiresAt() { return this.signatureExpiresAt; } /** ** The time when the signature of a signing job expires. *
* * @param signatureExpiresAt * The time when the signature of a signing job expires. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withSignatureExpiresAt(java.util.Date signatureExpiresAt) { setSignatureExpiresAt(signatureExpiresAt); return this; } /** ** The AWS account ID of the job owner. *
* * @param jobOwner * The AWS account ID of the job owner. */ public void setJobOwner(String jobOwner) { this.jobOwner = jobOwner; } /** ** The AWS account ID of the job owner. *
* * @return The AWS account ID of the job owner. */ public String getJobOwner() { return this.jobOwner; } /** ** The AWS account ID of the job owner. *
* * @param jobOwner * The AWS account ID of the job owner. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withJobOwner(String jobOwner) { setJobOwner(jobOwner); return this; } /** ** The AWS account ID of the job invoker. *
* * @param jobInvoker * The AWS account ID of the job invoker. */ public void setJobInvoker(String jobInvoker) { this.jobInvoker = jobInvoker; } /** ** The AWS account ID of the job invoker. *
* * @return The AWS account ID of the job invoker. */ public String getJobInvoker() { return this.jobInvoker; } /** ** The AWS account ID of the job invoker. *
* * @param jobInvoker * The AWS account ID of the job invoker. * @return Returns a reference to this object so that method calls can be chained together. */ public SigningJob withJobInvoker(String jobInvoker) { setJobInvoker(jobInvoker); 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 (getJobId() != null) sb.append("JobId: ").append(getJobId()).append(","); if (getSource() != null) sb.append("Source: ").append(getSource()).append(","); if (getSignedObject() != null) sb.append("SignedObject: ").append(getSignedObject()).append(","); if (getSigningMaterial() != null) sb.append("SigningMaterial: ").append(getSigningMaterial()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getIsRevoked() != null) sb.append("IsRevoked: ").append(getIsRevoked()).append(","); if (getProfileName() != null) sb.append("ProfileName: ").append(getProfileName()).append(","); if (getProfileVersion() != null) sb.append("ProfileVersion: ").append(getProfileVersion()).append(","); if (getPlatformId() != null) sb.append("PlatformId: ").append(getPlatformId()).append(","); if (getPlatformDisplayName() != null) sb.append("PlatformDisplayName: ").append(getPlatformDisplayName()).append(","); if (getSignatureExpiresAt() != null) sb.append("SignatureExpiresAt: ").append(getSignatureExpiresAt()).append(","); if (getJobOwner() != null) sb.append("JobOwner: ").append(getJobOwner()).append(","); if (getJobInvoker() != null) sb.append("JobInvoker: ").append(getJobInvoker()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SigningJob == false) return false; SigningJob other = (SigningJob) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getSource() == null ^ this.getSource() == null) return false; if (other.getSource() != null && other.getSource().equals(this.getSource()) == false) return false; if (other.getSignedObject() == null ^ this.getSignedObject() == null) return false; if (other.getSignedObject() != null && other.getSignedObject().equals(this.getSignedObject()) == 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.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == 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.getIsRevoked() == null ^ this.getIsRevoked() == null) return false; if (other.getIsRevoked() != null && other.getIsRevoked().equals(this.getIsRevoked()) == false) return false; 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.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.getSignatureExpiresAt() == null ^ this.getSignatureExpiresAt() == null) return false; if (other.getSignatureExpiresAt() != null && other.getSignatureExpiresAt().equals(this.getSignatureExpiresAt()) == false) return false; if (other.getJobOwner() == null ^ this.getJobOwner() == null) return false; if (other.getJobOwner() != null && other.getJobOwner().equals(this.getJobOwner()) == false) return false; if (other.getJobInvoker() == null ^ this.getJobInvoker() == null) return false; if (other.getJobInvoker() != null && other.getJobInvoker().equals(this.getJobInvoker()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getSource() == null) ? 0 : getSource().hashCode()); hashCode = prime * hashCode + ((getSignedObject() == null) ? 0 : getSignedObject().hashCode()); hashCode = prime * hashCode + ((getSigningMaterial() == null) ? 0 : getSigningMaterial().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getIsRevoked() == null) ? 0 : getIsRevoked().hashCode()); hashCode = prime * hashCode + ((getProfileName() == null) ? 0 : getProfileName().hashCode()); hashCode = prime * hashCode + ((getProfileVersion() == null) ? 0 : getProfileVersion().hashCode()); hashCode = prime * hashCode + ((getPlatformId() == null) ? 0 : getPlatformId().hashCode()); hashCode = prime * hashCode + ((getPlatformDisplayName() == null) ? 0 : getPlatformDisplayName().hashCode()); hashCode = prime * hashCode + ((getSignatureExpiresAt() == null) ? 0 : getSignatureExpiresAt().hashCode()); hashCode = prime * hashCode + ((getJobOwner() == null) ? 0 : getJobOwner().hashCode()); hashCode = prime * hashCode + ((getJobInvoker() == null) ? 0 : getJobInvoker().hashCode()); return hashCode; } @Override public SigningJob clone() { try { return (SigningJob) 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.SigningJobMarshaller.getInstance().marshall(this, protocolMarshaller); } }