All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.guardduty.model.GetMalwareProtectionPlanResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon GuardDuty module holds the client classes that are used for communicating with Amazon GuardDuty Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.guardduty.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetMalwareProtectionPlanResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* Amazon Resource Name (ARN) of the protected resource. *

*/ private String arn; /** *

* IAM role that includes the permissions required to scan and add tags to the associated protected resource. *

*/ private String role; /** *

* Information about the protected resource that is associated with the created Malware Protection plan. Presently, * S3Bucket is the only supported protected resource. *

*/ private CreateProtectedResource protectedResource; /** *

* Information about whether the tags will be added to the S3 object after scanning. *

*/ private MalwareProtectionPlanActions actions; /** *

* The timestamp when the Malware Protection plan resource was created. *

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

* Malware Protection plan status. *

*/ private String status; /** *

* Information about the issue code and message associated to the status of your Malware Protection plan. *

*/ private java.util.List statusReasons; /** *

* Tags added to the Malware Protection plan resource. *

*/ private java.util.Map tags; /** *

* Amazon Resource Name (ARN) of the protected resource. *

* * @param arn * Amazon Resource Name (ARN) of the protected resource. */ public void setArn(String arn) { this.arn = arn; } /** *

* Amazon Resource Name (ARN) of the protected resource. *

* * @return Amazon Resource Name (ARN) of the protected resource. */ public String getArn() { return this.arn; } /** *

* Amazon Resource Name (ARN) of the protected resource. *

* * @param arn * Amazon Resource Name (ARN) of the protected resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withArn(String arn) { setArn(arn); return this; } /** *

* IAM role that includes the permissions required to scan and add tags to the associated protected resource. *

* * @param role * IAM role that includes the permissions required to scan and add tags to the associated protected resource. */ public void setRole(String role) { this.role = role; } /** *

* IAM role that includes the permissions required to scan and add tags to the associated protected resource. *

* * @return IAM role that includes the permissions required to scan and add tags to the associated protected * resource. */ public String getRole() { return this.role; } /** *

* IAM role that includes the permissions required to scan and add tags to the associated protected resource. *

* * @param role * IAM role that includes the permissions required to scan and add tags to the associated protected resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withRole(String role) { setRole(role); return this; } /** *

* Information about the protected resource that is associated with the created Malware Protection plan. Presently, * S3Bucket is the only supported protected resource. *

* * @param protectedResource * Information about the protected resource that is associated with the created Malware Protection plan. * Presently, S3Bucket is the only supported protected resource. */ public void setProtectedResource(CreateProtectedResource protectedResource) { this.protectedResource = protectedResource; } /** *

* Information about the protected resource that is associated with the created Malware Protection plan. Presently, * S3Bucket is the only supported protected resource. *

* * @return Information about the protected resource that is associated with the created Malware Protection plan. * Presently, S3Bucket is the only supported protected resource. */ public CreateProtectedResource getProtectedResource() { return this.protectedResource; } /** *

* Information about the protected resource that is associated with the created Malware Protection plan. Presently, * S3Bucket is the only supported protected resource. *

* * @param protectedResource * Information about the protected resource that is associated with the created Malware Protection plan. * Presently, S3Bucket is the only supported protected resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withProtectedResource(CreateProtectedResource protectedResource) { setProtectedResource(protectedResource); return this; } /** *

* Information about whether the tags will be added to the S3 object after scanning. *

* * @param actions * Information about whether the tags will be added to the S3 object after scanning. */ public void setActions(MalwareProtectionPlanActions actions) { this.actions = actions; } /** *

* Information about whether the tags will be added to the S3 object after scanning. *

* * @return Information about whether the tags will be added to the S3 object after scanning. */ public MalwareProtectionPlanActions getActions() { return this.actions; } /** *

* Information about whether the tags will be added to the S3 object after scanning. *

* * @param actions * Information about whether the tags will be added to the S3 object after scanning. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withActions(MalwareProtectionPlanActions actions) { setActions(actions); return this; } /** *

* The timestamp when the Malware Protection plan resource was created. *

* * @param createdAt * The timestamp when the Malware Protection plan resource was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The timestamp when the Malware Protection plan resource was created. *

* * @return The timestamp when the Malware Protection plan resource was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The timestamp when the Malware Protection plan resource was created. *

* * @param createdAt * The timestamp when the Malware Protection plan resource was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* Malware Protection plan status. *

* * @param status * Malware Protection plan status. * @see MalwareProtectionPlanStatus */ public void setStatus(String status) { this.status = status; } /** *

* Malware Protection plan status. *

* * @return Malware Protection plan status. * @see MalwareProtectionPlanStatus */ public String getStatus() { return this.status; } /** *

* Malware Protection plan status. *

* * @param status * Malware Protection plan status. * @return Returns a reference to this object so that method calls can be chained together. * @see MalwareProtectionPlanStatus */ public GetMalwareProtectionPlanResult withStatus(String status) { setStatus(status); return this; } /** *

* Malware Protection plan status. *

* * @param status * Malware Protection plan status. * @return Returns a reference to this object so that method calls can be chained together. * @see MalwareProtectionPlanStatus */ public GetMalwareProtectionPlanResult withStatus(MalwareProtectionPlanStatus status) { this.status = status.toString(); return this; } /** *

* Information about the issue code and message associated to the status of your Malware Protection plan. *

* * @return Information about the issue code and message associated to the status of your Malware Protection plan. */ public java.util.List getStatusReasons() { return statusReasons; } /** *

* Information about the issue code and message associated to the status of your Malware Protection plan. *

* * @param statusReasons * Information about the issue code and message associated to the status of your Malware Protection plan. */ public void setStatusReasons(java.util.Collection statusReasons) { if (statusReasons == null) { this.statusReasons = null; return; } this.statusReasons = new java.util.ArrayList(statusReasons); } /** *

* Information about the issue code and message associated to the status of your Malware Protection plan. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setStatusReasons(java.util.Collection)} or {@link #withStatusReasons(java.util.Collection)} if you want * to override the existing values. *

* * @param statusReasons * Information about the issue code and message associated to the status of your Malware Protection plan. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withStatusReasons(MalwareProtectionPlanStatusReason... statusReasons) { if (this.statusReasons == null) { setStatusReasons(new java.util.ArrayList(statusReasons.length)); } for (MalwareProtectionPlanStatusReason ele : statusReasons) { this.statusReasons.add(ele); } return this; } /** *

* Information about the issue code and message associated to the status of your Malware Protection plan. *

* * @param statusReasons * Information about the issue code and message associated to the status of your Malware Protection plan. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withStatusReasons(java.util.Collection statusReasons) { setStatusReasons(statusReasons); return this; } /** *

* Tags added to the Malware Protection plan resource. *

* * @return Tags added to the Malware Protection plan resource. */ public java.util.Map getTags() { return tags; } /** *

* Tags added to the Malware Protection plan resource. *

* * @param tags * Tags added to the Malware Protection plan resource. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* Tags added to the Malware Protection plan resource. *

* * @param tags * Tags added to the Malware Protection plan resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see GetMalwareProtectionPlanResult#withTags * @returns a reference to this object so that method calls can be chained together. */ public GetMalwareProtectionPlanResult 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 GetMalwareProtectionPlanResult clearTagsEntries() { this.tags = null; 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getRole() != null) sb.append("Role: ").append(getRole()).append(","); if (getProtectedResource() != null) sb.append("ProtectedResource: ").append(getProtectedResource()).append(","); if (getActions() != null) sb.append("Actions: ").append(getActions()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusReasons() != null) sb.append("StatusReasons: ").append(getStatusReasons()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetMalwareProtectionPlanResult == false) return false; GetMalwareProtectionPlanResult other = (GetMalwareProtectionPlanResult) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getRole() == null ^ this.getRole() == null) return false; if (other.getRole() != null && other.getRole().equals(this.getRole()) == false) return false; if (other.getProtectedResource() == null ^ this.getProtectedResource() == null) return false; if (other.getProtectedResource() != null && other.getProtectedResource().equals(this.getProtectedResource()) == false) return false; if (other.getActions() == null ^ this.getActions() == null) return false; if (other.getActions() != null && other.getActions().equals(this.getActions()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getStatusReasons() == null ^ this.getStatusReasons() == null) return false; if (other.getStatusReasons() != null && other.getStatusReasons().equals(this.getStatusReasons()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode()); hashCode = prime * hashCode + ((getProtectedResource() == null) ? 0 : getProtectedResource().hashCode()); hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusReasons() == null) ? 0 : getStatusReasons().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public GetMalwareProtectionPlanResult clone() { try { return (GetMalwareProtectionPlanResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy