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

com.amazonaws.services.securityhub.model.AwsSecurityFinding Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2014-2019 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.securityhub.model;

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

/**
 * 

* Provides consistent format for the contents of the Security Hub-aggregated findings. AwsSecurityFinding format * enables you to share findings between AWS security services and third-party solutions, and compliance checks. *

* *

* A finding is a potential security issue generated either by AWS services (GuardDuty, Inspector, Macie) or by the * integrated third-party solutions and compliance checks. *

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

* The schema version for which a finding is formatted. *

*/ private String schemaVersion; /** *

* The security findings provider-specific identifier for a finding. *

*/ private String id; /** *

* The ARN generated by Security Hub that uniquely identifies a third-party company (security findings provider) * once this provider's product (solution that generates findings) is registered with Security Hub. *

*/ private String productArn; /** *

* This is the identifier for the solution-specific component (a discrete unit of logic) that generated a finding. * In various security findings provider's solutions, this generator can be called a rule, a check, a detector, a * plug-in, etc. *

*/ private String generatorId; /** *

* The AWS account ID in which a finding is generated. *

*/ private String awsAccountId; /** *

* One or more finding types in the format of 'namespace/category/classifier' that classify a finding. *

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | Sensitive * Data Identifications *

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

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was first * observed by the security findings provider. *

*/ private String firstObservedAt; /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was most * recently observed by the security findings provider. *

*/ private String lastObservedAt; /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was created * by the security findings provider. *

*/ private String createdAt; /** *

* An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security findings * provider. *

*/ private String updatedAt; /** *

* A finding's severity. *

*/ private Severity severity; /** *

* A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the behavior * or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio scale. 0 equates * zero percent confidence and 100 equates to 100 percent confidence. *

*/ private Integer confidence; /** *

* The level of importance assigned to the resources associated with the finding. A score of 0 means the underlying * resources have no criticality, and a score of 100 is reserved for the most critical resources. *

*/ private Integer criticality; /** *

* A finding's title. *

*/ private String title; /** *

* A finding's description. *

*/ private String description; /** *

* An data type that describes the remediation options for a finding. *

*/ private Remediation remediation; /** *

* A URL that links to a page about the current finding in the security findings provider's solution. *

*/ private String sourceUrl; /** *

* A data type where security findings providers can include additional solution-specific details that are not part * of the defined AwsSecurityFinding format. *

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

* A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a * finding. *

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

* A list of malware related to a finding. *

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

* The details of network-related information about a finding. *

*/ private Network network; /** *

* The details of process-related information about a finding. *

*/ private ProcessDetails process; /** *

* Threat intel details related to a finding. *

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

* A set of resource data types that describe the resources to which the finding refers. *

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

* This data type is exclusive to findings that are generated as the result of a check run against a specific rule * in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding details. *

*/ private Compliance compliance; /** *

* Indicates the veracity of a finding. *

*/ private String verificationState; /** *

* The workflow state of a finding. *

*/ private String workflowState; /** *

* The record state of a finding. *

*/ private String recordState; /** *

* A list of related findings. *

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

* A user-defined note added to a finding. *

*/ private Note note; /** *

* The schema version for which a finding is formatted. *

* * @param schemaVersion * The schema version for which a finding is formatted. */ public void setSchemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; } /** *

* The schema version for which a finding is formatted. *

* * @return The schema version for which a finding is formatted. */ public String getSchemaVersion() { return this.schemaVersion; } /** *

* The schema version for which a finding is formatted. *

* * @param schemaVersion * The schema version for which a finding is formatted. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withSchemaVersion(String schemaVersion) { setSchemaVersion(schemaVersion); return this; } /** *

* The security findings provider-specific identifier for a finding. *

* * @param id * The security findings provider-specific identifier for a finding. */ public void setId(String id) { this.id = id; } /** *

* The security findings provider-specific identifier for a finding. *

* * @return The security findings provider-specific identifier for a finding. */ public String getId() { return this.id; } /** *

* The security findings provider-specific identifier for a finding. *

* * @param id * The security findings provider-specific identifier for a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withId(String id) { setId(id); return this; } /** *

* The ARN generated by Security Hub that uniquely identifies a third-party company (security findings provider) * once this provider's product (solution that generates findings) is registered with Security Hub. *

* * @param productArn * The ARN generated by Security Hub that uniquely identifies a third-party company (security findings * provider) once this provider's product (solution that generates findings) is registered with Security Hub. */ public void setProductArn(String productArn) { this.productArn = productArn; } /** *

* The ARN generated by Security Hub that uniquely identifies a third-party company (security findings provider) * once this provider's product (solution that generates findings) is registered with Security Hub. *

* * @return The ARN generated by Security Hub that uniquely identifies a third-party company (security findings * provider) once this provider's product (solution that generates findings) is registered with Security * Hub. */ public String getProductArn() { return this.productArn; } /** *

* The ARN generated by Security Hub that uniquely identifies a third-party company (security findings provider) * once this provider's product (solution that generates findings) is registered with Security Hub. *

* * @param productArn * The ARN generated by Security Hub that uniquely identifies a third-party company (security findings * provider) once this provider's product (solution that generates findings) is registered with Security Hub. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withProductArn(String productArn) { setProductArn(productArn); return this; } /** *

* This is the identifier for the solution-specific component (a discrete unit of logic) that generated a finding. * In various security findings provider's solutions, this generator can be called a rule, a check, a detector, a * plug-in, etc. *

* * @param generatorId * This is the identifier for the solution-specific component (a discrete unit of logic) that generated a * finding. In various security findings provider's solutions, this generator can be called a rule, a check, * a detector, a plug-in, etc. */ public void setGeneratorId(String generatorId) { this.generatorId = generatorId; } /** *

* This is the identifier for the solution-specific component (a discrete unit of logic) that generated a finding. * In various security findings provider's solutions, this generator can be called a rule, a check, a detector, a * plug-in, etc. *

* * @return This is the identifier for the solution-specific component (a discrete unit of logic) that generated a * finding. In various security findings provider's solutions, this generator can be called a rule, a check, * a detector, a plug-in, etc. */ public String getGeneratorId() { return this.generatorId; } /** *

* This is the identifier for the solution-specific component (a discrete unit of logic) that generated a finding. * In various security findings provider's solutions, this generator can be called a rule, a check, a detector, a * plug-in, etc. *

* * @param generatorId * This is the identifier for the solution-specific component (a discrete unit of logic) that generated a * finding. In various security findings provider's solutions, this generator can be called a rule, a check, * a detector, a plug-in, etc. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withGeneratorId(String generatorId) { setGeneratorId(generatorId); return this; } /** *

* The AWS account ID in which a finding is generated. *

* * @param awsAccountId * The AWS account ID in which a finding is generated. */ public void setAwsAccountId(String awsAccountId) { this.awsAccountId = awsAccountId; } /** *

* The AWS account ID in which a finding is generated. *

* * @return The AWS account ID in which a finding is generated. */ public String getAwsAccountId() { return this.awsAccountId; } /** *

* The AWS account ID in which a finding is generated. *

* * @param awsAccountId * The AWS account ID in which a finding is generated. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withAwsAccountId(String awsAccountId) { setAwsAccountId(awsAccountId); return this; } /** *

* One or more finding types in the format of 'namespace/category/classifier' that classify a finding. *

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | Sensitive * Data Identifications *

* * @return One or more finding types in the format of 'namespace/category/classifier' that classify a finding.

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | * Sensitive Data Identifications */ public java.util.List getTypes() { return types; } /** *

* One or more finding types in the format of 'namespace/category/classifier' that classify a finding. *

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | Sensitive * Data Identifications *

* * @param types * One or more finding types in the format of 'namespace/category/classifier' that classify a finding.

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | * Sensitive Data Identifications */ public void setTypes(java.util.Collection types) { if (types == null) { this.types = null; return; } this.types = new java.util.ArrayList(types); } /** *

* One or more finding types in the format of 'namespace/category/classifier' that classify a finding. *

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | Sensitive * Data Identifications *

*

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

* * @param types * One or more finding types in the format of 'namespace/category/classifier' that classify a finding.

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | * Sensitive Data Identifications * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withTypes(String... types) { if (this.types == null) { setTypes(new java.util.ArrayList(types.length)); } for (String ele : types) { this.types.add(ele); } return this; } /** *

* One or more finding types in the format of 'namespace/category/classifier' that classify a finding. *

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | Sensitive * Data Identifications *

* * @param types * One or more finding types in the format of 'namespace/category/classifier' that classify a finding.

*

* Valid namespace values are: Software and Configuration Checks | TTPs | Effects | Unusual Behaviors | * Sensitive Data Identifications * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withTypes(java.util.Collection types) { setTypes(types); return this; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was first * observed by the security findings provider. *

* * @param firstObservedAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * first observed by the security findings provider. */ public void setFirstObservedAt(String firstObservedAt) { this.firstObservedAt = firstObservedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was first * observed by the security findings provider. *

* * @return An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * first observed by the security findings provider. */ public String getFirstObservedAt() { return this.firstObservedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was first * observed by the security findings provider. *

* * @param firstObservedAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * first observed by the security findings provider. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withFirstObservedAt(String firstObservedAt) { setFirstObservedAt(firstObservedAt); return this; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was most * recently observed by the security findings provider. *

* * @param lastObservedAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * most recently observed by the security findings provider. */ public void setLastObservedAt(String lastObservedAt) { this.lastObservedAt = lastObservedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was most * recently observed by the security findings provider. *

* * @return An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * most recently observed by the security findings provider. */ public String getLastObservedAt() { return this.lastObservedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was most * recently observed by the security findings provider. *

* * @param lastObservedAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * most recently observed by the security findings provider. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withLastObservedAt(String lastObservedAt) { setLastObservedAt(lastObservedAt); return this; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was created * by the security findings provider. *

* * @param createdAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * created by the security findings provider. */ public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was created * by the security findings provider. *

* * @return An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * created by the security findings provider. */ public String getCreatedAt() { return this.createdAt; } /** *

* An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was created * by the security findings provider. *

* * @param createdAt * An ISO8601-formatted timestamp that indicates when the potential security issue captured by a finding was * created by the security findings provider. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withCreatedAt(String createdAt) { setCreatedAt(createdAt); return this; } /** *

* An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security findings * provider. *

* * @param updatedAt * An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security * findings provider. */ public void setUpdatedAt(String updatedAt) { this.updatedAt = updatedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security findings * provider. *

* * @return An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security * findings provider. */ public String getUpdatedAt() { return this.updatedAt; } /** *

* An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security findings * provider. *

* * @param updatedAt * An ISO8601-formatted timestamp that indicates when the finding record was last updated by the security * findings provider. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withUpdatedAt(String updatedAt) { setUpdatedAt(updatedAt); return this; } /** *

* A finding's severity. *

* * @param severity * A finding's severity. */ public void setSeverity(Severity severity) { this.severity = severity; } /** *

* A finding's severity. *

* * @return A finding's severity. */ public Severity getSeverity() { return this.severity; } /** *

* A finding's severity. *

* * @param severity * A finding's severity. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withSeverity(Severity severity) { setSeverity(severity); return this; } /** *

* A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the behavior * or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio scale. 0 equates * zero percent confidence and 100 equates to 100 percent confidence. *

* * @param confidence * A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the * behavior or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio * scale. 0 equates zero percent confidence and 100 equates to 100 percent confidence. */ public void setConfidence(Integer confidence) { this.confidence = confidence; } /** *

* A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the behavior * or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio scale. 0 equates * zero percent confidence and 100 equates to 100 percent confidence. *

* * @return A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the * behavior or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio * scale. 0 equates zero percent confidence and 100 equates to 100 percent confidence. */ public Integer getConfidence() { return this.confidence; } /** *

* A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the behavior * or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio scale. 0 equates * zero percent confidence and 100 equates to 100 percent confidence. *

* * @param confidence * A finding's confidence. Confidence is defined as the likelihood that a finding accurately identifies the * behavior or issue that it was intended to identify. Confidence is scored on a 0-100 basis using a ratio * scale. 0 equates zero percent confidence and 100 equates to 100 percent confidence. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withConfidence(Integer confidence) { setConfidence(confidence); return this; } /** *

* The level of importance assigned to the resources associated with the finding. A score of 0 means the underlying * resources have no criticality, and a score of 100 is reserved for the most critical resources. *

* * @param criticality * The level of importance assigned to the resources associated with the finding. A score of 0 means the * underlying resources have no criticality, and a score of 100 is reserved for the most critical resources. */ public void setCriticality(Integer criticality) { this.criticality = criticality; } /** *

* The level of importance assigned to the resources associated with the finding. A score of 0 means the underlying * resources have no criticality, and a score of 100 is reserved for the most critical resources. *

* * @return The level of importance assigned to the resources associated with the finding. A score of 0 means the * underlying resources have no criticality, and a score of 100 is reserved for the most critical resources. */ public Integer getCriticality() { return this.criticality; } /** *

* The level of importance assigned to the resources associated with the finding. A score of 0 means the underlying * resources have no criticality, and a score of 100 is reserved for the most critical resources. *

* * @param criticality * The level of importance assigned to the resources associated with the finding. A score of 0 means the * underlying resources have no criticality, and a score of 100 is reserved for the most critical resources. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withCriticality(Integer criticality) { setCriticality(criticality); return this; } /** *

* A finding's title. *

* * @param title * A finding's title. */ public void setTitle(String title) { this.title = title; } /** *

* A finding's title. *

* * @return A finding's title. */ public String getTitle() { return this.title; } /** *

* A finding's title. *

* * @param title * A finding's title. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withTitle(String title) { setTitle(title); return this; } /** *

* A finding's description. *

* * @param description * A finding's description. */ public void setDescription(String description) { this.description = description; } /** *

* A finding's description. *

* * @return A finding's description. */ public String getDescription() { return this.description; } /** *

* A finding's description. *

* * @param description * A finding's description. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withDescription(String description) { setDescription(description); return this; } /** *

* An data type that describes the remediation options for a finding. *

* * @param remediation * An data type that describes the remediation options for a finding. */ public void setRemediation(Remediation remediation) { this.remediation = remediation; } /** *

* An data type that describes the remediation options for a finding. *

* * @return An data type that describes the remediation options for a finding. */ public Remediation getRemediation() { return this.remediation; } /** *

* An data type that describes the remediation options for a finding. *

* * @param remediation * An data type that describes the remediation options for a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withRemediation(Remediation remediation) { setRemediation(remediation); return this; } /** *

* A URL that links to a page about the current finding in the security findings provider's solution. *

* * @param sourceUrl * A URL that links to a page about the current finding in the security findings provider's solution. */ public void setSourceUrl(String sourceUrl) { this.sourceUrl = sourceUrl; } /** *

* A URL that links to a page about the current finding in the security findings provider's solution. *

* * @return A URL that links to a page about the current finding in the security findings provider's solution. */ public String getSourceUrl() { return this.sourceUrl; } /** *

* A URL that links to a page about the current finding in the security findings provider's solution. *

* * @param sourceUrl * A URL that links to a page about the current finding in the security findings provider's solution. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withSourceUrl(String sourceUrl) { setSourceUrl(sourceUrl); return this; } /** *

* A data type where security findings providers can include additional solution-specific details that are not part * of the defined AwsSecurityFinding format. *

* * @return A data type where security findings providers can include additional solution-specific details that are * not part of the defined AwsSecurityFinding format. */ public java.util.Map getProductFields() { return productFields; } /** *

* A data type where security findings providers can include additional solution-specific details that are not part * of the defined AwsSecurityFinding format. *

* * @param productFields * A data type where security findings providers can include additional solution-specific details that are * not part of the defined AwsSecurityFinding format. */ public void setProductFields(java.util.Map productFields) { this.productFields = productFields; } /** *

* A data type where security findings providers can include additional solution-specific details that are not part * of the defined AwsSecurityFinding format. *

* * @param productFields * A data type where security findings providers can include additional solution-specific details that are * not part of the defined AwsSecurityFinding format. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withProductFields(java.util.Map productFields) { setProductFields(productFields); return this; } public AwsSecurityFinding addProductFieldsEntry(String key, String value) { if (null == this.productFields) { this.productFields = new java.util.HashMap(); } if (this.productFields.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.productFields.put(key, value); return this; } /** * Removes all the entries added into ProductFields. * * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding clearProductFieldsEntries() { this.productFields = null; return this; } /** *

* A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a * finding. *

* * @return A list of name/value string pairs associated with the finding. These are custom, user-defined fields * added to a finding. */ public java.util.Map getUserDefinedFields() { return userDefinedFields; } /** *

* A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a * finding. *

* * @param userDefinedFields * A list of name/value string pairs associated with the finding. These are custom, user-defined fields added * to a finding. */ public void setUserDefinedFields(java.util.Map userDefinedFields) { this.userDefinedFields = userDefinedFields; } /** *

* A list of name/value string pairs associated with the finding. These are custom, user-defined fields added to a * finding. *

* * @param userDefinedFields * A list of name/value string pairs associated with the finding. These are custom, user-defined fields added * to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withUserDefinedFields(java.util.Map userDefinedFields) { setUserDefinedFields(userDefinedFields); return this; } public AwsSecurityFinding addUserDefinedFieldsEntry(String key, String value) { if (null == this.userDefinedFields) { this.userDefinedFields = new java.util.HashMap(); } if (this.userDefinedFields.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.userDefinedFields.put(key, value); return this; } /** * Removes all the entries added into UserDefinedFields. * * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding clearUserDefinedFieldsEntries() { this.userDefinedFields = null; return this; } /** *

* A list of malware related to a finding. *

* * @return A list of malware related to a finding. */ public java.util.List getMalware() { return malware; } /** *

* A list of malware related to a finding. *

* * @param malware * A list of malware related to a finding. */ public void setMalware(java.util.Collection malware) { if (malware == null) { this.malware = null; return; } this.malware = new java.util.ArrayList(malware); } /** *

* A list of malware related to a finding. *

*

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

* * @param malware * A list of malware related to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withMalware(Malware... malware) { if (this.malware == null) { setMalware(new java.util.ArrayList(malware.length)); } for (Malware ele : malware) { this.malware.add(ele); } return this; } /** *

* A list of malware related to a finding. *

* * @param malware * A list of malware related to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withMalware(java.util.Collection malware) { setMalware(malware); return this; } /** *

* The details of network-related information about a finding. *

* * @param network * The details of network-related information about a finding. */ public void setNetwork(Network network) { this.network = network; } /** *

* The details of network-related information about a finding. *

* * @return The details of network-related information about a finding. */ public Network getNetwork() { return this.network; } /** *

* The details of network-related information about a finding. *

* * @param network * The details of network-related information about a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withNetwork(Network network) { setNetwork(network); return this; } /** *

* The details of process-related information about a finding. *

* * @param process * The details of process-related information about a finding. */ public void setProcess(ProcessDetails process) { this.process = process; } /** *

* The details of process-related information about a finding. *

* * @return The details of process-related information about a finding. */ public ProcessDetails getProcess() { return this.process; } /** *

* The details of process-related information about a finding. *

* * @param process * The details of process-related information about a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withProcess(ProcessDetails process) { setProcess(process); return this; } /** *

* Threat intel details related to a finding. *

* * @return Threat intel details related to a finding. */ public java.util.List getThreatIntelIndicators() { return threatIntelIndicators; } /** *

* Threat intel details related to a finding. *

* * @param threatIntelIndicators * Threat intel details related to a finding. */ public void setThreatIntelIndicators(java.util.Collection threatIntelIndicators) { if (threatIntelIndicators == null) { this.threatIntelIndicators = null; return; } this.threatIntelIndicators = new java.util.ArrayList(threatIntelIndicators); } /** *

* Threat intel details related to a finding. *

*

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

* * @param threatIntelIndicators * Threat intel details related to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withThreatIntelIndicators(ThreatIntelIndicator... threatIntelIndicators) { if (this.threatIntelIndicators == null) { setThreatIntelIndicators(new java.util.ArrayList(threatIntelIndicators.length)); } for (ThreatIntelIndicator ele : threatIntelIndicators) { this.threatIntelIndicators.add(ele); } return this; } /** *

* Threat intel details related to a finding. *

* * @param threatIntelIndicators * Threat intel details related to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withThreatIntelIndicators(java.util.Collection threatIntelIndicators) { setThreatIntelIndicators(threatIntelIndicators); return this; } /** *

* A set of resource data types that describe the resources to which the finding refers. *

* * @return A set of resource data types that describe the resources to which the finding refers. */ public java.util.List getResources() { return resources; } /** *

* A set of resource data types that describe the resources to which the finding refers. *

* * @param resources * A set of resource data types that describe the resources to which the finding refers. */ public void setResources(java.util.Collection resources) { if (resources == null) { this.resources = null; return; } this.resources = new java.util.ArrayList(resources); } /** *

* A set of resource data types that describe the resources to which the finding refers. *

*

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

* * @param resources * A set of resource data types that describe the resources to which the finding refers. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withResources(Resource... resources) { if (this.resources == null) { setResources(new java.util.ArrayList(resources.length)); } for (Resource ele : resources) { this.resources.add(ele); } return this; } /** *

* A set of resource data types that describe the resources to which the finding refers. *

* * @param resources * A set of resource data types that describe the resources to which the finding refers. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withResources(java.util.Collection resources) { setResources(resources); return this; } /** *

* This data type is exclusive to findings that are generated as the result of a check run against a specific rule * in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding details. *

* * @param compliance * This data type is exclusive to findings that are generated as the result of a check run against a specific * rule in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding * details. */ public void setCompliance(Compliance compliance) { this.compliance = compliance; } /** *

* This data type is exclusive to findings that are generated as the result of a check run against a specific rule * in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding details. *

* * @return This data type is exclusive to findings that are generated as the result of a check run against a * specific rule in a supported standard (for example, AWS CIS Foundations). Contains compliance-related * finding details. */ public Compliance getCompliance() { return this.compliance; } /** *

* This data type is exclusive to findings that are generated as the result of a check run against a specific rule * in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding details. *

* * @param compliance * This data type is exclusive to findings that are generated as the result of a check run against a specific * rule in a supported standard (for example, AWS CIS Foundations). Contains compliance-related finding * details. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withCompliance(Compliance compliance) { setCompliance(compliance); return this; } /** *

* Indicates the veracity of a finding. *

* * @param verificationState * Indicates the veracity of a finding. * @see VerificationState */ public void setVerificationState(String verificationState) { this.verificationState = verificationState; } /** *

* Indicates the veracity of a finding. *

* * @return Indicates the veracity of a finding. * @see VerificationState */ public String getVerificationState() { return this.verificationState; } /** *

* Indicates the veracity of a finding. *

* * @param verificationState * Indicates the veracity of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see VerificationState */ public AwsSecurityFinding withVerificationState(String verificationState) { setVerificationState(verificationState); return this; } /** *

* Indicates the veracity of a finding. *

* * @param verificationState * Indicates the veracity of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see VerificationState */ public AwsSecurityFinding withVerificationState(VerificationState verificationState) { this.verificationState = verificationState.toString(); return this; } /** *

* The workflow state of a finding. *

* * @param workflowState * The workflow state of a finding. * @see WorkflowState */ public void setWorkflowState(String workflowState) { this.workflowState = workflowState; } /** *

* The workflow state of a finding. *

* * @return The workflow state of a finding. * @see WorkflowState */ public String getWorkflowState() { return this.workflowState; } /** *

* The workflow state of a finding. *

* * @param workflowState * The workflow state of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowState */ public AwsSecurityFinding withWorkflowState(String workflowState) { setWorkflowState(workflowState); return this; } /** *

* The workflow state of a finding. *

* * @param workflowState * The workflow state of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowState */ public AwsSecurityFinding withWorkflowState(WorkflowState workflowState) { this.workflowState = workflowState.toString(); return this; } /** *

* The record state of a finding. *

* * @param recordState * The record state of a finding. * @see RecordState */ public void setRecordState(String recordState) { this.recordState = recordState; } /** *

* The record state of a finding. *

* * @return The record state of a finding. * @see RecordState */ public String getRecordState() { return this.recordState; } /** *

* The record state of a finding. *

* * @param recordState * The record state of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see RecordState */ public AwsSecurityFinding withRecordState(String recordState) { setRecordState(recordState); return this; } /** *

* The record state of a finding. *

* * @param recordState * The record state of a finding. * @return Returns a reference to this object so that method calls can be chained together. * @see RecordState */ public AwsSecurityFinding withRecordState(RecordState recordState) { this.recordState = recordState.toString(); return this; } /** *

* A list of related findings. *

* * @return A list of related findings. */ public java.util.List getRelatedFindings() { return relatedFindings; } /** *

* A list of related findings. *

* * @param relatedFindings * A list of related findings. */ public void setRelatedFindings(java.util.Collection relatedFindings) { if (relatedFindings == null) { this.relatedFindings = null; return; } this.relatedFindings = new java.util.ArrayList(relatedFindings); } /** *

* A list of related findings. *

*

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

* * @param relatedFindings * A list of related findings. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withRelatedFindings(RelatedFinding... relatedFindings) { if (this.relatedFindings == null) { setRelatedFindings(new java.util.ArrayList(relatedFindings.length)); } for (RelatedFinding ele : relatedFindings) { this.relatedFindings.add(ele); } return this; } /** *

* A list of related findings. *

* * @param relatedFindings * A list of related findings. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withRelatedFindings(java.util.Collection relatedFindings) { setRelatedFindings(relatedFindings); return this; } /** *

* A user-defined note added to a finding. *

* * @param note * A user-defined note added to a finding. */ public void setNote(Note note) { this.note = note; } /** *

* A user-defined note added to a finding. *

* * @return A user-defined note added to a finding. */ public Note getNote() { return this.note; } /** *

* A user-defined note added to a finding. *

* * @param note * A user-defined note added to a finding. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsSecurityFinding withNote(Note note) { setNote(note); 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 (getSchemaVersion() != null) sb.append("SchemaVersion: ").append(getSchemaVersion()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getProductArn() != null) sb.append("ProductArn: ").append(getProductArn()).append(","); if (getGeneratorId() != null) sb.append("GeneratorId: ").append(getGeneratorId()).append(","); if (getAwsAccountId() != null) sb.append("AwsAccountId: ").append(getAwsAccountId()).append(","); if (getTypes() != null) sb.append("Types: ").append(getTypes()).append(","); if (getFirstObservedAt() != null) sb.append("FirstObservedAt: ").append(getFirstObservedAt()).append(","); if (getLastObservedAt() != null) sb.append("LastObservedAt: ").append(getLastObservedAt()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getCriticality() != null) sb.append("Criticality: ").append(getCriticality()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRemediation() != null) sb.append("Remediation: ").append(getRemediation()).append(","); if (getSourceUrl() != null) sb.append("SourceUrl: ").append(getSourceUrl()).append(","); if (getProductFields() != null) sb.append("ProductFields: ").append(getProductFields()).append(","); if (getUserDefinedFields() != null) sb.append("UserDefinedFields: ").append(getUserDefinedFields()).append(","); if (getMalware() != null) sb.append("Malware: ").append(getMalware()).append(","); if (getNetwork() != null) sb.append("Network: ").append(getNetwork()).append(","); if (getProcess() != null) sb.append("Process: ").append(getProcess()).append(","); if (getThreatIntelIndicators() != null) sb.append("ThreatIntelIndicators: ").append(getThreatIntelIndicators()).append(","); if (getResources() != null) sb.append("Resources: ").append(getResources()).append(","); if (getCompliance() != null) sb.append("Compliance: ").append(getCompliance()).append(","); if (getVerificationState() != null) sb.append("VerificationState: ").append(getVerificationState()).append(","); if (getWorkflowState() != null) sb.append("WorkflowState: ").append(getWorkflowState()).append(","); if (getRecordState() != null) sb.append("RecordState: ").append(getRecordState()).append(","); if (getRelatedFindings() != null) sb.append("RelatedFindings: ").append(getRelatedFindings()).append(","); if (getNote() != null) sb.append("Note: ").append(getNote()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsSecurityFinding == false) return false; AwsSecurityFinding other = (AwsSecurityFinding) obj; if (other.getSchemaVersion() == null ^ this.getSchemaVersion() == null) return false; if (other.getSchemaVersion() != null && other.getSchemaVersion().equals(this.getSchemaVersion()) == 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.getProductArn() == null ^ this.getProductArn() == null) return false; if (other.getProductArn() != null && other.getProductArn().equals(this.getProductArn()) == false) return false; if (other.getGeneratorId() == null ^ this.getGeneratorId() == null) return false; if (other.getGeneratorId() != null && other.getGeneratorId().equals(this.getGeneratorId()) == false) return false; if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null) return false; if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false) return false; if (other.getTypes() == null ^ this.getTypes() == null) return false; if (other.getTypes() != null && other.getTypes().equals(this.getTypes()) == false) return false; if (other.getFirstObservedAt() == null ^ this.getFirstObservedAt() == null) return false; if (other.getFirstObservedAt() != null && other.getFirstObservedAt().equals(this.getFirstObservedAt()) == false) return false; if (other.getLastObservedAt() == null ^ this.getLastObservedAt() == null) return false; if (other.getLastObservedAt() != null && other.getLastObservedAt().equals(this.getLastObservedAt()) == 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; if (other.getSeverity() == null ^ this.getSeverity() == null) return false; if (other.getSeverity() != null && other.getSeverity().equals(this.getSeverity()) == 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.getCriticality() == null ^ this.getCriticality() == null) return false; if (other.getCriticality() != null && other.getCriticality().equals(this.getCriticality()) == 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.getRemediation() == null ^ this.getRemediation() == null) return false; if (other.getRemediation() != null && other.getRemediation().equals(this.getRemediation()) == false) return false; if (other.getSourceUrl() == null ^ this.getSourceUrl() == null) return false; if (other.getSourceUrl() != null && other.getSourceUrl().equals(this.getSourceUrl()) == false) return false; if (other.getProductFields() == null ^ this.getProductFields() == null) return false; if (other.getProductFields() != null && other.getProductFields().equals(this.getProductFields()) == false) return false; if (other.getUserDefinedFields() == null ^ this.getUserDefinedFields() == null) return false; if (other.getUserDefinedFields() != null && other.getUserDefinedFields().equals(this.getUserDefinedFields()) == false) return false; if (other.getMalware() == null ^ this.getMalware() == null) return false; if (other.getMalware() != null && other.getMalware().equals(this.getMalware()) == false) return false; if (other.getNetwork() == null ^ this.getNetwork() == null) return false; if (other.getNetwork() != null && other.getNetwork().equals(this.getNetwork()) == false) return false; if (other.getProcess() == null ^ this.getProcess() == null) return false; if (other.getProcess() != null && other.getProcess().equals(this.getProcess()) == false) return false; if (other.getThreatIntelIndicators() == null ^ this.getThreatIntelIndicators() == null) return false; if (other.getThreatIntelIndicators() != null && other.getThreatIntelIndicators().equals(this.getThreatIntelIndicators()) == false) return false; if (other.getResources() == null ^ this.getResources() == null) return false; if (other.getResources() != null && other.getResources().equals(this.getResources()) == false) return false; if (other.getCompliance() == null ^ this.getCompliance() == null) return false; if (other.getCompliance() != null && other.getCompliance().equals(this.getCompliance()) == false) return false; if (other.getVerificationState() == null ^ this.getVerificationState() == null) return false; if (other.getVerificationState() != null && other.getVerificationState().equals(this.getVerificationState()) == false) return false; if (other.getWorkflowState() == null ^ this.getWorkflowState() == null) return false; if (other.getWorkflowState() != null && other.getWorkflowState().equals(this.getWorkflowState()) == false) return false; if (other.getRecordState() == null ^ this.getRecordState() == null) return false; if (other.getRecordState() != null && other.getRecordState().equals(this.getRecordState()) == false) return false; if (other.getRelatedFindings() == null ^ this.getRelatedFindings() == null) return false; if (other.getRelatedFindings() != null && other.getRelatedFindings().equals(this.getRelatedFindings()) == false) return false; if (other.getNote() == null ^ this.getNote() == null) return false; if (other.getNote() != null && other.getNote().equals(this.getNote()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getProductArn() == null) ? 0 : getProductArn().hashCode()); hashCode = prime * hashCode + ((getGeneratorId() == null) ? 0 : getGeneratorId().hashCode()); hashCode = prime * hashCode + ((getAwsAccountId() == null) ? 0 : getAwsAccountId().hashCode()); hashCode = prime * hashCode + ((getTypes() == null) ? 0 : getTypes().hashCode()); hashCode = prime * hashCode + ((getFirstObservedAt() == null) ? 0 : getFirstObservedAt().hashCode()); hashCode = prime * hashCode + ((getLastObservedAt() == null) ? 0 : getLastObservedAt().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getCriticality() == null) ? 0 : getCriticality().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRemediation() == null) ? 0 : getRemediation().hashCode()); hashCode = prime * hashCode + ((getSourceUrl() == null) ? 0 : getSourceUrl().hashCode()); hashCode = prime * hashCode + ((getProductFields() == null) ? 0 : getProductFields().hashCode()); hashCode = prime * hashCode + ((getUserDefinedFields() == null) ? 0 : getUserDefinedFields().hashCode()); hashCode = prime * hashCode + ((getMalware() == null) ? 0 : getMalware().hashCode()); hashCode = prime * hashCode + ((getNetwork() == null) ? 0 : getNetwork().hashCode()); hashCode = prime * hashCode + ((getProcess() == null) ? 0 : getProcess().hashCode()); hashCode = prime * hashCode + ((getThreatIntelIndicators() == null) ? 0 : getThreatIntelIndicators().hashCode()); hashCode = prime * hashCode + ((getResources() == null) ? 0 : getResources().hashCode()); hashCode = prime * hashCode + ((getCompliance() == null) ? 0 : getCompliance().hashCode()); hashCode = prime * hashCode + ((getVerificationState() == null) ? 0 : getVerificationState().hashCode()); hashCode = prime * hashCode + ((getWorkflowState() == null) ? 0 : getWorkflowState().hashCode()); hashCode = prime * hashCode + ((getRecordState() == null) ? 0 : getRecordState().hashCode()); hashCode = prime * hashCode + ((getRelatedFindings() == null) ? 0 : getRelatedFindings().hashCode()); hashCode = prime * hashCode + ((getNote() == null) ? 0 : getNote().hashCode()); return hashCode; } @Override public AwsSecurityFinding clone() { try { return (AwsSecurityFinding) 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.securityhub.model.transform.AwsSecurityFindingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy