/** * 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 namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

A resource related to a finding.

See Also:

AWS * API Reference

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

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline Resource& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline Resource& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The type of the resource that details are provided for. If possible, set * Type to one of the supported resource types. For example, if the * resource is an EC2 instance, then set Type to * AwsEc2Instance.

If the resource does not match any of the * provided types, then set Type to Other.

*/ inline Resource& WithType(const char* value) { SetType(value); return *this;} /** *

The canonical identifier for the given resource type.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The canonical identifier for the given resource type.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The canonical identifier for the given resource type.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The canonical identifier for the given resource type.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The canonical identifier for the given resource type.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The canonical identifier for the given resource type.

*/ inline Resource& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The canonical identifier for the given resource type.

*/ inline Resource& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The canonical identifier for the given resource type.

*/ inline Resource& WithId(const char* value) { SetId(value); return *this;} /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline const Partition& GetPartition() const{ return m_partition; } /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; } /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline void SetPartition(const Partition& value) { m_partitionHasBeenSet = true; m_partition = value; } /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline void SetPartition(Partition&& value) { m_partitionHasBeenSet = true; m_partition = std::move(value); } /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline Resource& WithPartition(const Partition& value) { SetPartition(value); return *this;} /** *

The canonical Amazon Web Services partition name that the Region is assigned * to.

*/ inline Resource& WithPartition(Partition&& value) { SetPartition(std::move(value)); return *this;} /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline const Aws::String& GetRegion() const{ return m_region; } /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; } /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; } /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); } /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); } /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline Resource& WithRegion(const Aws::String& value) { SetRegion(value); return *this;} /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline Resource& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;} /** *

The canonical Amazon Web Services external Region name where this resource is * located.

*/ inline Resource& WithRegion(const char* value) { SetRegion(value); return *this;} /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline const Aws::String& GetResourceRole() const{ return m_resourceRole; } /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline bool ResourceRoleHasBeenSet() const { return m_resourceRoleHasBeenSet; } /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline void SetResourceRole(const Aws::String& value) { m_resourceRoleHasBeenSet = true; m_resourceRole = value; } /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline void SetResourceRole(Aws::String&& value) { m_resourceRoleHasBeenSet = true; m_resourceRole = std::move(value); } /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline void SetResourceRole(const char* value) { m_resourceRoleHasBeenSet = true; m_resourceRole.assign(value); } /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline Resource& WithResourceRole(const Aws::String& value) { SetResourceRole(value); return *this;} /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline Resource& WithResourceRole(Aws::String&& value) { SetResourceRole(std::move(value)); return *this;} /** *

Identifies the role of the resource in the finding. A resource is either the * actor or target of the finding activity,

*/ inline Resource& WithResourceRole(const char* value) { SetResourceRole(value); return *this;} /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

A list of Amazon Web Services tags associated with a resource at the time the * finding was processed.

*/ inline Resource& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline const DataClassificationDetails& GetDataClassification() const{ return m_dataClassification; } /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline bool DataClassificationHasBeenSet() const { return m_dataClassificationHasBeenSet; } /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline void SetDataClassification(const DataClassificationDetails& value) { m_dataClassificationHasBeenSet = true; m_dataClassification = value; } /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline void SetDataClassification(DataClassificationDetails&& value) { m_dataClassificationHasBeenSet = true; m_dataClassification = std::move(value); } /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline Resource& WithDataClassification(const DataClassificationDetails& value) { SetDataClassification(value); return *this;} /** *

Contains information about sensitive data that was detected on the * resource.

*/ inline Resource& WithDataClassification(DataClassificationDetails&& value) { SetDataClassification(std::move(value)); return *this;} /** *

Additional details about the resource related to a finding.

*/ inline const ResourceDetails& GetDetails() const{ return m_details; } /** *

Additional details about the resource related to a finding.

*/ inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; } /** *

Additional details about the resource related to a finding.

*/ inline void SetDetails(const ResourceDetails& value) { m_detailsHasBeenSet = true; m_details = value; } /** *

Additional details about the resource related to a finding.

*/ inline void SetDetails(ResourceDetails&& value) { m_detailsHasBeenSet = true; m_details = std::move(value); } /** *

Additional details about the resource related to a finding.

*/ inline Resource& WithDetails(const ResourceDetails& value) { SetDetails(value); return *this;} /** *

Additional details about the resource related to a finding.

*/ inline Resource& WithDetails(ResourceDetails&& value) { SetDetails(std::move(value)); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet = false; Aws::String m_id; bool m_idHasBeenSet = false; Partition m_partition; bool m_partitionHasBeenSet = false; Aws::String m_region; bool m_regionHasBeenSet = false; Aws::String m_resourceRole; bool m_resourceRoleHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; DataClassificationDetails m_dataClassification; bool m_dataClassificationHasBeenSet = false; ResourceDetails m_details; bool m_detailsHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws