com.amazonaws.services.resiliencehub.model.UpdateAppRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-resiliencehub Show documentation
/*
* 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.resiliencehub.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 UpdateAppRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*/
private String appArn;
/**
*
* Assessment execution schedule with 'Daily' or 'Disabled' values.
*
*/
private String assessmentSchedule;
/**
*
* Specifies if the resiliency policy ARN should be cleared.
*
*/
private Boolean clearResiliencyPolicyArn;
/**
*
* The optional description for an app.
*
*/
private String description;
/**
*
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports
* notifications only for Drift detected and Scheduled assessment failure events.
*
*/
private java.util.List eventSubscriptions;
/**
*
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing its
* resources, and running an assessment.
*
*/
private PermissionModel permissionModel;
/**
*
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition
* :resiliencehub:region
:account
:resiliency-policy/policy-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*/
private String policyArn;
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param appArn
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For
* more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public void setAppArn(String appArn) {
this.appArn = appArn;
}
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @return Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
.
* For more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public String getAppArn() {
return this.appArn;
}
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param appArn
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For
* more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withAppArn(String appArn) {
setAppArn(appArn);
return this;
}
/**
*
* Assessment execution schedule with 'Daily' or 'Disabled' values.
*
*
* @param assessmentSchedule
* Assessment execution schedule with 'Daily' or 'Disabled' values.
* @see AppAssessmentScheduleType
*/
public void setAssessmentSchedule(String assessmentSchedule) {
this.assessmentSchedule = assessmentSchedule;
}
/**
*
* Assessment execution schedule with 'Daily' or 'Disabled' values.
*
*
* @return Assessment execution schedule with 'Daily' or 'Disabled' values.
* @see AppAssessmentScheduleType
*/
public String getAssessmentSchedule() {
return this.assessmentSchedule;
}
/**
*
* Assessment execution schedule with 'Daily' or 'Disabled' values.
*
*
* @param assessmentSchedule
* Assessment execution schedule with 'Daily' or 'Disabled' values.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppAssessmentScheduleType
*/
public UpdateAppRequest withAssessmentSchedule(String assessmentSchedule) {
setAssessmentSchedule(assessmentSchedule);
return this;
}
/**
*
* Assessment execution schedule with 'Daily' or 'Disabled' values.
*
*
* @param assessmentSchedule
* Assessment execution schedule with 'Daily' or 'Disabled' values.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AppAssessmentScheduleType
*/
public UpdateAppRequest withAssessmentSchedule(AppAssessmentScheduleType assessmentSchedule) {
this.assessmentSchedule = assessmentSchedule.toString();
return this;
}
/**
*
* Specifies if the resiliency policy ARN should be cleared.
*
*
* @param clearResiliencyPolicyArn
* Specifies if the resiliency policy ARN should be cleared.
*/
public void setClearResiliencyPolicyArn(Boolean clearResiliencyPolicyArn) {
this.clearResiliencyPolicyArn = clearResiliencyPolicyArn;
}
/**
*
* Specifies if the resiliency policy ARN should be cleared.
*
*
* @return Specifies if the resiliency policy ARN should be cleared.
*/
public Boolean getClearResiliencyPolicyArn() {
return this.clearResiliencyPolicyArn;
}
/**
*
* Specifies if the resiliency policy ARN should be cleared.
*
*
* @param clearResiliencyPolicyArn
* Specifies if the resiliency policy ARN should be cleared.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withClearResiliencyPolicyArn(Boolean clearResiliencyPolicyArn) {
setClearResiliencyPolicyArn(clearResiliencyPolicyArn);
return this;
}
/**
*
* Specifies if the resiliency policy ARN should be cleared.
*
*
* @return Specifies if the resiliency policy ARN should be cleared.
*/
public Boolean isClearResiliencyPolicyArn() {
return this.clearResiliencyPolicyArn;
}
/**
*
* The optional description for an app.
*
*
* @param description
* The optional description for an app.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The optional description for an app.
*
*
* @return The optional description for an app.
*/
public String getDescription() {
return this.description;
}
/**
*
* The optional description for an app.
*
*
* @param description
* The optional description for an app.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports
* notifications only for Drift detected and Scheduled assessment failure events.
*
*
* @return The list of events you would like to subscribe and get notification for. Currently, Resilience Hub
* supports notifications only for Drift detected and Scheduled assessment failure events.
*/
public java.util.List getEventSubscriptions() {
return eventSubscriptions;
}
/**
*
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports
* notifications only for Drift detected and Scheduled assessment failure events.
*
*
* @param eventSubscriptions
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub
* supports notifications only for Drift detected and Scheduled assessment failure events.
*/
public void setEventSubscriptions(java.util.Collection eventSubscriptions) {
if (eventSubscriptions == null) {
this.eventSubscriptions = null;
return;
}
this.eventSubscriptions = new java.util.ArrayList(eventSubscriptions);
}
/**
*
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports
* notifications only for Drift detected and Scheduled assessment failure events.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEventSubscriptions(java.util.Collection)} or {@link #withEventSubscriptions(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param eventSubscriptions
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub
* supports notifications only for Drift detected and Scheduled assessment failure events.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withEventSubscriptions(EventSubscription... eventSubscriptions) {
if (this.eventSubscriptions == null) {
setEventSubscriptions(new java.util.ArrayList(eventSubscriptions.length));
}
for (EventSubscription ele : eventSubscriptions) {
this.eventSubscriptions.add(ele);
}
return this;
}
/**
*
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub supports
* notifications only for Drift detected and Scheduled assessment failure events.
*
*
* @param eventSubscriptions
* The list of events you would like to subscribe and get notification for. Currently, Resilience Hub
* supports notifications only for Drift detected and Scheduled assessment failure events.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withEventSubscriptions(java.util.Collection eventSubscriptions) {
setEventSubscriptions(eventSubscriptions);
return this;
}
/**
*
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing its
* resources, and running an assessment.
*
*
* @param permissionModel
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing
* its resources, and running an assessment.
*/
public void setPermissionModel(PermissionModel permissionModel) {
this.permissionModel = permissionModel;
}
/**
*
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing its
* resources, and running an assessment.
*
*
* @return Defines the roles and credentials that Resilience Hub would use while creating an application, importing
* its resources, and running an assessment.
*/
public PermissionModel getPermissionModel() {
return this.permissionModel;
}
/**
*
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing its
* resources, and running an assessment.
*
*
* @param permissionModel
* Defines the roles and credentials that Resilience Hub would use while creating an application, importing
* its resources, and running an assessment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withPermissionModel(PermissionModel permissionModel) {
setPermissionModel(permissionModel);
return this;
}
/**
*
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition
* :resiliencehub:region
:account
:resiliency-policy/policy-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param policyArn
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:resiliency-policy/
* policy-id
. For more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public void setPolicyArn(String policyArn) {
this.policyArn = policyArn;
}
/**
*
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition
* :resiliencehub:region
:account
:resiliency-policy/policy-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @return Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:resiliency-policy/
* policy-id
. For more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public String getPolicyArn() {
return this.policyArn;
}
/**
*
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:partition
* :resiliencehub:region
:account
:resiliency-policy/policy-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param policyArn
* Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:resiliency-policy/
* policy-id
. For more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withPolicyArn(String policyArn) {
setPolicyArn(policyArn);
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 (getAppArn() != null)
sb.append("AppArn: ").append(getAppArn()).append(",");
if (getAssessmentSchedule() != null)
sb.append("AssessmentSchedule: ").append(getAssessmentSchedule()).append(",");
if (getClearResiliencyPolicyArn() != null)
sb.append("ClearResiliencyPolicyArn: ").append(getClearResiliencyPolicyArn()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getEventSubscriptions() != null)
sb.append("EventSubscriptions: ").append(getEventSubscriptions()).append(",");
if (getPermissionModel() != null)
sb.append("PermissionModel: ").append(getPermissionModel()).append(",");
if (getPolicyArn() != null)
sb.append("PolicyArn: ").append(getPolicyArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateAppRequest == false)
return false;
UpdateAppRequest other = (UpdateAppRequest) obj;
if (other.getAppArn() == null ^ this.getAppArn() == null)
return false;
if (other.getAppArn() != null && other.getAppArn().equals(this.getAppArn()) == false)
return false;
if (other.getAssessmentSchedule() == null ^ this.getAssessmentSchedule() == null)
return false;
if (other.getAssessmentSchedule() != null && other.getAssessmentSchedule().equals(this.getAssessmentSchedule()) == false)
return false;
if (other.getClearResiliencyPolicyArn() == null ^ this.getClearResiliencyPolicyArn() == null)
return false;
if (other.getClearResiliencyPolicyArn() != null && other.getClearResiliencyPolicyArn().equals(this.getClearResiliencyPolicyArn()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEventSubscriptions() == null ^ this.getEventSubscriptions() == null)
return false;
if (other.getEventSubscriptions() != null && other.getEventSubscriptions().equals(this.getEventSubscriptions()) == false)
return false;
if (other.getPermissionModel() == null ^ this.getPermissionModel() == null)
return false;
if (other.getPermissionModel() != null && other.getPermissionModel().equals(this.getPermissionModel()) == false)
return false;
if (other.getPolicyArn() == null ^ this.getPolicyArn() == null)
return false;
if (other.getPolicyArn() != null && other.getPolicyArn().equals(this.getPolicyArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAppArn() == null) ? 0 : getAppArn().hashCode());
hashCode = prime * hashCode + ((getAssessmentSchedule() == null) ? 0 : getAssessmentSchedule().hashCode());
hashCode = prime * hashCode + ((getClearResiliencyPolicyArn() == null) ? 0 : getClearResiliencyPolicyArn().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEventSubscriptions() == null) ? 0 : getEventSubscriptions().hashCode());
hashCode = prime * hashCode + ((getPermissionModel() == null) ? 0 : getPermissionModel().hashCode());
hashCode = prime * hashCode + ((getPolicyArn() == null) ? 0 : getPolicyArn().hashCode());
return hashCode;
}
@Override
public UpdateAppRequest clone() {
return (UpdateAppRequest) super.clone();
}
}