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

Contains details about the CloudTrail trail being analyzed to generate a * policy.

See Also:

AWS * API Reference

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

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline const Aws::String& GetCloudTrailArn() const{ return m_cloudTrailArn; } /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline bool CloudTrailArnHasBeenSet() const { return m_cloudTrailArnHasBeenSet; } /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline void SetCloudTrailArn(const Aws::String& value) { m_cloudTrailArnHasBeenSet = true; m_cloudTrailArn = value; } /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline void SetCloudTrailArn(Aws::String&& value) { m_cloudTrailArnHasBeenSet = true; m_cloudTrailArn = std::move(value); } /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline void SetCloudTrailArn(const char* value) { m_cloudTrailArnHasBeenSet = true; m_cloudTrailArn.assign(value); } /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline Trail& WithCloudTrailArn(const Aws::String& value) { SetCloudTrailArn(value); return *this;} /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline Trail& WithCloudTrailArn(Aws::String&& value) { SetCloudTrailArn(std::move(value)); return *this;} /** *

Specifies the ARN of the trail. The format of a trail ARN is * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail.

*/ inline Trail& WithCloudTrailArn(const char* value) { SetCloudTrailArn(value); return *this;} /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline const Aws::Vector& GetRegions() const{ return m_regions; } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline bool RegionsHasBeenSet() const { return m_regionsHasBeenSet; } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline void SetRegions(const Aws::Vector& value) { m_regionsHasBeenSet = true; m_regions = value; } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline void SetRegions(Aws::Vector&& value) { m_regionsHasBeenSet = true; m_regions = std::move(value); } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline Trail& WithRegions(const Aws::Vector& value) { SetRegions(value); return *this;} /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline Trail& WithRegions(Aws::Vector&& value) { SetRegions(std::move(value)); return *this;} /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline Trail& AddRegions(const Aws::String& value) { m_regionsHasBeenSet = true; m_regions.push_back(value); return *this; } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline Trail& AddRegions(Aws::String&& value) { m_regionsHasBeenSet = true; m_regions.push_back(std::move(value)); return *this; } /** *

A list of regions to get CloudTrail data from and analyze to generate a * policy.

*/ inline Trail& AddRegions(const char* value) { m_regionsHasBeenSet = true; m_regions.push_back(value); return *this; } /** *

Possible values are true or false. If set to * true, IAM Access Analyzer retrieves CloudTrail data from all * regions to analyze and generate a policy.

*/ inline bool GetAllRegions() const{ return m_allRegions; } /** *

Possible values are true or false. If set to * true, IAM Access Analyzer retrieves CloudTrail data from all * regions to analyze and generate a policy.

*/ inline bool AllRegionsHasBeenSet() const { return m_allRegionsHasBeenSet; } /** *

Possible values are true or false. If set to * true, IAM Access Analyzer retrieves CloudTrail data from all * regions to analyze and generate a policy.

*/ inline void SetAllRegions(bool value) { m_allRegionsHasBeenSet = true; m_allRegions = value; } /** *

Possible values are true or false. If set to * true, IAM Access Analyzer retrieves CloudTrail data from all * regions to analyze and generate a policy.

*/ inline Trail& WithAllRegions(bool value) { SetAllRegions(value); return *this;} private: Aws::String m_cloudTrailArn; bool m_cloudTrailArnHasBeenSet = false; Aws::Vector m_regions; bool m_regionsHasBeenSet = false; bool m_allRegions; bool m_allRegionsHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws