com.amazonaws.services.auditmanager.model.UpdateAssessmentRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-auditmanager 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.auditmanager.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 UpdateAssessmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique identifier for the assessment.
*
*/
private String assessmentId;
/**
*
* The name of the assessment to be updated.
*
*/
private String assessmentName;
/**
*
* The description of the assessment.
*
*/
private String assessmentDescription;
/**
*
* The scope of the assessment.
*
*/
private Scope scope;
/**
*
* The assessment report storage destination for the assessment that's being updated.
*
*/
private AssessmentReportsDestination assessmentReportsDestination;
/**
*
* The list of roles for the assessment.
*
*/
private java.util.List roles;
/**
*
* The unique identifier for the assessment.
*
*
* @param assessmentId
* The unique identifier for the assessment.
*/
public void setAssessmentId(String assessmentId) {
this.assessmentId = assessmentId;
}
/**
*
* The unique identifier for the assessment.
*
*
* @return The unique identifier for the assessment.
*/
public String getAssessmentId() {
return this.assessmentId;
}
/**
*
* The unique identifier for the assessment.
*
*
* @param assessmentId
* The unique identifier for the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withAssessmentId(String assessmentId) {
setAssessmentId(assessmentId);
return this;
}
/**
*
* The name of the assessment to be updated.
*
*
* @param assessmentName
* The name of the assessment to be updated.
*/
public void setAssessmentName(String assessmentName) {
this.assessmentName = assessmentName;
}
/**
*
* The name of the assessment to be updated.
*
*
* @return The name of the assessment to be updated.
*/
public String getAssessmentName() {
return this.assessmentName;
}
/**
*
* The name of the assessment to be updated.
*
*
* @param assessmentName
* The name of the assessment to be updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withAssessmentName(String assessmentName) {
setAssessmentName(assessmentName);
return this;
}
/**
*
* The description of the assessment.
*
*
* @param assessmentDescription
* The description of the assessment.
*/
public void setAssessmentDescription(String assessmentDescription) {
this.assessmentDescription = assessmentDescription;
}
/**
*
* The description of the assessment.
*
*
* @return The description of the assessment.
*/
public String getAssessmentDescription() {
return this.assessmentDescription;
}
/**
*
* The description of the assessment.
*
*
* @param assessmentDescription
* The description of the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withAssessmentDescription(String assessmentDescription) {
setAssessmentDescription(assessmentDescription);
return this;
}
/**
*
* The scope of the assessment.
*
*
* @param scope
* The scope of the assessment.
*/
public void setScope(Scope scope) {
this.scope = scope;
}
/**
*
* The scope of the assessment.
*
*
* @return The scope of the assessment.
*/
public Scope getScope() {
return this.scope;
}
/**
*
* The scope of the assessment.
*
*
* @param scope
* The scope of the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withScope(Scope scope) {
setScope(scope);
return this;
}
/**
*
* The assessment report storage destination for the assessment that's being updated.
*
*
* @param assessmentReportsDestination
* The assessment report storage destination for the assessment that's being updated.
*/
public void setAssessmentReportsDestination(AssessmentReportsDestination assessmentReportsDestination) {
this.assessmentReportsDestination = assessmentReportsDestination;
}
/**
*
* The assessment report storage destination for the assessment that's being updated.
*
*
* @return The assessment report storage destination for the assessment that's being updated.
*/
public AssessmentReportsDestination getAssessmentReportsDestination() {
return this.assessmentReportsDestination;
}
/**
*
* The assessment report storage destination for the assessment that's being updated.
*
*
* @param assessmentReportsDestination
* The assessment report storage destination for the assessment that's being updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withAssessmentReportsDestination(AssessmentReportsDestination assessmentReportsDestination) {
setAssessmentReportsDestination(assessmentReportsDestination);
return this;
}
/**
*
* The list of roles for the assessment.
*
*
* @return The list of roles for the assessment.
*/
public java.util.List getRoles() {
return roles;
}
/**
*
* The list of roles for the assessment.
*
*
* @param roles
* The list of roles for the assessment.
*/
public void setRoles(java.util.Collection roles) {
if (roles == null) {
this.roles = null;
return;
}
this.roles = new java.util.ArrayList(roles);
}
/**
*
* The list of roles for the assessment.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setRoles(java.util.Collection)} or {@link #withRoles(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param roles
* The list of roles for the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withRoles(Role... roles) {
if (this.roles == null) {
setRoles(new java.util.ArrayList(roles.length));
}
for (Role ele : roles) {
this.roles.add(ele);
}
return this;
}
/**
*
* The list of roles for the assessment.
*
*
* @param roles
* The list of roles for the assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAssessmentRequest withRoles(java.util.Collection roles) {
setRoles(roles);
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 (getAssessmentId() != null)
sb.append("AssessmentId: ").append(getAssessmentId()).append(",");
if (getAssessmentName() != null)
sb.append("AssessmentName: ").append("***Sensitive Data Redacted***").append(",");
if (getAssessmentDescription() != null)
sb.append("AssessmentDescription: ").append("***Sensitive Data Redacted***").append(",");
if (getScope() != null)
sb.append("Scope: ").append("***Sensitive Data Redacted***").append(",");
if (getAssessmentReportsDestination() != null)
sb.append("AssessmentReportsDestination: ").append("***Sensitive Data Redacted***").append(",");
if (getRoles() != null)
sb.append("Roles: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateAssessmentRequest == false)
return false;
UpdateAssessmentRequest other = (UpdateAssessmentRequest) obj;
if (other.getAssessmentId() == null ^ this.getAssessmentId() == null)
return false;
if (other.getAssessmentId() != null && other.getAssessmentId().equals(this.getAssessmentId()) == false)
return false;
if (other.getAssessmentName() == null ^ this.getAssessmentName() == null)
return false;
if (other.getAssessmentName() != null && other.getAssessmentName().equals(this.getAssessmentName()) == false)
return false;
if (other.getAssessmentDescription() == null ^ this.getAssessmentDescription() == null)
return false;
if (other.getAssessmentDescription() != null && other.getAssessmentDescription().equals(this.getAssessmentDescription()) == false)
return false;
if (other.getScope() == null ^ this.getScope() == null)
return false;
if (other.getScope() != null && other.getScope().equals(this.getScope()) == false)
return false;
if (other.getAssessmentReportsDestination() == null ^ this.getAssessmentReportsDestination() == null)
return false;
if (other.getAssessmentReportsDestination() != null && other.getAssessmentReportsDestination().equals(this.getAssessmentReportsDestination()) == false)
return false;
if (other.getRoles() == null ^ this.getRoles() == null)
return false;
if (other.getRoles() != null && other.getRoles().equals(this.getRoles()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAssessmentId() == null) ? 0 : getAssessmentId().hashCode());
hashCode = prime * hashCode + ((getAssessmentName() == null) ? 0 : getAssessmentName().hashCode());
hashCode = prime * hashCode + ((getAssessmentDescription() == null) ? 0 : getAssessmentDescription().hashCode());
hashCode = prime * hashCode + ((getScope() == null) ? 0 : getScope().hashCode());
hashCode = prime * hashCode + ((getAssessmentReportsDestination() == null) ? 0 : getAssessmentReportsDestination().hashCode());
hashCode = prime * hashCode + ((getRoles() == null) ? 0 : getRoles().hashCode());
return hashCode;
}
@Override
public UpdateAssessmentRequest clone() {
return (UpdateAssessmentRequest) super.clone();
}
}