/* * 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.iot.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateMitigationActionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* A friendly name for the action. Choose a friendly name that accurately describes the action (for example,
* EnableLoggingAction
).
*
* The ARN of the IAM role that is used to apply the mitigation action. *
*/ private String roleArn; /** ** Defines the type of action and the parameters for that action. *
*/ private MitigationActionParams actionParams; /** ** Metadata that can be used to manage the mitigation action. *
*/ private java.util.List
* A friendly name for the action. Choose a friendly name that accurately describes the action (for example,
* EnableLoggingAction
).
*
EnableLoggingAction
).
*/
public void setActionName(String actionName) {
this.actionName = actionName;
}
/**
*
* A friendly name for the action. Choose a friendly name that accurately describes the action (for example,
* EnableLoggingAction
).
*
EnableLoggingAction
).
*/
public String getActionName() {
return this.actionName;
}
/**
*
* A friendly name for the action. Choose a friendly name that accurately describes the action (for example,
* EnableLoggingAction
).
*
EnableLoggingAction
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateMitigationActionRequest withActionName(String actionName) {
setActionName(actionName);
return this;
}
/**
* * The ARN of the IAM role that is used to apply the mitigation action. *
* * @param roleArn * The ARN of the IAM role that is used to apply the mitigation action. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The ARN of the IAM role that is used to apply the mitigation action. *
* * @return The ARN of the IAM role that is used to apply the mitigation action. */ public String getRoleArn() { return this.roleArn; } /** ** The ARN of the IAM role that is used to apply the mitigation action. *
* * @param roleArn * The ARN of the IAM role that is used to apply the mitigation action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMitigationActionRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** ** Defines the type of action and the parameters for that action. *
* * @param actionParams * Defines the type of action and the parameters for that action. */ public void setActionParams(MitigationActionParams actionParams) { this.actionParams = actionParams; } /** ** Defines the type of action and the parameters for that action. *
* * @return Defines the type of action and the parameters for that action. */ public MitigationActionParams getActionParams() { return this.actionParams; } /** ** Defines the type of action and the parameters for that action. *
* * @param actionParams * Defines the type of action and the parameters for that action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMitigationActionRequest withActionParams(MitigationActionParams actionParams) { setActionParams(actionParams); return this; } /** ** Metadata that can be used to manage the mitigation action. *
* * @return Metadata that can be used to manage the mitigation action. */ public java.util.List* Metadata that can be used to manage the mitigation action. *
* * @param tags * Metadata that can be used to manage the mitigation action. */ public void setTags(java.util.Collection* Metadata that can be used to manage the mitigation action. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * Metadata that can be used to manage the mitigation action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMitigationActionRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* Metadata that can be used to manage the mitigation action. *
* * @param tags * Metadata that can be used to manage the mitigation action. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateMitigationActionRequest withTags(java.util.Collection