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

A structure that contains information about one CloudWatch Logs account * policy.

See Also:

AWS * API Reference

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

The name of the account policy.

*/ inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The name of the account policy.

*/ inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The name of the account policy.

*/ inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The name of the account policy.

*/ inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The name of the account policy.

*/ inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The name of the account policy.

*/ inline AccountPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The name of the account policy.

*/ inline AccountPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The name of the account policy.

*/ inline AccountPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline AccountPolicy& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline AccountPolicy& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} /** *

The policy document for this account policy.

The JSON specified in * policyDocument can be up to 30,720 characters.

*/ inline AccountPolicy& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} /** *

The date and time that this policy was most recently updated.

*/ inline long long GetLastUpdatedTime() const{ return m_lastUpdatedTime; } /** *

The date and time that this policy was most recently updated.

*/ inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; } /** *

The date and time that this policy was most recently updated.

*/ inline void SetLastUpdatedTime(long long value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; } /** *

The date and time that this policy was most recently updated.

*/ inline AccountPolicy& WithLastUpdatedTime(long long value) { SetLastUpdatedTime(value); return *this;} /** *

The type of policy for this account policy.

*/ inline const PolicyType& GetPolicyType() const{ return m_policyType; } /** *

The type of policy for this account policy.

*/ inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; } /** *

The type of policy for this account policy.

*/ inline void SetPolicyType(const PolicyType& value) { m_policyTypeHasBeenSet = true; m_policyType = value; } /** *

The type of policy for this account policy.

*/ inline void SetPolicyType(PolicyType&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); } /** *

The type of policy for this account policy.

*/ inline AccountPolicy& WithPolicyType(const PolicyType& value) { SetPolicyType(value); return *this;} /** *

The type of policy for this account policy.

*/ inline AccountPolicy& WithPolicyType(PolicyType&& value) { SetPolicyType(std::move(value)); return *this;} /** *

The scope of the account policy.

*/ inline const Scope& GetScope() const{ return m_scope; } /** *

The scope of the account policy.

*/ inline bool ScopeHasBeenSet() const { return m_scopeHasBeenSet; } /** *

The scope of the account policy.

*/ inline void SetScope(const Scope& value) { m_scopeHasBeenSet = true; m_scope = value; } /** *

The scope of the account policy.

*/ inline void SetScope(Scope&& value) { m_scopeHasBeenSet = true; m_scope = std::move(value); } /** *

The scope of the account policy.

*/ inline AccountPolicy& WithScope(const Scope& value) { SetScope(value); return *this;} /** *

The scope of the account policy.

*/ inline AccountPolicy& WithScope(Scope&& value) { SetScope(std::move(value)); return *this;} /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline const Aws::String& GetAccountId() const{ return m_accountId; } /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; } /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline void SetAccountId(const Aws::String& value) { m_accountIdHasBeenSet = true; m_accountId = value; } /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline void SetAccountId(Aws::String&& value) { m_accountIdHasBeenSet = true; m_accountId = std::move(value); } /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline void SetAccountId(const char* value) { m_accountIdHasBeenSet = true; m_accountId.assign(value); } /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline AccountPolicy& WithAccountId(const Aws::String& value) { SetAccountId(value); return *this;} /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline AccountPolicy& WithAccountId(Aws::String&& value) { SetAccountId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID that the policy applies to.

*/ inline AccountPolicy& WithAccountId(const char* value) { SetAccountId(value); return *this;} private: Aws::String m_policyName; bool m_policyNameHasBeenSet = false; Aws::String m_policyDocument; bool m_policyDocumentHasBeenSet = false; long long m_lastUpdatedTime; bool m_lastUpdatedTimeHasBeenSet = false; PolicyType m_policyType; bool m_policyTypeHasBeenSet = false; Scope m_scope; bool m_scopeHasBeenSet = false; Aws::String m_accountId; bool m_accountIdHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchLogs } // namespace Aws