/** * 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 AccessAnalyzer { namespace Model { /** *

Contains details about the policy generation status and * properties.

See Also:

AWS * API Reference

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

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline const Aws::String& GetJobId() const{ return m_jobId; } /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline bool JobIdHasBeenSet() const { return m_jobIdHasBeenSet; } /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline void SetJobId(const Aws::String& value) { m_jobIdHasBeenSet = true; m_jobId = value; } /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline void SetJobId(Aws::String&& value) { m_jobIdHasBeenSet = true; m_jobId = std::move(value); } /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline void SetJobId(const char* value) { m_jobIdHasBeenSet = true; m_jobId.assign(value); } /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline PolicyGeneration& WithJobId(const Aws::String& value) { SetJobId(value); return *this;} /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline PolicyGeneration& WithJobId(Aws::String&& value) { SetJobId(std::move(value)); return *this;} /** *

The JobId that is returned by the * StartPolicyGeneration operation. The JobId can be used * with GetGeneratedPolicy to retrieve the generated policies or used * with CancelPolicyGeneration to cancel the policy generation * request.

*/ inline PolicyGeneration& WithJobId(const char* value) { SetJobId(value); return *this;} /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline const Aws::String& GetPrincipalArn() const{ return m_principalArn; } /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline bool PrincipalArnHasBeenSet() const { return m_principalArnHasBeenSet; } /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline void SetPrincipalArn(const Aws::String& value) { m_principalArnHasBeenSet = true; m_principalArn = value; } /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline void SetPrincipalArn(Aws::String&& value) { m_principalArnHasBeenSet = true; m_principalArn = std::move(value); } /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline void SetPrincipalArn(const char* value) { m_principalArnHasBeenSet = true; m_principalArn.assign(value); } /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline PolicyGeneration& WithPrincipalArn(const Aws::String& value) { SetPrincipalArn(value); return *this;} /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline PolicyGeneration& WithPrincipalArn(Aws::String&& value) { SetPrincipalArn(std::move(value)); return *this;} /** *

The ARN of the IAM entity (user or role) for which you are generating a * policy.

*/ inline PolicyGeneration& WithPrincipalArn(const char* value) { SetPrincipalArn(value); return *this;} /** *

The status of the policy generation request.

*/ inline const JobStatus& GetStatus() const{ return m_status; } /** *

The status of the policy generation request.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the policy generation request.

*/ inline void SetStatus(const JobStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the policy generation request.

*/ inline void SetStatus(JobStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the policy generation request.

*/ inline PolicyGeneration& WithStatus(const JobStatus& value) { SetStatus(value); return *this;} /** *

The status of the policy generation request.

*/ inline PolicyGeneration& WithStatus(JobStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

A timestamp of when the policy generation started.

*/ inline const Aws::Utils::DateTime& GetStartedOn() const{ return m_startedOn; } /** *

A timestamp of when the policy generation started.

*/ inline bool StartedOnHasBeenSet() const { return m_startedOnHasBeenSet; } /** *

A timestamp of when the policy generation started.

*/ inline void SetStartedOn(const Aws::Utils::DateTime& value) { m_startedOnHasBeenSet = true; m_startedOn = value; } /** *

A timestamp of when the policy generation started.

*/ inline void SetStartedOn(Aws::Utils::DateTime&& value) { m_startedOnHasBeenSet = true; m_startedOn = std::move(value); } /** *

A timestamp of when the policy generation started.

*/ inline PolicyGeneration& WithStartedOn(const Aws::Utils::DateTime& value) { SetStartedOn(value); return *this;} /** *

A timestamp of when the policy generation started.

*/ inline PolicyGeneration& WithStartedOn(Aws::Utils::DateTime&& value) { SetStartedOn(std::move(value)); return *this;} /** *

A timestamp of when the policy generation was completed.

*/ inline const Aws::Utils::DateTime& GetCompletedOn() const{ return m_completedOn; } /** *

A timestamp of when the policy generation was completed.

*/ inline bool CompletedOnHasBeenSet() const { return m_completedOnHasBeenSet; } /** *

A timestamp of when the policy generation was completed.

*/ inline void SetCompletedOn(const Aws::Utils::DateTime& value) { m_completedOnHasBeenSet = true; m_completedOn = value; } /** *

A timestamp of when the policy generation was completed.

*/ inline void SetCompletedOn(Aws::Utils::DateTime&& value) { m_completedOnHasBeenSet = true; m_completedOn = std::move(value); } /** *

A timestamp of when the policy generation was completed.

*/ inline PolicyGeneration& WithCompletedOn(const Aws::Utils::DateTime& value) { SetCompletedOn(value); return *this;} /** *

A timestamp of when the policy generation was completed.

*/ inline PolicyGeneration& WithCompletedOn(Aws::Utils::DateTime&& value) { SetCompletedOn(std::move(value)); return *this;} private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; Aws::String m_principalArn; bool m_principalArnHasBeenSet = false; JobStatus m_status; bool m_statusHasBeenSet = false; Aws::Utils::DateTime m_startedOn; bool m_startedOnHasBeenSet = false; Aws::Utils::DateTime m_completedOn; bool m_completedOnHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws