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

com.amazonaws.services.cloudformation.model.DescribeResourceScanResult Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
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.cloudformation.model;

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

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

    /**
     * 

* The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . *

*/ private String resourceScanId; /** *

* Status of the resource scan. *

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
*
*/ private String status; /** *

* The reason for the resource scan status, providing more information if a failure happened. *

*/ private String statusReason; /** *

* The time that the resource scan was started. *

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

* The time that the resource scan was finished. *

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

* The percentage of the resource scan that has been completed. *

*/ private Double percentageCompleted; /** *

* The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . *

*/ private com.amazonaws.internal.SdkInternalList resourceTypes; /** *

* The number of resources that were listed. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

*/ private Integer resourcesScanned; /** *

* The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* *

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*
*/ private Integer resourcesRead; /** *

* The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . *

* * @param resourceScanId * The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . */ public void setResourceScanId(String resourceScanId) { this.resourceScanId = resourceScanId; } /** *

* The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . *

* * @return The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . */ public String getResourceScanId() { return this.resourceScanId; } /** *

* The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . *

* * @param resourceScanId * The Amazon Resource Name (ARN) of the resource scan. The format is * arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}. An example is * arn:aws:cloudformation:us-east-1:123456789012:resourceScan/f5b490f7-7ed4-428a-aa06-31ff25db0772 * . * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withResourceScanId(String resourceScanId) { setResourceScanId(resourceScanId); return this; } /** *

* Status of the resource scan. *

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
*
* * @param status * Status of the resource scan.

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
* @see ResourceScanStatus */ public void setStatus(String status) { this.status = status; } /** *

* Status of the resource scan. *

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
*
* * @return Status of the resource scan.

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
* @see ResourceScanStatus */ public String getStatus() { return this.status; } /** *

* Status of the resource scan. *

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
*
* * @param status * Status of the resource scan.

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see ResourceScanStatus */ public DescribeResourceScanResult withStatus(String status) { setStatus(status); return this; } /** *

* Status of the resource scan. *

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
*
* * @param status * Status of the resource scan.

*
*
INPROGRESS
*
*

* The resource scan is still in progress. *

*
*
COMPLETE
*
*

* The resource scan is complete. *

*
*
EXPIRED
*
*

* The resource scan has expired. *

*
*
FAILED
*
*

* The resource scan has failed. *

*
* @return Returns a reference to this object so that method calls can be chained together. * @see ResourceScanStatus */ public DescribeResourceScanResult withStatus(ResourceScanStatus status) { this.status = status.toString(); return this; } /** *

* The reason for the resource scan status, providing more information if a failure happened. *

* * @param statusReason * The reason for the resource scan status, providing more information if a failure happened. */ public void setStatusReason(String statusReason) { this.statusReason = statusReason; } /** *

* The reason for the resource scan status, providing more information if a failure happened. *

* * @return The reason for the resource scan status, providing more information if a failure happened. */ public String getStatusReason() { return this.statusReason; } /** *

* The reason for the resource scan status, providing more information if a failure happened. *

* * @param statusReason * The reason for the resource scan status, providing more information if a failure happened. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withStatusReason(String statusReason) { setStatusReason(statusReason); return this; } /** *

* The time that the resource scan was started. *

* * @param startTime * The time that the resource scan was started. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The time that the resource scan was started. *

* * @return The time that the resource scan was started. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The time that the resource scan was started. *

* * @param startTime * The time that the resource scan was started. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The time that the resource scan was finished. *

* * @param endTime * The time that the resource scan was finished. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The time that the resource scan was finished. *

* * @return The time that the resource scan was finished. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The time that the resource scan was finished. *

* * @param endTime * The time that the resource scan was finished. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* The percentage of the resource scan that has been completed. *

* * @param percentageCompleted * The percentage of the resource scan that has been completed. */ public void setPercentageCompleted(Double percentageCompleted) { this.percentageCompleted = percentageCompleted; } /** *

* The percentage of the resource scan that has been completed. *

* * @return The percentage of the resource scan that has been completed. */ public Double getPercentageCompleted() { return this.percentageCompleted; } /** *

* The percentage of the resource scan that has been completed. *

* * @param percentageCompleted * The percentage of the resource scan that has been completed. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withPercentageCompleted(Double percentageCompleted) { setPercentageCompleted(percentageCompleted); return this; } /** *

* The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . *

* * @return The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . */ public java.util.List getResourceTypes() { if (resourceTypes == null) { resourceTypes = new com.amazonaws.internal.SdkInternalList(); } return resourceTypes; } /** *

* The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . *

* * @param resourceTypes * The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . */ public void setResourceTypes(java.util.Collection resourceTypes) { if (resourceTypes == null) { this.resourceTypes = null; return; } this.resourceTypes = new com.amazonaws.internal.SdkInternalList(resourceTypes); } /** *

* The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . *

*

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

* * @param resourceTypes * The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withResourceTypes(String... resourceTypes) { if (this.resourceTypes == null) { setResourceTypes(new com.amazonaws.internal.SdkInternalList(resourceTypes.length)); } for (String ele : resourceTypes) { this.resourceTypes.add(ele); } return this; } /** *

* The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . *

* * @param resourceTypes * The list of resource types for the specified scan. Resource types are only available for scans with a * Status set to COMPLETE or FAILED . * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withResourceTypes(java.util.Collection resourceTypes) { setResourceTypes(resourceTypes); return this; } /** *

* The number of resources that were listed. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* * @param resourcesScanned * The number of resources that were listed. This is only available for scans with a Status set * to COMPLETE, EXPIRED, or FAILED . */ public void setResourcesScanned(Integer resourcesScanned) { this.resourcesScanned = resourcesScanned; } /** *

* The number of resources that were listed. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* * @return The number of resources that were listed. This is only available for scans with a Status set * to COMPLETE, EXPIRED, or FAILED . */ public Integer getResourcesScanned() { return this.resourcesScanned; } /** *

* The number of resources that were listed. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* * @param resourcesScanned * The number of resources that were listed. This is only available for scans with a Status set * to COMPLETE, EXPIRED, or FAILED . * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withResourcesScanned(Integer resourcesScanned) { setResourcesScanned(resourcesScanned); return this; } /** *

* The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* *

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*
* * @param resourcesRead * The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED .

*

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*/ public void setResourcesRead(Integer resourcesRead) { this.resourcesRead = resourcesRead; } /** *

* The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* *

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*
* * @return The number of resources that were read. This is only available for scans with a Status set * to COMPLETE, EXPIRED, or FAILED .

*

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*/ public Integer getResourcesRead() { return this.resourcesRead; } /** *

* The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED . *

* *

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

*
* * @param resourcesRead * The number of resources that were read. This is only available for scans with a Status set to * COMPLETE, EXPIRED, or FAILED .

*

* This field may be 0 if the resource scan failed with a ResourceScanLimitExceededException. *

* @return Returns a reference to this object so that method calls can be chained together. */ public DescribeResourceScanResult withResourcesRead(Integer resourcesRead) { setResourcesRead(resourcesRead); 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 (getResourceScanId() != null) sb.append("ResourceScanId: ").append(getResourceScanId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusReason() != null) sb.append("StatusReason: ").append(getStatusReason()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getPercentageCompleted() != null) sb.append("PercentageCompleted: ").append(getPercentageCompleted()).append(","); if (getResourceTypes() != null) sb.append("ResourceTypes: ").append(getResourceTypes()).append(","); if (getResourcesScanned() != null) sb.append("ResourcesScanned: ").append(getResourcesScanned()).append(","); if (getResourcesRead() != null) sb.append("ResourcesRead: ").append(getResourcesRead()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeResourceScanResult == false) return false; DescribeResourceScanResult other = (DescribeResourceScanResult) obj; if (other.getResourceScanId() == null ^ this.getResourceScanId() == null) return false; if (other.getResourceScanId() != null && other.getResourceScanId().equals(this.getResourceScanId()) == 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.getStatusReason() == null ^ this.getStatusReason() == null) return false; if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getPercentageCompleted() == null ^ this.getPercentageCompleted() == null) return false; if (other.getPercentageCompleted() != null && other.getPercentageCompleted().equals(this.getPercentageCompleted()) == false) return false; if (other.getResourceTypes() == null ^ this.getResourceTypes() == null) return false; if (other.getResourceTypes() != null && other.getResourceTypes().equals(this.getResourceTypes()) == false) return false; if (other.getResourcesScanned() == null ^ this.getResourcesScanned() == null) return false; if (other.getResourcesScanned() != null && other.getResourcesScanned().equals(this.getResourcesScanned()) == false) return false; if (other.getResourcesRead() == null ^ this.getResourcesRead() == null) return false; if (other.getResourcesRead() != null && other.getResourcesRead().equals(this.getResourcesRead()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceScanId() == null) ? 0 : getResourceScanId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getPercentageCompleted() == null) ? 0 : getPercentageCompleted().hashCode()); hashCode = prime * hashCode + ((getResourceTypes() == null) ? 0 : getResourceTypes().hashCode()); hashCode = prime * hashCode + ((getResourcesScanned() == null) ? 0 : getResourcesScanned().hashCode()); hashCode = prime * hashCode + ((getResourcesRead() == null) ? 0 : getResourcesRead().hashCode()); return hashCode; } @Override public DescribeResourceScanResult clone() { try { return (DescribeResourceScanResult) 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