com.amazonaws.services.wellarchitected.model.ReviewTemplate Maven / Gradle / Ivy
Show all versions of aws-java-sdk-wellarchitected Show documentation
/*
* Copyright 2019-2024 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.wellarchitected.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A review template.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ReviewTemplate implements Serializable, Cloneable, StructuredPojo {
/**
*
* The review template description.
*
*/
private String description;
/**
*
* The lenses applied to the review template.
*
*/
private java.util.List lenses;
private String notes;
/**
*
* A count of how many total questions are answered and unanswered in the review template.
*
*/
private java.util.Map questionCounts;
private String owner;
private java.util.Date updatedAt;
/**
*
* The review template ARN.
*
*/
private String templateArn;
/**
*
* The name of the review template.
*
*/
private String templateName;
/**
*
* The tags assigned to the review template.
*
*/
private java.util.Map tags;
/**
*
* The latest status of a review template.
*
*/
private String updateStatus;
/**
*
* The ID assigned to the template share invitation.
*
*/
private String shareInvitationId;
/**
*
* The review template description.
*
*
* @param description
* The review template description.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The review template description.
*
*
* @return The review template description.
*/
public String getDescription() {
return this.description;
}
/**
*
* The review template description.
*
*
* @param description
* The review template description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The lenses applied to the review template.
*
*
* @return The lenses applied to the review template.
*/
public java.util.List getLenses() {
return lenses;
}
/**
*
* The lenses applied to the review template.
*
*
* @param lenses
* The lenses applied to the review template.
*/
public void setLenses(java.util.Collection lenses) {
if (lenses == null) {
this.lenses = null;
return;
}
this.lenses = new java.util.ArrayList(lenses);
}
/**
*
* The lenses applied to the review template.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLenses(java.util.Collection)} or {@link #withLenses(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param lenses
* The lenses applied to the review template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withLenses(String... lenses) {
if (this.lenses == null) {
setLenses(new java.util.ArrayList(lenses.length));
}
for (String ele : lenses) {
this.lenses.add(ele);
}
return this;
}
/**
*
* The lenses applied to the review template.
*
*
* @param lenses
* The lenses applied to the review template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withLenses(java.util.Collection lenses) {
setLenses(lenses);
return this;
}
/**
* @param notes
*/
public void setNotes(String notes) {
this.notes = notes;
}
/**
* @return
*/
public String getNotes() {
return this.notes;
}
/**
* @param notes
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withNotes(String notes) {
setNotes(notes);
return this;
}
/**
*
* A count of how many total questions are answered and unanswered in the review template.
*
*
* @return A count of how many total questions are answered and unanswered in the review template.
*/
public java.util.Map getQuestionCounts() {
return questionCounts;
}
/**
*
* A count of how many total questions are answered and unanswered in the review template.
*
*
* @param questionCounts
* A count of how many total questions are answered and unanswered in the review template.
*/
public void setQuestionCounts(java.util.Map questionCounts) {
this.questionCounts = questionCounts;
}
/**
*
* A count of how many total questions are answered and unanswered in the review template.
*
*
* @param questionCounts
* A count of how many total questions are answered and unanswered in the review template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withQuestionCounts(java.util.Map questionCounts) {
setQuestionCounts(questionCounts);
return this;
}
/**
* Add a single QuestionCounts entry
*
* @see ReviewTemplate#withQuestionCounts
* @returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate addQuestionCountsEntry(String key, Integer value) {
if (null == this.questionCounts) {
this.questionCounts = new java.util.HashMap();
}
if (this.questionCounts.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.questionCounts.put(key, value);
return this;
}
/**
* Removes all the entries added into QuestionCounts.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate clearQuestionCountsEntries() {
this.questionCounts = null;
return this;
}
/**
* @param owner
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
* @return
*/
public String getOwner() {
return this.owner;
}
/**
* @param owner
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withOwner(String owner) {
setOwner(owner);
return this;
}
/**
* @param updatedAt
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
* @return
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
* @param updatedAt
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The review template ARN.
*
*
* @param templateArn
* The review template ARN.
*/
public void setTemplateArn(String templateArn) {
this.templateArn = templateArn;
}
/**
*
* The review template ARN.
*
*
* @return The review template ARN.
*/
public String getTemplateArn() {
return this.templateArn;
}
/**
*
* The review template ARN.
*
*
* @param templateArn
* The review template ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withTemplateArn(String templateArn) {
setTemplateArn(templateArn);
return this;
}
/**
*
* The name of the review template.
*
*
* @param templateName
* The name of the review template.
*/
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
/**
*
* The name of the review template.
*
*
* @return The name of the review template.
*/
public String getTemplateName() {
return this.templateName;
}
/**
*
* The name of the review template.
*
*
* @param templateName
* The name of the review template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withTemplateName(String templateName) {
setTemplateName(templateName);
return this;
}
/**
*
* The tags assigned to the review template.
*
*
* @return The tags assigned to the review template.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags assigned to the review template.
*
*
* @param tags
* The tags assigned to the review template.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags assigned to the review template.
*
*
* @param tags
* The tags assigned to the review template.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see ReviewTemplate#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate 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 ReviewTemplate clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The latest status of a review template.
*
*
* @param updateStatus
* The latest status of a review template.
* @see ReviewTemplateUpdateStatus
*/
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
}
/**
*
* The latest status of a review template.
*
*
* @return The latest status of a review template.
* @see ReviewTemplateUpdateStatus
*/
public String getUpdateStatus() {
return this.updateStatus;
}
/**
*
* The latest status of a review template.
*
*
* @param updateStatus
* The latest status of a review template.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReviewTemplateUpdateStatus
*/
public ReviewTemplate withUpdateStatus(String updateStatus) {
setUpdateStatus(updateStatus);
return this;
}
/**
*
* The latest status of a review template.
*
*
* @param updateStatus
* The latest status of a review template.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ReviewTemplateUpdateStatus
*/
public ReviewTemplate withUpdateStatus(ReviewTemplateUpdateStatus updateStatus) {
this.updateStatus = updateStatus.toString();
return this;
}
/**
*
* The ID assigned to the template share invitation.
*
*
* @param shareInvitationId
* The ID assigned to the template share invitation.
*/
public void setShareInvitationId(String shareInvitationId) {
this.shareInvitationId = shareInvitationId;
}
/**
*
* The ID assigned to the template share invitation.
*
*
* @return The ID assigned to the template share invitation.
*/
public String getShareInvitationId() {
return this.shareInvitationId;
}
/**
*
* The ID assigned to the template share invitation.
*
*
* @param shareInvitationId
* The ID assigned to the template share invitation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ReviewTemplate withShareInvitationId(String shareInvitationId) {
setShareInvitationId(shareInvitationId);
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 (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getLenses() != null)
sb.append("Lenses: ").append(getLenses()).append(",");
if (getNotes() != null)
sb.append("Notes: ").append(getNotes()).append(",");
if (getQuestionCounts() != null)
sb.append("QuestionCounts: ").append(getQuestionCounts()).append(",");
if (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).append(",");
if (getTemplateArn() != null)
sb.append("TemplateArn: ").append(getTemplateArn()).append(",");
if (getTemplateName() != null)
sb.append("TemplateName: ").append(getTemplateName()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getUpdateStatus() != null)
sb.append("UpdateStatus: ").append(getUpdateStatus()).append(",");
if (getShareInvitationId() != null)
sb.append("ShareInvitationId: ").append(getShareInvitationId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ReviewTemplate == false)
return false;
ReviewTemplate other = (ReviewTemplate) obj;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getLenses() == null ^ this.getLenses() == null)
return false;
if (other.getLenses() != null && other.getLenses().equals(this.getLenses()) == false)
return false;
if (other.getNotes() == null ^ this.getNotes() == null)
return false;
if (other.getNotes() != null && other.getNotes().equals(this.getNotes()) == false)
return false;
if (other.getQuestionCounts() == null ^ this.getQuestionCounts() == null)
return false;
if (other.getQuestionCounts() != null && other.getQuestionCounts().equals(this.getQuestionCounts()) == false)
return false;
if (other.getOwner() == null ^ this.getOwner() == null)
return false;
if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
if (other.getTemplateArn() == null ^ this.getTemplateArn() == null)
return false;
if (other.getTemplateArn() != null && other.getTemplateArn().equals(this.getTemplateArn()) == false)
return false;
if (other.getTemplateName() == null ^ this.getTemplateName() == null)
return false;
if (other.getTemplateName() != null && other.getTemplateName().equals(this.getTemplateName()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getUpdateStatus() == null ^ this.getUpdateStatus() == null)
return false;
if (other.getUpdateStatus() != null && other.getUpdateStatus().equals(this.getUpdateStatus()) == false)
return false;
if (other.getShareInvitationId() == null ^ this.getShareInvitationId() == null)
return false;
if (other.getShareInvitationId() != null && other.getShareInvitationId().equals(this.getShareInvitationId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getLenses() == null) ? 0 : getLenses().hashCode());
hashCode = prime * hashCode + ((getNotes() == null) ? 0 : getNotes().hashCode());
hashCode = prime * hashCode + ((getQuestionCounts() == null) ? 0 : getQuestionCounts().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getTemplateArn() == null) ? 0 : getTemplateArn().hashCode());
hashCode = prime * hashCode + ((getTemplateName() == null) ? 0 : getTemplateName().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getUpdateStatus() == null) ? 0 : getUpdateStatus().hashCode());
hashCode = prime * hashCode + ((getShareInvitationId() == null) ? 0 : getShareInvitationId().hashCode());
return hashCode;
}
@Override
public ReviewTemplate clone() {
try {
return (ReviewTemplate) 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.wellarchitected.model.transform.ReviewTemplateMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}