/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Inspector2 { namespace Model { /** *

Contains information on the code vulnerability identified in your Lambda * function.

See Also:

AWS * API Reference

*/ class CodeVulnerabilityDetails { public: AWS_INSPECTOR2_API CodeVulnerabilityDetails(); AWS_INSPECTOR2_API CodeVulnerabilityDetails(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API CodeVulnerabilityDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline const Aws::Vector& GetCwes() const{ return m_cwes; } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline bool CwesHasBeenSet() const { return m_cwesHasBeenSet; } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline void SetCwes(const Aws::Vector& value) { m_cwesHasBeenSet = true; m_cwes = value; } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline void SetCwes(Aws::Vector&& value) { m_cwesHasBeenSet = true; m_cwes = std::move(value); } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline CodeVulnerabilityDetails& WithCwes(const Aws::Vector& value) { SetCwes(value); return *this;} /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline CodeVulnerabilityDetails& WithCwes(Aws::Vector&& value) { SetCwes(std::move(value)); return *this;} /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline CodeVulnerabilityDetails& AddCwes(const Aws::String& value) { m_cwesHasBeenSet = true; m_cwes.push_back(value); return *this; } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline CodeVulnerabilityDetails& AddCwes(Aws::String&& value) { m_cwesHasBeenSet = true; m_cwes.push_back(std::move(value)); return *this; } /** *

The Common Weakness Enumeration (CWE) item associated with the detected * vulnerability.

*/ inline CodeVulnerabilityDetails& AddCwes(const char* value) { m_cwesHasBeenSet = true; m_cwes.push_back(value); return *this; } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline const Aws::String& GetDetectorId() const{ return m_detectorId; } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline bool DetectorIdHasBeenSet() const { return m_detectorIdHasBeenSet; } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline void SetDetectorId(const Aws::String& value) { m_detectorIdHasBeenSet = true; m_detectorId = value; } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline void SetDetectorId(Aws::String&& value) { m_detectorIdHasBeenSet = true; m_detectorId = std::move(value); } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline void SetDetectorId(const char* value) { m_detectorIdHasBeenSet = true; m_detectorId.assign(value); } /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline CodeVulnerabilityDetails& WithDetectorId(const Aws::String& value) { SetDetectorId(value); return *this;} /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline CodeVulnerabilityDetails& WithDetectorId(Aws::String&& value) { SetDetectorId(std::move(value)); return *this;} /** *

The ID for the Amazon CodeGuru detector associated with the finding. For more * information on detectors see Amazon CodeGuru * Detector Library.

*/ inline CodeVulnerabilityDetails& WithDetectorId(const char* value) { SetDetectorId(value); return *this;} /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline const Aws::String& GetDetectorName() const{ return m_detectorName; } /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline bool DetectorNameHasBeenSet() const { return m_detectorNameHasBeenSet; } /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline void SetDetectorName(const Aws::String& value) { m_detectorNameHasBeenSet = true; m_detectorName = value; } /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline void SetDetectorName(Aws::String&& value) { m_detectorNameHasBeenSet = true; m_detectorName = std::move(value); } /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline void SetDetectorName(const char* value) { m_detectorNameHasBeenSet = true; m_detectorName.assign(value); } /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline CodeVulnerabilityDetails& WithDetectorName(const Aws::String& value) { SetDetectorName(value); return *this;} /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline CodeVulnerabilityDetails& WithDetectorName(Aws::String&& value) { SetDetectorName(std::move(value)); return *this;} /** *

The name of the detector used to identify the code vulnerability. For more * information on detectors see CodeGuru Detector * Library.

*/ inline CodeVulnerabilityDetails& WithDetectorName(const char* value) { SetDetectorName(value); return *this;} /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline const Aws::Vector& GetDetectorTags() const{ return m_detectorTags; } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline bool DetectorTagsHasBeenSet() const { return m_detectorTagsHasBeenSet; } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline void SetDetectorTags(const Aws::Vector& value) { m_detectorTagsHasBeenSet = true; m_detectorTags = value; } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline void SetDetectorTags(Aws::Vector&& value) { m_detectorTagsHasBeenSet = true; m_detectorTags = std::move(value); } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline CodeVulnerabilityDetails& WithDetectorTags(const Aws::Vector& value) { SetDetectorTags(value); return *this;} /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline CodeVulnerabilityDetails& WithDetectorTags(Aws::Vector&& value) { SetDetectorTags(std::move(value)); return *this;} /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline CodeVulnerabilityDetails& AddDetectorTags(const Aws::String& value) { m_detectorTagsHasBeenSet = true; m_detectorTags.push_back(value); return *this; } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline CodeVulnerabilityDetails& AddDetectorTags(Aws::String&& value) { m_detectorTagsHasBeenSet = true; m_detectorTags.push_back(std::move(value)); return *this; } /** *

The detector tag associated with the vulnerability. Detector tags group * related vulnerabilities by common themes or tactics. For a list of available * tags by programming language, see Java * tags, or Python * tags.

*/ inline CodeVulnerabilityDetails& AddDetectorTags(const char* value) { m_detectorTagsHasBeenSet = true; m_detectorTags.push_back(value); return *this; } /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline const CodeFilePath& GetFilePath() const{ return m_filePath; } /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline bool FilePathHasBeenSet() const { return m_filePathHasBeenSet; } /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline void SetFilePath(const CodeFilePath& value) { m_filePathHasBeenSet = true; m_filePath = value; } /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline void SetFilePath(CodeFilePath&& value) { m_filePathHasBeenSet = true; m_filePath = std::move(value); } /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline CodeVulnerabilityDetails& WithFilePath(const CodeFilePath& value) { SetFilePath(value); return *this;} /** *

Contains information on where the code vulnerability is located in your * code.

*/ inline CodeVulnerabilityDetails& WithFilePath(CodeFilePath&& value) { SetFilePath(std::move(value)); return *this;} /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline const Aws::Vector& GetReferenceUrls() const{ return m_referenceUrls; } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline bool ReferenceUrlsHasBeenSet() const { return m_referenceUrlsHasBeenSet; } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline void SetReferenceUrls(const Aws::Vector& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = value; } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline void SetReferenceUrls(Aws::Vector&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = std::move(value); } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline CodeVulnerabilityDetails& WithReferenceUrls(const Aws::Vector& value) { SetReferenceUrls(value); return *this;} /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline CodeVulnerabilityDetails& WithReferenceUrls(Aws::Vector&& value) { SetReferenceUrls(std::move(value)); return *this;} /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline CodeVulnerabilityDetails& AddReferenceUrls(const Aws::String& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline CodeVulnerabilityDetails& AddReferenceUrls(Aws::String&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(std::move(value)); return *this; } /** *

A URL containing supporting documentation about the code vulnerability * detected.

*/ inline CodeVulnerabilityDetails& AddReferenceUrls(const char* value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline const Aws::String& GetRuleId() const{ return m_ruleId; } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); } /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline CodeVulnerabilityDetails& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;} /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline CodeVulnerabilityDetails& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;} /** *

The identifier for a rule that was used to detect the code vulnerability.

*/ inline CodeVulnerabilityDetails& WithRuleId(const char* value) { SetRuleId(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline const Aws::String& GetSourceLambdaLayerArn() const{ return m_sourceLambdaLayerArn; } /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline bool SourceLambdaLayerArnHasBeenSet() const { return m_sourceLambdaLayerArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline void SetSourceLambdaLayerArn(const Aws::String& value) { m_sourceLambdaLayerArnHasBeenSet = true; m_sourceLambdaLayerArn = value; } /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline void SetSourceLambdaLayerArn(Aws::String&& value) { m_sourceLambdaLayerArnHasBeenSet = true; m_sourceLambdaLayerArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline void SetSourceLambdaLayerArn(const char* value) { m_sourceLambdaLayerArnHasBeenSet = true; m_sourceLambdaLayerArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline CodeVulnerabilityDetails& WithSourceLambdaLayerArn(const Aws::String& value) { SetSourceLambdaLayerArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline CodeVulnerabilityDetails& WithSourceLambdaLayerArn(Aws::String&& value) { SetSourceLambdaLayerArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the Lambda layer that the code * vulnerability was detected in.

*/ inline CodeVulnerabilityDetails& WithSourceLambdaLayerArn(const char* value) { SetSourceLambdaLayerArn(value); return *this;} private: Aws::Vector m_cwes; bool m_cwesHasBeenSet = false; Aws::String m_detectorId; bool m_detectorIdHasBeenSet = false; Aws::String m_detectorName; bool m_detectorNameHasBeenSet = false; Aws::Vector m_detectorTags; bool m_detectorTagsHasBeenSet = false; CodeFilePath m_filePath; bool m_filePathHasBeenSet = false; Aws::Vector m_referenceUrls; bool m_referenceUrlsHasBeenSet = false; Aws::String m_ruleId; bool m_ruleIdHasBeenSet = false; Aws::String m_sourceLambdaLayerArn; bool m_sourceLambdaLayerArnHasBeenSet = false; }; } // namespace Model } // namespace Inspector2 } // namespace Aws