/* * Copyright 2010-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; public class DescribeMitigationActionResult implements Serializable { /** *

* The friendly name that uniquely identifies the mitigation action. *

*

* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
*/ private String actionName; /** *

* The type of mitigation action. *

*

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS */ private String actionType; /** *

* The ARN that identifies this migration action. *

*/ private String actionArn; /** *

* A unique identifier for this action. *

*/ private String actionId; /** *

* The ARN of the IAM role used to apply this action. *

*

* Constraints:
* Length: 20 - 2048
*/ private String roleArn; /** *

* Parameters that control how the mitigation action is applied, specific to * the type of mitigation action. *

*/ private MitigationActionParams actionParams; /** *

* The date and time when the mitigation action was added to your Amazon Web * Services accounts. *

*/ private java.util.Date creationDate; /** *

* The date and time when the mitigation action was last changed. *

*/ private java.util.Date lastModifiedDate; /** *

* The friendly name that uniquely identifies the mitigation action. *

*

* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
* * @return

* The friendly name that uniquely identifies the mitigation action. *

*/ public String getActionName() { return actionName; } /** *

* The friendly name that uniquely identifies the mitigation action. *

*

* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
* * @param actionName

* The friendly name that uniquely identifies the mitigation * action. *

*/ public void setActionName(String actionName) { this.actionName = actionName; } /** *

* The friendly name that uniquely identifies the mitigation action. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: - 128
* Pattern: [a-zA-Z0-9_-]+
* * @param actionName

* The friendly name that uniquely identifies the mitigation * action. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withActionName(String actionName) { this.actionName = actionName; return this; } /** *

* The type of mitigation action. *

*

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS * * @return

* The type of mitigation action. *

* @see MitigationActionType */ public String getActionType() { return actionType; } /** *

* The type of mitigation action. *

*

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS * * @param actionType

* The type of mitigation action. *

* @see MitigationActionType */ public void setActionType(String actionType) { this.actionType = actionType; } /** *

* The type of mitigation action. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS * * @param actionType

* The type of mitigation action. *

* @return A reference to this updated object so that method calls can be * chained together. * @see MitigationActionType */ public DescribeMitigationActionResult withActionType(String actionType) { this.actionType = actionType; return this; } /** *

* The type of mitigation action. *

*

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS * * @param actionType

* The type of mitigation action. *

* @see MitigationActionType */ public void setActionType(MitigationActionType actionType) { this.actionType = actionType.toString(); } /** *

* The type of mitigation action. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: UPDATE_DEVICE_CERTIFICATE, UPDATE_CA_CERTIFICATE, * ADD_THINGS_TO_THING_GROUP, REPLACE_DEFAULT_POLICY_VERSION, * ENABLE_IOT_LOGGING, PUBLISH_FINDING_TO_SNS * * @param actionType

* The type of mitigation action. *

* @return A reference to this updated object so that method calls can be * chained together. * @see MitigationActionType */ public DescribeMitigationActionResult withActionType(MitigationActionType actionType) { this.actionType = actionType.toString(); return this; } /** *

* The ARN that identifies this migration action. *

* * @return

* The ARN that identifies this migration action. *

*/ public String getActionArn() { return actionArn; } /** *

* The ARN that identifies this migration action. *

* * @param actionArn

* The ARN that identifies this migration action. *

*/ public void setActionArn(String actionArn) { this.actionArn = actionArn; } /** *

* The ARN that identifies this migration action. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param actionArn

* The ARN that identifies this migration action. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withActionArn(String actionArn) { this.actionArn = actionArn; return this; } /** *

* A unique identifier for this action. *

* * @return

* A unique identifier for this action. *

*/ public String getActionId() { return actionId; } /** *

* A unique identifier for this action. *

* * @param actionId

* A unique identifier for this action. *

*/ public void setActionId(String actionId) { this.actionId = actionId; } /** *

* A unique identifier for this action. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param actionId

* A unique identifier for this action. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withActionId(String actionId) { this.actionId = actionId; return this; } /** *

* The ARN of the IAM role used to apply this action. *

*

* Constraints:
* Length: 20 - 2048
* * @return

* The ARN of the IAM role used to apply this action. *

*/ public String getRoleArn() { return roleArn; } /** *

* The ARN of the IAM role used to apply this action. *

*

* Constraints:
* Length: 20 - 2048
* * @param roleArn

* The ARN of the IAM role used to apply this action. *

*/ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The ARN of the IAM role used to apply this action. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 20 - 2048
* * @param roleArn

* The ARN of the IAM role used to apply this action. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withRoleArn(String roleArn) { this.roleArn = roleArn; return this; } /** *

* Parameters that control how the mitigation action is applied, specific to * the type of mitigation action. *

* * @return

* Parameters that control how the mitigation action is applied, * specific to the type of mitigation action. *

*/ public MitigationActionParams getActionParams() { return actionParams; } /** *

* Parameters that control how the mitigation action is applied, specific to * the type of mitigation action. *

* * @param actionParams

* Parameters that control how the mitigation action is applied, * specific to the type of mitigation action. *

*/ public void setActionParams(MitigationActionParams actionParams) { this.actionParams = actionParams; } /** *

* Parameters that control how the mitigation action is applied, specific to * the type of mitigation action. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param actionParams

* Parameters that control how the mitigation action is applied, * specific to the type of mitigation action. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withActionParams(MitigationActionParams actionParams) { this.actionParams = actionParams; return this; } /** *

* The date and time when the mitigation action was added to your Amazon Web * Services accounts. *

* * @return

* The date and time when the mitigation action was added to your * Amazon Web Services accounts. *

*/ public java.util.Date getCreationDate() { return creationDate; } /** *

* The date and time when the mitigation action was added to your Amazon Web * Services accounts. *

* * @param creationDate

* The date and time when the mitigation action was added to your * Amazon Web Services accounts. *

*/ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The date and time when the mitigation action was added to your Amazon Web * Services accounts. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param creationDate

* The date and time when the mitigation action was added to your * Amazon Web Services accounts. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; return this; } /** *

* The date and time when the mitigation action was last changed. *

* * @return

* The date and time when the mitigation action was last changed. *

*/ public java.util.Date getLastModifiedDate() { return lastModifiedDate; } /** *

* The date and time when the mitigation action was last changed. *

* * @param lastModifiedDate

* The date and time when the mitigation action was last changed. *

*/ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** *

* The date and time when the mitigation action was last changed. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lastModifiedDate

* The date and time when the mitigation action was last changed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DescribeMitigationActionResult withLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getActionName() != null) sb.append("actionName: " + getActionName() + ","); if (getActionType() != null) sb.append("actionType: " + getActionType() + ","); if (getActionArn() != null) sb.append("actionArn: " + getActionArn() + ","); if (getActionId() != null) sb.append("actionId: " + getActionId() + ","); if (getRoleArn() != null) sb.append("roleArn: " + getRoleArn() + ","); if (getActionParams() != null) sb.append("actionParams: " + getActionParams() + ","); if (getCreationDate() != null) sb.append("creationDate: " + getCreationDate() + ","); if (getLastModifiedDate() != null) sb.append("lastModifiedDate: " + getLastModifiedDate()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActionName() == null) ? 0 : getActionName().hashCode()); hashCode = prime * hashCode + ((getActionType() == null) ? 0 : getActionType().hashCode()); hashCode = prime * hashCode + ((getActionArn() == null) ? 0 : getActionArn().hashCode()); hashCode = prime * hashCode + ((getActionId() == null) ? 0 : getActionId().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getActionParams() == null) ? 0 : getActionParams().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeMitigationActionResult == false) return false; DescribeMitigationActionResult other = (DescribeMitigationActionResult) obj; if (other.getActionName() == null ^ this.getActionName() == null) return false; if (other.getActionName() != null && other.getActionName().equals(this.getActionName()) == false) return false; if (other.getActionType() == null ^ this.getActionType() == null) return false; if (other.getActionType() != null && other.getActionType().equals(this.getActionType()) == false) return false; if (other.getActionArn() == null ^ this.getActionArn() == null) return false; if (other.getActionArn() != null && other.getActionArn().equals(this.getActionArn()) == false) return false; if (other.getActionId() == null ^ this.getActionId() == null) return false; if (other.getActionId() != null && other.getActionId().equals(this.getActionId()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getActionParams() == null ^ this.getActionParams() == null) return false; if (other.getActionParams() != null && other.getActionParams().equals(this.getActionParams()) == 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.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false) return false; return true; } }