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

com.amazonaws.services.accessanalyzer.model.GetFindingV2Result Maven / Gradle / Ivy

/*
 * 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.accessanalyzer.model;

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

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

    /**
     * 

* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. *

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

* The time at which the finding was created. *

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

* An error. *

*/ private String error; /** *

* The ID of the finding to retrieve. *

*/ private String id; /** *

* A token used for pagination of results returned. *

*/ private String nextToken; /** *

* The resource that generated the finding. *

*/ private String resource; /** *

* The type of the resource identified in the finding. *

*/ private String resourceType; /** *

* Tye Amazon Web Services account ID that owns the resource. *

*/ private String resourceOwnerAccount; /** *

* The status of the finding. *

*/ private String status; /** *

* The time at which the finding was updated. *

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

* A localized message that explains the finding and provides guidance on how to address it. *

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

* The type of the finding. For external access analyzers, the type is ExternalAccess. For unused * access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. *

*/ private String findingType; /** *

* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. *

* * @param analyzedAt * The time at which the resource-based policy or IAM entity that generated the finding was analyzed. */ public void setAnalyzedAt(java.util.Date analyzedAt) { this.analyzedAt = analyzedAt; } /** *

* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. *

* * @return The time at which the resource-based policy or IAM entity that generated the finding was analyzed. */ public java.util.Date getAnalyzedAt() { return this.analyzedAt; } /** *

* The time at which the resource-based policy or IAM entity that generated the finding was analyzed. *

* * @param analyzedAt * The time at which the resource-based policy or IAM entity that generated the finding was analyzed. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withAnalyzedAt(java.util.Date analyzedAt) { setAnalyzedAt(analyzedAt); return this; } /** *

* The time at which the finding was created. *

* * @param createdAt * The time at which the finding was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The time at which the finding was created. *

* * @return The time at which the finding was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The time at which the finding was created. *

* * @param createdAt * The time at which the finding was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* An error. *

* * @param error * An error. */ public void setError(String error) { this.error = error; } /** *

* An error. *

* * @return An error. */ public String getError() { return this.error; } /** *

* An error. *

* * @param error * An error. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withError(String error) { setError(error); return this; } /** *

* The ID of the finding to retrieve. *

* * @param id * The ID of the finding to retrieve. */ public void setId(String id) { this.id = id; } /** *

* The ID of the finding to retrieve. *

* * @return The ID of the finding to retrieve. */ public String getId() { return this.id; } /** *

* The ID of the finding to retrieve. *

* * @param id * The ID of the finding to retrieve. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withId(String id) { setId(id); return this; } /** *

* A token used for pagination of results returned. *

* * @param nextToken * A token used for pagination of results returned. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* A token used for pagination of results returned. *

* * @return A token used for pagination of results returned. */ public String getNextToken() { return this.nextToken; } /** *

* A token used for pagination of results returned. *

* * @param nextToken * A token used for pagination of results returned. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** *

* The resource that generated the finding. *

* * @param resource * The resource that generated the finding. */ public void setResource(String resource) { this.resource = resource; } /** *

* The resource that generated the finding. *

* * @return The resource that generated the finding. */ public String getResource() { return this.resource; } /** *

* The resource that generated the finding. *

* * @param resource * The resource that generated the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withResource(String resource) { setResource(resource); return this; } /** *

* The type of the resource identified in the finding. *

* * @param resourceType * The type of the resource identified in the finding. * @see ResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The type of the resource identified in the finding. *

* * @return The type of the resource identified in the finding. * @see ResourceType */ public String getResourceType() { return this.resourceType; } /** *

* The type of the resource identified in the finding. *

* * @param resourceType * The type of the resource identified in the finding. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public GetFindingV2Result withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* The type of the resource identified in the finding. *

* * @param resourceType * The type of the resource identified in the finding. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public GetFindingV2Result withResourceType(ResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

* Tye Amazon Web Services account ID that owns the resource. *

* * @param resourceOwnerAccount * Tye Amazon Web Services account ID that owns the resource. */ public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; } /** *

* Tye Amazon Web Services account ID that owns the resource. *

* * @return Tye Amazon Web Services account ID that owns the resource. */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** *

* Tye Amazon Web Services account ID that owns the resource. *

