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

[Event-based policies only] Specifies an action for an event-based * policy.

See Also:

AWS API * Reference

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

A descriptive name for the action.

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

The rule for copying shared snapshots across Regions.

*/ inline const Aws::Vector& GetCrossRegionCopy() const{ return m_crossRegionCopy; } /** *

The rule for copying shared snapshots across Regions.

*/ inline bool CrossRegionCopyHasBeenSet() const { return m_crossRegionCopyHasBeenSet; } /** *

The rule for copying shared snapshots across Regions.

*/ inline void SetCrossRegionCopy(const Aws::Vector& value) { m_crossRegionCopyHasBeenSet = true; m_crossRegionCopy = value; } /** *

The rule for copying shared snapshots across Regions.

*/ inline void SetCrossRegionCopy(Aws::Vector&& value) { m_crossRegionCopyHasBeenSet = true; m_crossRegionCopy = std::move(value); } /** *

The rule for copying shared snapshots across Regions.

*/ inline Action& WithCrossRegionCopy(const Aws::Vector& value) { SetCrossRegionCopy(value); return *this;} /** *

The rule for copying shared snapshots across Regions.

*/ inline Action& WithCrossRegionCopy(Aws::Vector&& value) { SetCrossRegionCopy(std::move(value)); return *this;} /** *

The rule for copying shared snapshots across Regions.

*/ inline Action& AddCrossRegionCopy(const CrossRegionCopyAction& value) { m_crossRegionCopyHasBeenSet = true; m_crossRegionCopy.push_back(value); return *this; } /** *

The rule for copying shared snapshots across Regions.

*/ inline Action& AddCrossRegionCopy(CrossRegionCopyAction&& value) { m_crossRegionCopyHasBeenSet = true; m_crossRegionCopy.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_crossRegionCopy; bool m_crossRegionCopyHasBeenSet = false; }; } // namespace Model } // namespace DLM } // namespace Aws