1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/organizations/Organizations_EXPORTS.h> 8 #include <aws/organizations/model/PolicySummary.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Organizations 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Contains rules to be applied to the affected accounts. Policies can be 29 * attached directly to accounts, or to roots and OUs to affect all accounts in 30 * those hierarchies.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/Policy">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_ORGANIZATIONS_API Policy 35 { 36 public: 37 Policy(); 38 Policy(Aws::Utils::Json::JsonView jsonValue); 39 Policy& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>A structure that contains additional details about the policy.</p> 45 */ GetPolicySummary()46 inline const PolicySummary& GetPolicySummary() const{ return m_policySummary; } 47 48 /** 49 * <p>A structure that contains additional details about the policy.</p> 50 */ PolicySummaryHasBeenSet()51 inline bool PolicySummaryHasBeenSet() const { return m_policySummaryHasBeenSet; } 52 53 /** 54 * <p>A structure that contains additional details about the policy.</p> 55 */ SetPolicySummary(const PolicySummary & value)56 inline void SetPolicySummary(const PolicySummary& value) { m_policySummaryHasBeenSet = true; m_policySummary = value; } 57 58 /** 59 * <p>A structure that contains additional details about the policy.</p> 60 */ SetPolicySummary(PolicySummary && value)61 inline void SetPolicySummary(PolicySummary&& value) { m_policySummaryHasBeenSet = true; m_policySummary = std::move(value); } 62 63 /** 64 * <p>A structure that contains additional details about the policy.</p> 65 */ WithPolicySummary(const PolicySummary & value)66 inline Policy& WithPolicySummary(const PolicySummary& value) { SetPolicySummary(value); return *this;} 67 68 /** 69 * <p>A structure that contains additional details about the policy.</p> 70 */ WithPolicySummary(PolicySummary && value)71 inline Policy& WithPolicySummary(PolicySummary&& value) { SetPolicySummary(std::move(value)); return *this;} 72 73 74 /** 75 * <p>The text content of the policy.</p> 76 */ GetContent()77 inline const Aws::String& GetContent() const{ return m_content; } 78 79 /** 80 * <p>The text content of the policy.</p> 81 */ ContentHasBeenSet()82 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } 83 84 /** 85 * <p>The text content of the policy.</p> 86 */ SetContent(const Aws::String & value)87 inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } 88 89 /** 90 * <p>The text content of the policy.</p> 91 */ SetContent(Aws::String && value)92 inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } 93 94 /** 95 * <p>The text content of the policy.</p> 96 */ SetContent(const char * value)97 inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } 98 99 /** 100 * <p>The text content of the policy.</p> 101 */ WithContent(const Aws::String & value)102 inline Policy& WithContent(const Aws::String& value) { SetContent(value); return *this;} 103 104 /** 105 * <p>The text content of the policy.</p> 106 */ WithContent(Aws::String && value)107 inline Policy& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} 108 109 /** 110 * <p>The text content of the policy.</p> 111 */ WithContent(const char * value)112 inline Policy& WithContent(const char* value) { SetContent(value); return *this;} 113 114 private: 115 116 PolicySummary m_policySummary; 117 bool m_policySummaryHasBeenSet; 118 119 Aws::String m_content; 120 bool m_contentHasBeenSet; 121 }; 122 123 } // namespace Model 124 } // namespace Organizations 125 } // namespace Aws 126