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

Contains information about a policy, but does not include the content. To see * the content of a policy, see DescribePolicy.

See Also:

* AWS * API Reference

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The unique identifier (ID) of the policy.

The regex pattern for a policy ID string * requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, * or the underscore character (_).

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The Amazon Resource Name (ARN) of the policy.

For more information * about ARNs in Organizations, see ARN * Formats Supported by Organizations in the Amazon Web Services Service * Authorization Reference.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The friendly name of the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

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

The description of the policy.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the policy.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the policy.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the policy.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the policy.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the policy.

*/ inline PolicySummary& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the policy.

*/ inline PolicySummary& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the policy.

*/ inline PolicySummary& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The type of policy.

*/ inline const PolicyType& GetType() const{ return m_type; } /** *

The type of policy.

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

The type of policy.

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

The type of policy.

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

The type of policy.

*/ inline PolicySummary& WithType(const PolicyType& value) { SetType(value); return *this;} /** *

The type of policy.

*/ inline PolicySummary& WithType(PolicyType&& value) { SetType(std::move(value)); return *this;} /** *

A boolean value that indicates whether the specified policy is an Amazon Web * Services managed policy. If true, then you can attach the policy to roots, OUs, * or accounts, but you cannot edit it.

*/ inline bool GetAwsManaged() const{ return m_awsManaged; } /** *

A boolean value that indicates whether the specified policy is an Amazon Web * Services managed policy. If true, then you can attach the policy to roots, OUs, * or accounts, but you cannot edit it.

*/ inline bool AwsManagedHasBeenSet() const { return m_awsManagedHasBeenSet; } /** *

A boolean value that indicates whether the specified policy is an Amazon Web * Services managed policy. If true, then you can attach the policy to roots, OUs, * or accounts, but you cannot edit it.

*/ inline void SetAwsManaged(bool value) { m_awsManagedHasBeenSet = true; m_awsManaged = value; } /** *

A boolean value that indicates whether the specified policy is an Amazon Web * Services managed policy. If true, then you can attach the policy to roots, OUs, * or accounts, but you cannot edit it.

*/ inline PolicySummary& WithAwsManaged(bool value) { SetAwsManaged(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; PolicyType m_type; bool m_typeHasBeenSet = false; bool m_awsManaged; bool m_awsManagedHasBeenSet = false; }; } // namespace Model } // namespace Organizations } // namespace Aws