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

A snapshot of an Amazon Inspector assessment run that contains the findings * of the assessment run .

Used as the response element in the * DescribeAssessmentRuns action.

See Also:

AWS * API Reference

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

The ARN of the assessment run.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The ARN of the assessment run.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The ARN of the assessment run.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The ARN of the assessment run.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The ARN of the assessment run.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The ARN of the assessment run.

*/ inline AssessmentRun& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The ARN of the assessment run.

*/ inline AssessmentRun& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The ARN of the assessment run.

*/ inline AssessmentRun& WithArn(const char* value) { SetArn(value); return *this;} /** *

The auto-generated name for the assessment run.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The auto-generated name for the assessment run.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The auto-generated name for the assessment run.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The auto-generated name for the assessment run.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The auto-generated name for the assessment run.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The auto-generated name for the assessment run.

*/ inline AssessmentRun& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The auto-generated name for the assessment run.

*/ inline AssessmentRun& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The auto-generated name for the assessment run.

*/ inline AssessmentRun& WithName(const char* value) { SetName(value); return *this;} /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline const Aws::String& GetAssessmentTemplateArn() const{ return m_assessmentTemplateArn; } /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline bool AssessmentTemplateArnHasBeenSet() const { return m_assessmentTemplateArnHasBeenSet; } /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline void SetAssessmentTemplateArn(const Aws::String& value) { m_assessmentTemplateArnHasBeenSet = true; m_assessmentTemplateArn = value; } /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline void SetAssessmentTemplateArn(Aws::String&& value) { m_assessmentTemplateArnHasBeenSet = true; m_assessmentTemplateArn = std::move(value); } /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline void SetAssessmentTemplateArn(const char* value) { m_assessmentTemplateArnHasBeenSet = true; m_assessmentTemplateArn.assign(value); } /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline AssessmentRun& WithAssessmentTemplateArn(const Aws::String& value) { SetAssessmentTemplateArn(value); return *this;} /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline AssessmentRun& WithAssessmentTemplateArn(Aws::String&& value) { SetAssessmentTemplateArn(std::move(value)); return *this;} /** *

The ARN of the assessment template that is associated with the assessment * run.

*/ inline AssessmentRun& WithAssessmentTemplateArn(const char* value) { SetAssessmentTemplateArn(value); return *this;} /** *

The state of the assessment run.

*/ inline const AssessmentRunState& GetState() const{ return m_state; } /** *

The state of the assessment run.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the assessment run.

*/ inline void SetState(const AssessmentRunState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the assessment run.

*/ inline void SetState(AssessmentRunState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the assessment run.

*/ inline AssessmentRun& WithState(const AssessmentRunState& value) { SetState(value); return *this;} /** *

The state of the assessment run.

*/ inline AssessmentRun& WithState(AssessmentRunState&& value) { SetState(std::move(value)); return *this;} /** *

The duration of the assessment run.

*/ inline int GetDurationInSeconds() const{ return m_durationInSeconds; } /** *

The duration of the assessment run.

*/ inline bool DurationInSecondsHasBeenSet() const { return m_durationInSecondsHasBeenSet; } /** *

The duration of the assessment run.

*/ inline void SetDurationInSeconds(int value) { m_durationInSecondsHasBeenSet = true; m_durationInSeconds = value; } /** *

The duration of the assessment run.

*/ inline AssessmentRun& WithDurationInSeconds(int value) { SetDurationInSeconds(value); return *this;} /** *

The rules packages selected for the assessment run.

*/ inline const Aws::Vector& GetRulesPackageArns() const{ return m_rulesPackageArns; } /** *

The rules packages selected for the assessment run.

*/ inline bool RulesPackageArnsHasBeenSet() const { return m_rulesPackageArnsHasBeenSet; } /** *

The rules packages selected for the assessment run.

*/ inline void SetRulesPackageArns(const Aws::Vector& value) { m_rulesPackageArnsHasBeenSet = true; m_rulesPackageArns = value; } /** *

The rules packages selected for the assessment run.

*/ inline void SetRulesPackageArns(Aws::Vector&& value) { m_rulesPackageArnsHasBeenSet = true; m_rulesPackageArns = std::move(value); } /** *

The rules packages selected for the assessment run.

*/ inline AssessmentRun& WithRulesPackageArns(const Aws::Vector& value) { SetRulesPackageArns(value); return *this;} /** *

The rules packages selected for the assessment run.

*/ inline AssessmentRun& WithRulesPackageArns(Aws::Vector&& value) { SetRulesPackageArns(std::move(value)); return *this;} /** *

The rules packages selected for the assessment run.

*/ inline AssessmentRun& AddRulesPackageArns(const Aws::String& value) { m_rulesPackageArnsHasBeenSet = true; m_rulesPackageArns.push_back(value); return *this; } /** *

The rules packages selected for the assessment run.

*/ inline AssessmentRun& AddRulesPackageArns(Aws::String&& value) { m_rulesPackageArnsHasBeenSet = true; m_rulesPackageArns.push_back(std::move(value)); return *this; } /** *

The rules packages selected for the assessment run.

*/ inline AssessmentRun& AddRulesPackageArns(const char* value) { m_rulesPackageArnsHasBeenSet = true; m_rulesPackageArns.push_back(value); return *this; } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline const Aws::Vector& GetUserAttributesForFindings() const{ return m_userAttributesForFindings; } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline bool UserAttributesForFindingsHasBeenSet() const { return m_userAttributesForFindingsHasBeenSet; } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline void SetUserAttributesForFindings(const Aws::Vector& value) { m_userAttributesForFindingsHasBeenSet = true; m_userAttributesForFindings = value; } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline void SetUserAttributesForFindings(Aws::Vector&& value) { m_userAttributesForFindingsHasBeenSet = true; m_userAttributesForFindings = std::move(value); } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline AssessmentRun& WithUserAttributesForFindings(const Aws::Vector& value) { SetUserAttributesForFindings(value); return *this;} /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline AssessmentRun& WithUserAttributesForFindings(Aws::Vector&& value) { SetUserAttributesForFindings(std::move(value)); return *this;} /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline AssessmentRun& AddUserAttributesForFindings(const Attribute& value) { m_userAttributesForFindingsHasBeenSet = true; m_userAttributesForFindings.push_back(value); return *this; } /** *

The user-defined attributes that are assigned to every generated finding.

*/ inline AssessmentRun& AddUserAttributesForFindings(Attribute&& value) { m_userAttributesForFindingsHasBeenSet = true; m_userAttributesForFindings.push_back(std::move(value)); return *this; } /** *

The time when StartAssessmentRun was called.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The time when StartAssessmentRun was called.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The time when StartAssessmentRun was called.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The time when StartAssessmentRun was called.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The time when StartAssessmentRun was called.

*/ inline AssessmentRun& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The time when StartAssessmentRun was called.

*/ inline AssessmentRun& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The time when StartAssessmentRun was called.

*/ inline const Aws::Utils::DateTime& GetStartedAt() const{ return m_startedAt; } /** *

The time when StartAssessmentRun was called.

*/ inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; } /** *

The time when StartAssessmentRun was called.

*/ inline void SetStartedAt(const Aws::Utils::DateTime& value) { m_startedAtHasBeenSet = true; m_startedAt = value; } /** *

The time when StartAssessmentRun was called.

*/ inline void SetStartedAt(Aws::Utils::DateTime&& value) { m_startedAtHasBeenSet = true; m_startedAt = std::move(value); } /** *

The time when StartAssessmentRun was called.

*/ inline AssessmentRun& WithStartedAt(const Aws::Utils::DateTime& value) { SetStartedAt(value); return *this;} /** *

The time when StartAssessmentRun was called.

*/ inline AssessmentRun& WithStartedAt(Aws::Utils::DateTime&& value) { SetStartedAt(std::move(value)); return *this;} /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline const Aws::Utils::DateTime& GetCompletedAt() const{ return m_completedAt; } /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline bool CompletedAtHasBeenSet() const { return m_completedAtHasBeenSet; } /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline void SetCompletedAt(const Aws::Utils::DateTime& value) { m_completedAtHasBeenSet = true; m_completedAt = value; } /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline void SetCompletedAt(Aws::Utils::DateTime&& value) { m_completedAtHasBeenSet = true; m_completedAt = std::move(value); } /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline AssessmentRun& WithCompletedAt(const Aws::Utils::DateTime& value) { SetCompletedAt(value); return *this;} /** *

The assessment run completion time that corresponds to the rules packages * evaluation completion time or failure.

*/ inline AssessmentRun& WithCompletedAt(Aws::Utils::DateTime&& value) { SetCompletedAt(std::move(value)); return *this;} /** *

The last time when the assessment run's state changed.

*/ inline const Aws::Utils::DateTime& GetStateChangedAt() const{ return m_stateChangedAt; } /** *

The last time when the assessment run's state changed.

*/ inline bool StateChangedAtHasBeenSet() const { return m_stateChangedAtHasBeenSet; } /** *

The last time when the assessment run's state changed.

*/ inline void SetStateChangedAt(const Aws::Utils::DateTime& value) { m_stateChangedAtHasBeenSet = true; m_stateChangedAt = value; } /** *

The last time when the assessment run's state changed.

*/ inline void SetStateChangedAt(Aws::Utils::DateTime&& value) { m_stateChangedAtHasBeenSet = true; m_stateChangedAt = std::move(value); } /** *

The last time when the assessment run's state changed.

*/ inline AssessmentRun& WithStateChangedAt(const Aws::Utils::DateTime& value) { SetStateChangedAt(value); return *this;} /** *

The last time when the assessment run's state changed.

*/ inline AssessmentRun& WithStateChangedAt(Aws::Utils::DateTime&& value) { SetStateChangedAt(std::move(value)); return *this;} /** *

A Boolean value (true or false) that specifies whether the process of * collecting data from the agents is completed.

*/ inline bool GetDataCollected() const{ return m_dataCollected; } /** *

A Boolean value (true or false) that specifies whether the process of * collecting data from the agents is completed.

*/ inline bool DataCollectedHasBeenSet() const { return m_dataCollectedHasBeenSet; } /** *

A Boolean value (true or false) that specifies whether the process of * collecting data from the agents is completed.

*/ inline void SetDataCollected(bool value) { m_dataCollectedHasBeenSet = true; m_dataCollected = value; } /** *

A Boolean value (true or false) that specifies whether the process of * collecting data from the agents is completed.

*/ inline AssessmentRun& WithDataCollected(bool value) { SetDataCollected(value); return *this;} /** *

A list of the assessment run state changes.

*/ inline const Aws::Vector& GetStateChanges() const{ return m_stateChanges; } /** *

A list of the assessment run state changes.

*/ inline bool StateChangesHasBeenSet() const { return m_stateChangesHasBeenSet; } /** *

A list of the assessment run state changes.

*/ inline void SetStateChanges(const Aws::Vector& value) { m_stateChangesHasBeenSet = true; m_stateChanges = value; } /** *

A list of the assessment run state changes.

*/ inline void SetStateChanges(Aws::Vector&& value) { m_stateChangesHasBeenSet = true; m_stateChanges = std::move(value); } /** *

A list of the assessment run state changes.

*/ inline AssessmentRun& WithStateChanges(const Aws::Vector& value) { SetStateChanges(value); return *this;} /** *

A list of the assessment run state changes.

*/ inline AssessmentRun& WithStateChanges(Aws::Vector&& value) { SetStateChanges(std::move(value)); return *this;} /** *

A list of the assessment run state changes.

*/ inline AssessmentRun& AddStateChanges(const AssessmentRunStateChange& value) { m_stateChangesHasBeenSet = true; m_stateChanges.push_back(value); return *this; } /** *

A list of the assessment run state changes.

*/ inline AssessmentRun& AddStateChanges(AssessmentRunStateChange&& value) { m_stateChangesHasBeenSet = true; m_stateChanges.push_back(std::move(value)); return *this; } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline const Aws::Vector& GetNotifications() const{ return m_notifications; } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline bool NotificationsHasBeenSet() const { return m_notificationsHasBeenSet; } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline void SetNotifications(const Aws::Vector& value) { m_notificationsHasBeenSet = true; m_notifications = value; } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline void SetNotifications(Aws::Vector&& value) { m_notificationsHasBeenSet = true; m_notifications = std::move(value); } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline AssessmentRun& WithNotifications(const Aws::Vector& value) { SetNotifications(value); return *this;} /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline AssessmentRun& WithNotifications(Aws::Vector&& value) { SetNotifications(std::move(value)); return *this;} /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline AssessmentRun& AddNotifications(const AssessmentRunNotification& value) { m_notificationsHasBeenSet = true; m_notifications.push_back(value); return *this; } /** *

A list of notifications for the event subscriptions. A notification about a * particular generated finding is added to this list only once.

*/ inline AssessmentRun& AddNotifications(AssessmentRunNotification&& value) { m_notificationsHasBeenSet = true; m_notifications.push_back(std::move(value)); return *this; } /** *

Provides a total count of generated findings per severity.

*/ inline const Aws::Map& GetFindingCounts() const{ return m_findingCounts; } /** *

Provides a total count of generated findings per severity.

*/ inline bool FindingCountsHasBeenSet() const { return m_findingCountsHasBeenSet; } /** *

Provides a total count of generated findings per severity.

*/ inline void SetFindingCounts(const Aws::Map& value) { m_findingCountsHasBeenSet = true; m_findingCounts = value; } /** *

Provides a total count of generated findings per severity.

*/ inline void SetFindingCounts(Aws::Map&& value) { m_findingCountsHasBeenSet = true; m_findingCounts = std::move(value); } /** *

Provides a total count of generated findings per severity.

*/ inline AssessmentRun& WithFindingCounts(const Aws::Map& value) { SetFindingCounts(value); return *this;} /** *

Provides a total count of generated findings per severity.

*/ inline AssessmentRun& WithFindingCounts(Aws::Map&& value) { SetFindingCounts(std::move(value)); return *this;} /** *

Provides a total count of generated findings per severity.

*/ inline AssessmentRun& AddFindingCounts(const Severity& key, int value) { m_findingCountsHasBeenSet = true; m_findingCounts.emplace(key, value); return *this; } /** *

Provides a total count of generated findings per severity.

*/ inline AssessmentRun& AddFindingCounts(Severity&& key, int value) { m_findingCountsHasBeenSet = true; m_findingCounts.emplace(std::move(key), value); return *this; } private: Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_assessmentTemplateArn; bool m_assessmentTemplateArnHasBeenSet = false; AssessmentRunState m_state; bool m_stateHasBeenSet = false; int m_durationInSeconds; bool m_durationInSecondsHasBeenSet = false; Aws::Vector m_rulesPackageArns; bool m_rulesPackageArnsHasBeenSet = false; Aws::Vector m_userAttributesForFindings; bool m_userAttributesForFindingsHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; Aws::Utils::DateTime m_startedAt; bool m_startedAtHasBeenSet = false; Aws::Utils::DateTime m_completedAt; bool m_completedAtHasBeenSet = false; Aws::Utils::DateTime m_stateChangedAt; bool m_stateChangedAtHasBeenSet = false; bool m_dataCollected; bool m_dataCollectedHasBeenSet = false; Aws::Vector m_stateChanges; bool m_stateChangesHasBeenSet = false; Aws::Vector m_notifications; bool m_notificationsHasBeenSet = false; Aws::Map m_findingCounts; bool m_findingCountsHasBeenSet = false; }; } // namespace Model } // namespace Inspector } // namespace Aws