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

A JSON string which you can use to limit the event bus permissions you are * granting to only accounts that fulfill the condition. Currently, the only * supported condition is membership in a certain AWS organization. The string must * contain Type, Key, and Value fields. The * Value field specifies the ID of the AWS organization. Following is * an example value for Condition:

'{"Type" : * "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' *

See Also:

AWS * API Reference

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

Specifies the type of condition. Currently the only supported value is * StringEquals.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

Specifies the type of condition. Currently the only supported value is * StringEquals.

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

Specifies the type of condition. Currently the only supported value is * StringEquals.

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

Specifies the type of condition. Currently the only supported value is * StringEquals.

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

Specifies the type of condition. Currently the only supported value is * StringEquals.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

Specifies the type of condition. Currently the only supported value is * StringEquals.

*/ inline Condition& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

Specifies the type of condition. Currently the only supported value is * StringEquals.

*/ inline Condition& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

Specifies the type of condition. Currently the only supported value is * StringEquals.

*/ inline Condition& WithType(const char* value) { SetType(value); return *this;} /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline Condition& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline Condition& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

Specifies the key for the condition. Currently the only supported key is * aws:PrincipalOrgID.

*/ inline Condition& WithKey(const char* value) { SetKey(value); return *this;} /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline Condition& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline Condition& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

Specifies the value for the key. Currently, this must be the ID of the * organization.

*/ inline Condition& WithValue(const char* value) { SetValue(value); return *this;} private: Aws::String m_type; bool m_typeHasBeenSet; Aws::String m_key; bool m_keyHasBeenSet; Aws::String m_value; bool m_valueHasBeenSet; }; } // namespace Model } // namespace CloudWatchEvents } // namespace Aws