/* * 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.accessanalyzer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Contains information about a finding. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FindingSummary implements Serializable, Cloneable, StructuredPojo { /** ** The ID of the finding. *
*/ private String id; /** ** The external principal that has access to a resource within the zone of trust. *
*/ private java.util.Map* The action in the analyzed policy statement that an external principal has permission to use. *
*/ private java.util.List* The resource that the external principal has access to. *
*/ private String resource; /** ** Indicates whether the finding reports a resource that has a policy that allows public access. *
*/ private Boolean isPublic; /** ** The type of the resource that the external principal has access to. *
*/ private String resourceType; /** ** The condition in the analyzed policy statement that resulted in a finding. *
*/ private java.util.Map* The time at which the finding was created. *
*/ private java.util.Date createdAt; /** ** The time at which the resource-based policy that generated the finding was analyzed. *
*/ private java.util.Date analyzedAt; /** ** The time at which the finding was most recently updated. *
*/ private java.util.Date updatedAt; /** ** The status of the finding. *
*/ private String status; /** ** The Amazon Web Services account ID that owns the resource. *
*/ private String resourceOwnerAccount; /** ** The error that resulted in an Error finding. *
*/ private String error; /** ** The sources of the finding. This indicates how the access that generated the finding is granted. It is populated * for Amazon S3 bucket findings. *
*/ private java.util.List* The ID of the finding. *
* * @param id * The ID of the finding. */ public void setId(String id) { this.id = id; } /** ** The ID of the finding. *
* * @return The ID of the finding. */ public String getId() { return this.id; } /** ** The ID of the finding. *
* * @param id * The ID of the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withId(String id) { setId(id); return this; } /** ** The external principal that has access to a resource within the zone of trust. *
* * @return The external principal that has access to a resource within the zone of trust. */ public java.util.Map* The external principal that has access to a resource within the zone of trust. *
* * @param principal * The external principal that has access to a resource within the zone of trust. */ public void setPrincipal(java.util.Map* The external principal that has access to a resource within the zone of trust. *
* * @param principal * The external principal that has access to a resource within the zone of trust. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withPrincipal(java.util.Map* The action in the analyzed policy statement that an external principal has permission to use. *
* * @return The action in the analyzed policy statement that an external principal has permission to use. */ public java.util.List* The action in the analyzed policy statement that an external principal has permission to use. *
* * @param action * The action in the analyzed policy statement that an external principal has permission to use. */ public void setAction(java.util.Collection* The action in the analyzed policy statement that an external principal has permission to use. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAction(java.util.Collection)} or {@link #withAction(java.util.Collection)} if you want to override the * existing values. *
* * @param action * The action in the analyzed policy statement that an external principal has permission to use. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withAction(String... action) { if (this.action == null) { setAction(new java.util.ArrayList* The action in the analyzed policy statement that an external principal has permission to use. *
* * @param action * The action in the analyzed policy statement that an external principal has permission to use. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withAction(java.util.Collection* The resource that the external principal has access to. *
* * @param resource * The resource that the external principal has access to. */ public void setResource(String resource) { this.resource = resource; } /** ** The resource that the external principal has access to. *
* * @return The resource that the external principal has access to. */ public String getResource() { return this.resource; } /** ** The resource that the external principal has access to. *
* * @param resource * The resource that the external principal has access to. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withResource(String resource) { setResource(resource); return this; } /** ** Indicates whether the finding reports a resource that has a policy that allows public access. *
* * @param isPublic * Indicates whether the finding reports a resource that has a policy that allows public access. */ public void setIsPublic(Boolean isPublic) { this.isPublic = isPublic; } /** ** Indicates whether the finding reports a resource that has a policy that allows public access. *
* * @return Indicates whether the finding reports a resource that has a policy that allows public access. */ public Boolean getIsPublic() { return this.isPublic; } /** ** Indicates whether the finding reports a resource that has a policy that allows public access. *
* * @param isPublic * Indicates whether the finding reports a resource that has a policy that allows public access. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withIsPublic(Boolean isPublic) { setIsPublic(isPublic); return this; } /** ** Indicates whether the finding reports a resource that has a policy that allows public access. *
* * @return Indicates whether the finding reports a resource that has a policy that allows public access. */ public Boolean isPublic() { return this.isPublic; } /** ** The type of the resource that the external principal has access to. *
* * @param resourceType * The type of the resource that the external principal has access to. * @see ResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** ** The type of the resource that the external principal has access to. *
* * @return The type of the resource that the external principal has access to. * @see ResourceType */ public String getResourceType() { return this.resourceType; } /** ** The type of the resource that the external principal has access to. *
* * @param resourceType * The type of the resource that the external principal has access to. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public FindingSummary withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** ** The type of the resource that the external principal has access to. *
* * @param resourceType * The type of the resource that the external principal has access to. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceType */ public FindingSummary withResourceType(ResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** ** The condition in the analyzed policy statement that resulted in a finding. *
* * @return The condition in the analyzed policy statement that resulted in a finding. */ public java.util.Map* The condition in the analyzed policy statement that resulted in a finding. *
* * @param condition * The condition in the analyzed policy statement that resulted in a finding. */ public void setCondition(java.util.Map* The condition in the analyzed policy statement that resulted in a finding. *
* * @param condition * The condition in the analyzed policy statement that resulted in a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withCondition(java.util.Map* 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 FindingSummary withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The time at which the resource-based policy that generated the finding was analyzed. *
* * @param analyzedAt * The time at which the resource-based policy that generated the finding was analyzed. */ public void setAnalyzedAt(java.util.Date analyzedAt) { this.analyzedAt = analyzedAt; } /** ** The time at which the resource-based policy that generated the finding was analyzed. *
* * @return The time at which the resource-based policy that generated the finding was analyzed. */ public java.util.Date getAnalyzedAt() { return this.analyzedAt; } /** ** The time at which the resource-based policy that generated the finding was analyzed. *
* * @param analyzedAt * The time at which the resource-based policy that generated the finding was analyzed. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withAnalyzedAt(java.util.Date analyzedAt) { setAnalyzedAt(analyzedAt); return this; } /** ** The time at which the finding was most recently updated. *
* * @param updatedAt * The time at which the finding was most recently updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** ** The time at which the finding was most recently updated. *
* * @return The time at which the finding was most recently updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** ** The time at which the finding was most recently updated. *
* * @param updatedAt * The time at which the finding was most recently updated. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); 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 FindingSummary 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 FindingSummary withStatus(FindingStatus status) { this.status = status.toString(); return this; } /** ** The Amazon Web Services account ID that owns the resource. *
* * @param resourceOwnerAccount * The Amazon Web Services account ID that owns the resource. */ public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; } /** ** The Amazon Web Services account ID that owns the resource. *
* * @return The Amazon Web Services account ID that owns the resource. */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** ** The Amazon Web Services account ID that owns the resource. *
* * @param resourceOwnerAccount * The 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 FindingSummary withResourceOwnerAccount(String resourceOwnerAccount) { setResourceOwnerAccount(resourceOwnerAccount); return this; } /** ** The error that resulted in an Error finding. *
* * @param error * The error that resulted in an Error finding. */ public void setError(String error) { this.error = error; } /** ** The error that resulted in an Error finding. *
* * @return The error that resulted in an Error finding. */ public String getError() { return this.error; } /** ** The error that resulted in an Error finding. *
* * @param error * The error that resulted in an Error finding. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withError(String error) { setError(error); return this; } /** ** The sources of the finding. This indicates how the access that generated the finding is granted. It is populated * for Amazon S3 bucket findings. *
* * @return The sources of the finding. This indicates how the access that generated the finding is granted. It is * populated for Amazon S3 bucket findings. */ public java.util.List* The sources of the finding. This indicates how the access that generated the finding is granted. It is populated * for Amazon S3 bucket findings. *
* * @param sources * The sources of the finding. This indicates how the access that generated the finding is granted. It is * populated for Amazon S3 bucket findings. */ public void setSources(java.util.Collection* The sources of the finding. This indicates how the access that generated the finding is granted. It is populated * for Amazon S3 bucket findings. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSources(java.util.Collection)} or {@link #withSources(java.util.Collection)} if you want to override * the existing values. *
* * @param sources * The sources of the finding. This indicates how the access that generated the finding is granted. It is * populated for Amazon S3 bucket findings. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withSources(FindingSource... sources) { if (this.sources == null) { setSources(new java.util.ArrayList* The sources of the finding. This indicates how the access that generated the finding is granted. It is populated * for Amazon S3 bucket findings. *
* * @param sources * The sources of the finding. This indicates how the access that generated the finding is granted. It is * populated for Amazon S3 bucket findings. * @return Returns a reference to this object so that method calls can be chained together. */ public FindingSummary withSources(java.util.Collection