
com.amazonaws.services.codecommit.model.ApprovalRuleTemplate Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.codecommit.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Returns information about an approval rule template.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ApprovalRuleTemplate implements Serializable, Cloneable, StructuredPojo {
/**
*
* The system-generated ID of the approval rule template.
*
*/
private String approvalRuleTemplateId;
/**
*
* The name of the approval rule template.
*
*/
private String approvalRuleTemplateName;
/**
*
* The description of the approval rule template.
*
*/
private String approvalRuleTemplateDescription;
/**
*
* The content of the approval rule template.
*
*/
private String approvalRuleTemplateContent;
/**
*
* The SHA-256 hash signature for the content of the approval rule template.
*
*/
private String ruleContentSha256;
/**
*
* The date the approval rule template was most recently changed, in timestamp format.
*
*/
private java.util.Date lastModifiedDate;
/**
*
* The date the approval rule template was created, in timestamp format.
*
*/
private java.util.Date creationDate;
/**
*
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*/
private String lastModifiedUser;
/**
*
* The system-generated ID of the approval rule template.
*
*
* @param approvalRuleTemplateId
* The system-generated ID of the approval rule template.
*/
public void setApprovalRuleTemplateId(String approvalRuleTemplateId) {
this.approvalRuleTemplateId = approvalRuleTemplateId;
}
/**
*
* The system-generated ID of the approval rule template.
*
*
* @return The system-generated ID of the approval rule template.
*/
public String getApprovalRuleTemplateId() {
return this.approvalRuleTemplateId;
}
/**
*
* The system-generated ID of the approval rule template.
*
*
* @param approvalRuleTemplateId
* The system-generated ID of the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withApprovalRuleTemplateId(String approvalRuleTemplateId) {
setApprovalRuleTemplateId(approvalRuleTemplateId);
return this;
}
/**
*
* The name of the approval rule template.
*
*
* @param approvalRuleTemplateName
* The name of the approval rule template.
*/
public void setApprovalRuleTemplateName(String approvalRuleTemplateName) {
this.approvalRuleTemplateName = approvalRuleTemplateName;
}
/**
*
* The name of the approval rule template.
*
*
* @return The name of the approval rule template.
*/
public String getApprovalRuleTemplateName() {
return this.approvalRuleTemplateName;
}
/**
*
* The name of the approval rule template.
*
*
* @param approvalRuleTemplateName
* The name of the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withApprovalRuleTemplateName(String approvalRuleTemplateName) {
setApprovalRuleTemplateName(approvalRuleTemplateName);
return this;
}
/**
*
* The description of the approval rule template.
*
*
* @param approvalRuleTemplateDescription
* The description of the approval rule template.
*/
public void setApprovalRuleTemplateDescription(String approvalRuleTemplateDescription) {
this.approvalRuleTemplateDescription = approvalRuleTemplateDescription;
}
/**
*
* The description of the approval rule template.
*
*
* @return The description of the approval rule template.
*/
public String getApprovalRuleTemplateDescription() {
return this.approvalRuleTemplateDescription;
}
/**
*
* The description of the approval rule template.
*
*
* @param approvalRuleTemplateDescription
* The description of the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withApprovalRuleTemplateDescription(String approvalRuleTemplateDescription) {
setApprovalRuleTemplateDescription(approvalRuleTemplateDescription);
return this;
}
/**
*
* The content of the approval rule template.
*
*
* @param approvalRuleTemplateContent
* The content of the approval rule template.
*/
public void setApprovalRuleTemplateContent(String approvalRuleTemplateContent) {
this.approvalRuleTemplateContent = approvalRuleTemplateContent;
}
/**
*
* The content of the approval rule template.
*
*
* @return The content of the approval rule template.
*/
public String getApprovalRuleTemplateContent() {
return this.approvalRuleTemplateContent;
}
/**
*
* The content of the approval rule template.
*
*
* @param approvalRuleTemplateContent
* The content of the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withApprovalRuleTemplateContent(String approvalRuleTemplateContent) {
setApprovalRuleTemplateContent(approvalRuleTemplateContent);
return this;
}
/**
*
* The SHA-256 hash signature for the content of the approval rule template.
*
*
* @param ruleContentSha256
* The SHA-256 hash signature for the content of the approval rule template.
*/
public void setRuleContentSha256(String ruleContentSha256) {
this.ruleContentSha256 = ruleContentSha256;
}
/**
*
* The SHA-256 hash signature for the content of the approval rule template.
*
*
* @return The SHA-256 hash signature for the content of the approval rule template.
*/
public String getRuleContentSha256() {
return this.ruleContentSha256;
}
/**
*
* The SHA-256 hash signature for the content of the approval rule template.
*
*
* @param ruleContentSha256
* The SHA-256 hash signature for the content of the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withRuleContentSha256(String ruleContentSha256) {
setRuleContentSha256(ruleContentSha256);
return this;
}
/**
*
* The date the approval rule template was most recently changed, in timestamp format.
*
*
* @param lastModifiedDate
* The date the approval rule template was most recently changed, in timestamp format.
*/
public void setLastModifiedDate(java.util.Date lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
/**
*
* The date the approval rule template was most recently changed, in timestamp format.
*
*
* @return The date the approval rule template was most recently changed, in timestamp format.
*/
public java.util.Date getLastModifiedDate() {
return this.lastModifiedDate;
}
/**
*
* The date the approval rule template was most recently changed, in timestamp format.
*
*
* @param lastModifiedDate
* The date the approval rule template was most recently changed, in timestamp format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withLastModifiedDate(java.util.Date lastModifiedDate) {
setLastModifiedDate(lastModifiedDate);
return this;
}
/**
*
* The date the approval rule template was created, in timestamp format.
*
*
* @param creationDate
* The date the approval rule template was created, in timestamp format.
*/
public void setCreationDate(java.util.Date creationDate) {
this.creationDate = creationDate;
}
/**
*
* The date the approval rule template was created, in timestamp format.
*
*
* @return The date the approval rule template was created, in timestamp format.
*/
public java.util.Date getCreationDate() {
return this.creationDate;
}
/**
*
* The date the approval rule template was created, in timestamp format.
*
*
* @param creationDate
* The date the approval rule template was created, in timestamp format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withCreationDate(java.util.Date creationDate) {
setCreationDate(creationDate);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*
* @param lastModifiedUser
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*/
public void setLastModifiedUser(String lastModifiedUser) {
this.lastModifiedUser = lastModifiedUser;
}
/**
*
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*
* @return The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule
* template.
*/
public String getLastModifiedUser() {
return this.lastModifiedUser;
}
/**
*
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*
* @param lastModifiedUser
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApprovalRuleTemplate withLastModifiedUser(String lastModifiedUser) {
setLastModifiedUser(lastModifiedUser);
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 (getApprovalRuleTemplateId() != null)
sb.append("ApprovalRuleTemplateId: ").append(getApprovalRuleTemplateId()).append(",");
if (getApprovalRuleTemplateName() != null)
sb.append("ApprovalRuleTemplateName: ").append(getApprovalRuleTemplateName()).append(",");
if (getApprovalRuleTemplateDescription() != null)
sb.append("ApprovalRuleTemplateDescription: ").append(getApprovalRuleTemplateDescription()).append(",");
if (getApprovalRuleTemplateContent() != null)
sb.append("ApprovalRuleTemplateContent: ").append(getApprovalRuleTemplateContent()).append(",");
if (getRuleContentSha256() != null)
sb.append("RuleContentSha256: ").append(getRuleContentSha256()).append(",");
if (getLastModifiedDate() != null)
sb.append("LastModifiedDate: ").append(getLastModifiedDate()).append(",");
if (getCreationDate() != null)
sb.append("CreationDate: ").append(getCreationDate()).append(",");
if (getLastModifiedUser() != null)
sb.append("LastModifiedUser: ").append(getLastModifiedUser());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ApprovalRuleTemplate == false)
return false;
ApprovalRuleTemplate other = (ApprovalRuleTemplate) obj;
if (other.getApprovalRuleTemplateId() == null ^ this.getApprovalRuleTemplateId() == null)
return false;
if (other.getApprovalRuleTemplateId() != null && other.getApprovalRuleTemplateId().equals(this.getApprovalRuleTemplateId()) == false)
return false;
if (other.getApprovalRuleTemplateName() == null ^ this.getApprovalRuleTemplateName() == null)
return false;
if (other.getApprovalRuleTemplateName() != null && other.getApprovalRuleTemplateName().equals(this.getApprovalRuleTemplateName()) == false)
return false;
if (other.getApprovalRuleTemplateDescription() == null ^ this.getApprovalRuleTemplateDescription() == null)
return false;
if (other.getApprovalRuleTemplateDescription() != null
&& other.getApprovalRuleTemplateDescription().equals(this.getApprovalRuleTemplateDescription()) == false)
return false;
if (other.getApprovalRuleTemplateContent() == null ^ this.getApprovalRuleTemplateContent() == null)
return false;
if (other.getApprovalRuleTemplateContent() != null && other.getApprovalRuleTemplateContent().equals(this.getApprovalRuleTemplateContent()) == false)
return false;
if (other.getRuleContentSha256() == null ^ this.getRuleContentSha256() == null)
return false;
if (other.getRuleContentSha256() != null && other.getRuleContentSha256().equals(this.getRuleContentSha256()) == false)
return false;
if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null)
return false;
if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false)
return false;
if (other.getCreationDate() == null ^ this.getCreationDate() == null)
return false;
if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false)
return false;
if (other.getLastModifiedUser() == null ^ this.getLastModifiedUser() == null)
return false;
if (other.getLastModifiedUser() != null && other.getLastModifiedUser().equals(this.getLastModifiedUser()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApprovalRuleTemplateId() == null) ? 0 : getApprovalRuleTemplateId().hashCode());
hashCode = prime * hashCode + ((getApprovalRuleTemplateName() == null) ? 0 : getApprovalRuleTemplateName().hashCode());
hashCode = prime * hashCode + ((getApprovalRuleTemplateDescription() == null) ? 0 : getApprovalRuleTemplateDescription().hashCode());
hashCode = prime * hashCode + ((getApprovalRuleTemplateContent() == null) ? 0 : getApprovalRuleTemplateContent().hashCode());
hashCode = prime * hashCode + ((getRuleContentSha256() == null) ? 0 : getRuleContentSha256().hashCode());
hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode());
hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode());
hashCode = prime * hashCode + ((getLastModifiedUser() == null) ? 0 : getLastModifiedUser().hashCode());
return hashCode;
}
@Override
public ApprovalRuleTemplate clone() {
try {
return (ApprovalRuleTemplate) 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.codecommit.model.transform.ApprovalRuleTemplateMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}