* * @param resourceOwnerAccount * Tye Amazon Web Services account ID that owns the resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withResourceOwnerAccount(String resourceOwnerAccount) { setResourceOwnerAccount(resourceOwnerAccount); return this; } /** *

* The status of the finding. *

* * @param status * The status of the finding. * @see FindingStatus */ public void setStatus(String status) { this.status = status; } /** *

* The status of the finding. *

* * @return The status of the finding. * @see FindingStatus */ public String getStatus() { return this.status; } /** *

* The status of the finding. *

* * @param status * The status of the finding. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingStatus */ public GetFindingV2Result withStatus(String status) { setStatus(status); return this; } /** *

* The status of the finding. *

* * @param status * The status of the finding. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingStatus */ public GetFindingV2Result withStatus(FindingStatus status) { this.status = status.toString(); return this; } /** *

* The time at which the finding was updated. *

* * @param updatedAt * The time at which the finding was updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** *

* The time at which the finding was updated. *

* * @return The time at which the finding was updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** *

* The time at which the finding was updated. *

* * @param updatedAt * The time at which the finding was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); return this; } /** *

* A localized message that explains the finding and provides guidance on how to address it. *

* * @return A localized message that explains the finding and provides guidance on how to address it. */ public java.util.List getFindingDetails() { return findingDetails; } /** *

* A localized message that explains the finding and provides guidance on how to address it. *

* * @param findingDetails * A localized message that explains the finding and provides guidance on how to address it. */ public void setFindingDetails(java.util.Collection findingDetails) { if (findingDetails == null) { this.findingDetails = null; return; } this.findingDetails = new java.util.ArrayList(findingDetails); } /** *

* A localized message that explains the finding and provides guidance on how to address it. *

*

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

* * @param findingDetails * A localized message that explains the finding and provides guidance on how to address it. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withFindingDetails(FindingDetails... findingDetails) { if (this.findingDetails == null) { setFindingDetails(new java.util.ArrayList(findingDetails.length)); } for (FindingDetails ele : findingDetails) { this.findingDetails.add(ele); } return this; } /** *

* A localized message that explains the finding and provides guidance on how to address it. *

* * @param findingDetails * A localized message that explains the finding and provides guidance on how to address it. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFindingV2Result withFindingDetails(java.util.Collection findingDetails) { setFindingDetails(findingDetails); return this; } /** *

* The type of the finding. For external access analyzers, the type is ExternalAccess. For unused * access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. *

* * @param findingType * The type of the finding. For external access analyzers, the type is ExternalAccess. For * unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. * @see FindingType */ public void setFindingType(String findingType) { this.findingType = findingType; } /** *

* The type of the finding. For external access analyzers, the type is ExternalAccess. For unused * access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. *

* * @return The type of the finding. For external access analyzers, the type is ExternalAccess. For * unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. * @see FindingType */ public String getFindingType() { return this.findingType; } /** *

* The type of the finding. For external access analyzers, the type is ExternalAccess. For unused * access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. *

* * @param findingType * The type of the finding. For external access analyzers, the type is ExternalAccess. For * unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingType */ public GetFindingV2Result withFindingType(String findingType) { setFindingType(findingType); return this; } /** *

* The type of the finding. For external access analyzers, the type is ExternalAccess. For unused * access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. *

* * @param findingType * The type of the finding. For external access analyzers, the type is ExternalAccess. For * unused access analyzers, the type can be UnusedIAMRole, UnusedIAMUserAccessKey, * UnusedIAMUserPassword, or UnusedPermission. * @return Returns a reference to this object so that method calls can be chained together. * @see FindingType */ public GetFindingV2Result withFindingType(FindingType findingType) { this.findingType = findingType.toString(); 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 (getAnalyzedAt() != null) sb.append("AnalyzedAt: ").append(getAnalyzedAt()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getError() != null) sb.append("Error: ").append(getError()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()).append(","); if (getResource() != null) sb.append("Resource: ").append(getResource()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getResourceOwnerAccount() != null) sb.append("ResourceOwnerAccount: ").append(getResourceOwnerAccount()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()).append(","); if (getFindingDetails() != null) sb.append("FindingDetails: ").append(getFindingDetails()).append(","); if (getFindingType() != null) sb.append("FindingType: ").append(getFindingType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetFindingV2Result == false) return false; GetFindingV2Result other = (GetFindingV2Result) obj; if (other.getAnalyzedAt() == null ^ this.getAnalyzedAt() == null) return false; if (other.getAnalyzedAt() != null && other.getAnalyzedAt().equals(this.getAnalyzedAt()) == 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.getError() == null ^ this.getError() == null) return false; if (other.getError() != null && other.getError().equals(this.getError()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getResource() == null ^ this.getResource() == null) return false; if (other.getResource() != null && other.getResource().equals(this.getResource()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getResourceOwnerAccount() == null ^ this.getResourceOwnerAccount() == null) return false; if (other.getResourceOwnerAccount() != null && other.getResourceOwnerAccount().equals(this.getResourceOwnerAccount()) == 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.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; if (other.getFindingDetails() == null ^ this.getFindingDetails() == null) return false; if (other.getFindingDetails() != null && other.getFindingDetails().equals(this.getFindingDetails()) == false) return false; if (other.getFindingType() == null ^ this.getFindingType() == null) return false; if (other.getFindingType() != null && other.getFindingType().equals(this.getFindingType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAnalyzedAt() == null) ? 0 : getAnalyzedAt().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getError() == null) ? 0 : getError().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getResource() == null) ? 0 : getResource().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getResourceOwnerAccount() == null) ? 0 : getResourceOwnerAccount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getFindingDetails() == null) ? 0 : getFindingDetails().hashCode()); hashCode = prime * hashCode + ((getFindingType() == null) ? 0 : getFindingType().hashCode()); return hashCode; } @Override public GetFindingV2Result clone() { try { return (GetFindingV2Result) 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