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

com.amazonaws.services.inspector.model.Finding Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Inspector Service module holds the client classes that are used for communicating with Amazon Inspector 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.inspector.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains information about an Amazon Inspector finding. This data type is used as the response element in the * DescribeFindings action. *

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

* The ARN that specifies the finding. *

*/ private String arn; /** *

* The schema version of this data type. *

*/ private Integer schemaVersion; /** *

* The data element is set to "Inspector". *

*/ private String service; /** *

* This data type is used in the Finding data type. *

*/ private InspectorServiceAttributes serviceAttributes; /** *

* The type of the host from which the finding is generated. *

*/ private String assetType; /** *

* A collection of attributes of the host from which the finding is generated. *

*/ private AssetAttributes assetAttributes; /** *

* The ID of the finding. *

*/ private String id; /** *

* The name of the finding. *

*/ private String title; /** *

* The description of the finding. *

*/ private String description; /** *

* The recommendation for the finding. *

*/ private String recommendation; /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

*/ private String severity; /** *

* The numeric value of the finding severity. *

*/ private Double numericSeverity; /** *

* This data element is currently not used. *

*/ private Integer confidence; /** *

* This data element is currently not used. *

*/ private Boolean indicatorOfCompromise; /** *

* The system-defined attributes for the finding. *

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

* The user-defined attributes that are assigned to the finding. *

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

* The time when the finding was generated. *

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

* The time when AddAttributesToFindings is called. *

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

* The ARN that specifies the finding. *

* * @param arn * The ARN that specifies the finding. */ public void setArn(String arn) { this.arn = arn; } /** *

* The ARN that specifies the finding. *

* * @return The ARN that specifies the finding. */ public String getArn() { return this.arn; } /** *

* The ARN that specifies the finding. *

* * @param arn * The ARN that specifies the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withArn(String arn) { setArn(arn); return this; } /** *

* The schema version of this data type. *

* * @param schemaVersion * The schema version of this data type. */ public void setSchemaVersion(Integer schemaVersion) { this.schemaVersion = schemaVersion; } /** *

* The schema version of this data type. *

* * @return The schema version of this data type. */ public Integer getSchemaVersion() { return this.schemaVersion; } /** *

* The schema version of this data type. *

* * @param schemaVersion * The schema version of this data type. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withSchemaVersion(Integer schemaVersion) { setSchemaVersion(schemaVersion); return this; } /** *

* The data element is set to "Inspector". *

* * @param service * The data element is set to "Inspector". */ public void setService(String service) { this.service = service; } /** *

* The data element is set to "Inspector". *

* * @return The data element is set to "Inspector". */ public String getService() { return this.service; } /** *

* The data element is set to "Inspector". *

* * @param service * The data element is set to "Inspector". * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withService(String service) { setService(service); return this; } /** *

* This data type is used in the Finding data type. *

* * @param serviceAttributes * This data type is used in the Finding data type. */ public void setServiceAttributes(InspectorServiceAttributes serviceAttributes) { this.serviceAttributes = serviceAttributes; } /** *

* This data type is used in the Finding data type. *

* * @return This data type is used in the Finding data type. */ public InspectorServiceAttributes getServiceAttributes() { return this.serviceAttributes; } /** *

* This data type is used in the Finding data type. *

* * @param serviceAttributes * This data type is used in the Finding data type. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withServiceAttributes(InspectorServiceAttributes serviceAttributes) { setServiceAttributes(serviceAttributes); return this; } /** *

* The type of the host from which the finding is generated. *

* * @param assetType * The type of the host from which the finding is generated. * @see AssetType */ public void setAssetType(String assetType) { this.assetType = assetType; } /** *

* The type of the host from which the finding is generated. *

* * @return The type of the host from which the finding is generated. * @see AssetType */ public String getAssetType() { return this.assetType; } /** *

* The type of the host from which the finding is generated. *

* * @param assetType * The type of the host from which the finding is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see AssetType */ public Finding withAssetType(String assetType) { setAssetType(assetType); return this; } /** *

* The type of the host from which the finding is generated. *

* * @param assetType * The type of the host from which the finding is generated. * @see AssetType */ public void setAssetType(AssetType assetType) { withAssetType(assetType); } /** *

* The type of the host from which the finding is generated. *

* * @param assetType * The type of the host from which the finding is generated. * @return Returns a reference to this object so that method calls can be chained together. * @see AssetType */ public Finding withAssetType(AssetType assetType) { this.assetType = assetType.toString(); return this; } /** *

* A collection of attributes of the host from which the finding is generated. *

* * @param assetAttributes * A collection of attributes of the host from which the finding is generated. */ public void setAssetAttributes(AssetAttributes assetAttributes) { this.assetAttributes = assetAttributes; } /** *

* A collection of attributes of the host from which the finding is generated. *

* * @return A collection of attributes of the host from which the finding is generated. */ public AssetAttributes getAssetAttributes() { return this.assetAttributes; } /** *

* A collection of attributes of the host from which the finding is generated. *

* * @param assetAttributes * A collection of attributes of the host from which the finding is generated. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withAssetAttributes(AssetAttributes assetAttributes) { setAssetAttributes(assetAttributes); return this; } /** *

* 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 Finding withId(String id) { setId(id); return this; } /** *

* The name of the finding. *

* * @param title * The name of the finding. */ public void setTitle(String title) { this.title = title; } /** *

* The name of the finding. *

* * @return The name of the finding. */ public String getTitle() { return this.title; } /** *

* The name of the finding. *

* * @param title * The name of the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withTitle(String title) { setTitle(title); return this; } /** *

* The description of the finding. *

* * @param description * The description of the finding. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the finding. *

* * @return The description of the finding. */ public String getDescription() { return this.description; } /** *

* The description of the finding. *

* * @param description * The description of the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withDescription(String description) { setDescription(description); return this; } /** *

* The recommendation for the finding. *

* * @param recommendation * The recommendation for the finding. */ public void setRecommendation(String recommendation) { this.recommendation = recommendation; } /** *

* The recommendation for the finding. *

* * @return The recommendation for the finding. */ public String getRecommendation() { return this.recommendation; } /** *

* The recommendation for the finding. *

* * @param recommendation * The recommendation for the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withRecommendation(String recommendation) { setRecommendation(recommendation); return this; } /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

* * @param severity * The finding severity. Values can be set to High, Medium, Low, and Informational. * @see Severity */ public void setSeverity(String severity) { this.severity = severity; } /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

* * @return The finding severity. Values can be set to High, Medium, Low, and Informational. * @see Severity */ public String getSeverity() { return this.severity; } /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

* * @param severity * The finding severity. Values can be set to High, Medium, Low, and Informational. * @return Returns a reference to this object so that method calls can be chained together. * @see Severity */ public Finding withSeverity(String severity) { setSeverity(severity); return this; } /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

* * @param severity * The finding severity. Values can be set to High, Medium, Low, and Informational. * @see Severity */ public void setSeverity(Severity severity) { withSeverity(severity); } /** *

* The finding severity. Values can be set to High, Medium, Low, and Informational. *

* * @param severity * The finding severity. Values can be set to High, Medium, Low, and Informational. * @return Returns a reference to this object so that method calls can be chained together. * @see Severity */ public Finding withSeverity(Severity severity) { this.severity = severity.toString(); return this; } /** *

* The numeric value of the finding severity. *

* * @param numericSeverity * The numeric value of the finding severity. */ public void setNumericSeverity(Double numericSeverity) { this.numericSeverity = numericSeverity; } /** *

* The numeric value of the finding severity. *

* * @return The numeric value of the finding severity. */ public Double getNumericSeverity() { return this.numericSeverity; } /** *

* The numeric value of the finding severity. *

* * @param numericSeverity * The numeric value of the finding severity. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withNumericSeverity(Double numericSeverity) { setNumericSeverity(numericSeverity); return this; } /** *

* This data element is currently not used. *

* * @param confidence * This data element is currently not used. */ public void setConfidence(Integer confidence) { this.confidence = confidence; } /** *

* This data element is currently not used. *

* * @return This data element is currently not used. */ public Integer getConfidence() { return this.confidence; } /** *

* This data element is currently not used. *

* * @param confidence * This data element is currently not used. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withConfidence(Integer confidence) { setConfidence(confidence); return this; } /** *

* This data element is currently not used. *

* * @param indicatorOfCompromise * This data element is currently not used. */ public void setIndicatorOfCompromise(Boolean indicatorOfCompromise) { this.indicatorOfCompromise = indicatorOfCompromise; } /** *

* This data element is currently not used. *

* * @return This data element is currently not used. */ public Boolean getIndicatorOfCompromise() { return this.indicatorOfCompromise; } /** *

* This data element is currently not used. *

* * @param indicatorOfCompromise * This data element is currently not used. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withIndicatorOfCompromise(Boolean indicatorOfCompromise) { setIndicatorOfCompromise(indicatorOfCompromise); return this; } /** *

* This data element is currently not used. *

* * @return This data element is currently not used. */ public Boolean isIndicatorOfCompromise() { return this.indicatorOfCompromise; } /** *

* The system-defined attributes for the finding. *

* * @return The system-defined attributes for the finding. */ public java.util.List getAttributes() { return attributes; } /** *

* The system-defined attributes for the finding. *

* * @param attributes * The system-defined attributes for the finding. */ public void setAttributes(java.util.Collection attributes) { if (attributes == null) { this.attributes = null; return; } this.attributes = new java.util.ArrayList(attributes); } /** *

* The system-defined attributes for the finding. *

*

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

* * @param attributes * The system-defined attributes for the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withAttributes(Attribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList(attributes.length)); } for (Attribute ele : attributes) { this.attributes.add(ele); } return this; } /** *

* The system-defined attributes for the finding. *

* * @param attributes * The system-defined attributes for the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withAttributes(java.util.Collection attributes) { setAttributes(attributes); return this; } /** *

* The user-defined attributes that are assigned to the finding. *

* * @return The user-defined attributes that are assigned to the finding. */ public java.util.List getUserAttributes() { return userAttributes; } /** *

* The user-defined attributes that are assigned to the finding. *

* * @param userAttributes * The user-defined attributes that are assigned to the finding. */ public void setUserAttributes(java.util.Collection userAttributes) { if (userAttributes == null) { this.userAttributes = null; return; } this.userAttributes = new java.util.ArrayList(userAttributes); } /** *

* The user-defined attributes that are assigned to the finding. *

*

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

* * @param userAttributes * The user-defined attributes that are assigned to the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withUserAttributes(Attribute... userAttributes) { if (this.userAttributes == null) { setUserAttributes(new java.util.ArrayList(userAttributes.length)); } for (Attribute ele : userAttributes) { this.userAttributes.add(ele); } return this; } /** *

* The user-defined attributes that are assigned to the finding. *

* * @param userAttributes * The user-defined attributes that are assigned to the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withUserAttributes(java.util.Collection userAttributes) { setUserAttributes(userAttributes); return this; } /** *

* The time when the finding was generated. *

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

* The time when the finding was generated. *

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

* The time when the finding was generated. *

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

* The time when AddAttributesToFindings is called. *

* * @param updatedAt * The time when AddAttributesToFindings is called. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** *

* The time when AddAttributesToFindings is called. *

* * @return The time when AddAttributesToFindings is called. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** *

* The time when AddAttributesToFindings is called. *

* * @param updatedAt * The time when AddAttributesToFindings is called. * @return Returns a reference to this object so that method calls can be chained together. */ public Finding withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); 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 (getSchemaVersion() != null) sb.append("SchemaVersion: ").append(getSchemaVersion()).append(","); if (getService() != null) sb.append("Service: ").append(getService()).append(","); if (getServiceAttributes() != null) sb.append("ServiceAttributes: ").append(getServiceAttributes()).append(","); if (getAssetType() != null) sb.append("AssetType: ").append(getAssetType()).append(","); if (getAssetAttributes() != null) sb.append("AssetAttributes: ").append(getAssetAttributes()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRecommendation() != null) sb.append("Recommendation: ").append(getRecommendation()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getNumericSeverity() != null) sb.append("NumericSeverity: ").append(getNumericSeverity()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getIndicatorOfCompromise() != null) sb.append("IndicatorOfCompromise: ").append(getIndicatorOfCompromise()).append(","); if (getAttributes() != null) sb.append("Attributes: ").append(getAttributes()).append(","); if (getUserAttributes() != null) sb.append("UserAttributes: ").append(getUserAttributes()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Finding == false) return false; Finding other = (Finding) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getSchemaVersion() == null ^ this.getSchemaVersion() == null) return false; if (other.getSchemaVersion() != null && other.getSchemaVersion().equals(this.getSchemaVersion()) == false) return false; if (other.getService() == null ^ this.getService() == null) return false; if (other.getService() != null && other.getService().equals(this.getService()) == false) return false; if (other.getServiceAttributes() == null ^ this.getServiceAttributes() == null) return false; if (other.getServiceAttributes() != null && other.getServiceAttributes().equals(this.getServiceAttributes()) == false) return false; if (other.getAssetType() == null ^ this.getAssetType() == null) return false; if (other.getAssetType() != null && other.getAssetType().equals(this.getAssetType()) == false) return false; if (other.getAssetAttributes() == null ^ this.getAssetAttributes() == null) return false; if (other.getAssetAttributes() != null && other.getAssetAttributes().equals(this.getAssetAttributes()) == 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.getTitle() == null ^ this.getTitle() == null) return false; if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getRecommendation() == null ^ this.getRecommendation() == null) return false; if (other.getRecommendation() != null && other.getRecommendation().equals(this.getRecommendation()) == false) return false; if (other.getSeverity() == null ^ this.getSeverity() == null) return false; if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == false) return false; if (other.getNumericSeverity() == null ^ this.getNumericSeverity() == null) return false; if (other.getNumericSeverity() != null && other.getNumericSeverity().equals(this.getNumericSeverity()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; if (other.getIndicatorOfCompromise() == null ^ this.getIndicatorOfCompromise() == null) return false; if (other.getIndicatorOfCompromise() != null && other.getIndicatorOfCompromise().equals(this.getIndicatorOfCompromise()) == false) return false; if (other.getAttributes() == null ^ this.getAttributes() == null) return false; if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == false) return false; if (other.getUserAttributes() == null ^ this.getUserAttributes() == null) return false; if (other.getUserAttributes() != null && other.getUserAttributes().equals(this.getUserAttributes()) == 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.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == 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 + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode()); hashCode = prime * hashCode + ((getService() == null) ? 0 : getService().hashCode()); hashCode = prime * hashCode + ((getServiceAttributes() == null) ? 0 : getServiceAttributes().hashCode()); hashCode = prime * hashCode + ((getAssetType() == null) ? 0 : getAssetType().hashCode()); hashCode = prime * hashCode + ((getAssetAttributes() == null) ? 0 : getAssetAttributes().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRecommendation() == null) ? 0 : getRecommendation().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getNumericSeverity() == null) ? 0 : getNumericSeverity().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getIndicatorOfCompromise() == null) ? 0 : getIndicatorOfCompromise().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getUserAttributes() == null) ? 0 : getUserAttributes().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; } @Override public Finding clone() { try { return (Finding) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.inspector.model.transform.FindingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy