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

Information that defines a state of a detector.

See Also:

AWS API * Reference

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

The name of the state.

*/ inline const Aws::String& GetStateName() const{ return m_stateName; } /** *

The name of the state.

*/ inline bool StateNameHasBeenSet() const { return m_stateNameHasBeenSet; } /** *

The name of the state.

*/ inline void SetStateName(const Aws::String& value) { m_stateNameHasBeenSet = true; m_stateName = value; } /** *

The name of the state.

*/ inline void SetStateName(Aws::String&& value) { m_stateNameHasBeenSet = true; m_stateName = std::move(value); } /** *

The name of the state.

*/ inline void SetStateName(const char* value) { m_stateNameHasBeenSet = true; m_stateName.assign(value); } /** *

The name of the state.

*/ inline State& WithStateName(const Aws::String& value) { SetStateName(value); return *this;} /** *

The name of the state.

*/ inline State& WithStateName(Aws::String&& value) { SetStateName(std::move(value)); return *this;} /** *

The name of the state.

*/ inline State& WithStateName(const char* value) { SetStateName(value); return *this;} /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline const OnInputLifecycle& GetOnInput() const{ return m_onInput; } /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline bool OnInputHasBeenSet() const { return m_onInputHasBeenSet; } /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline void SetOnInput(const OnInputLifecycle& value) { m_onInputHasBeenSet = true; m_onInput = value; } /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline void SetOnInput(OnInputLifecycle&& value) { m_onInputHasBeenSet = true; m_onInput = std::move(value); } /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline State& WithOnInput(const OnInputLifecycle& value) { SetOnInput(value); return *this;} /** *

When an input is received and the condition is TRUE, perform the * specified actions.

*/ inline State& WithOnInput(OnInputLifecycle&& value) { SetOnInput(std::move(value)); return *this;} /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline const OnEnterLifecycle& GetOnEnter() const{ return m_onEnter; } /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline bool OnEnterHasBeenSet() const { return m_onEnterHasBeenSet; } /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline void SetOnEnter(const OnEnterLifecycle& value) { m_onEnterHasBeenSet = true; m_onEnter = value; } /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline void SetOnEnter(OnEnterLifecycle&& value) { m_onEnterHasBeenSet = true; m_onEnter = std::move(value); } /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline State& WithOnEnter(const OnEnterLifecycle& value) { SetOnEnter(value); return *this;} /** *

When entering this state, perform these actions if the * condition is TRUE.

*/ inline State& WithOnEnter(OnEnterLifecycle&& value) { SetOnEnter(std::move(value)); return *this;} /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline const OnExitLifecycle& GetOnExit() const{ return m_onExit; } /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline bool OnExitHasBeenSet() const { return m_onExitHasBeenSet; } /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline void SetOnExit(const OnExitLifecycle& value) { m_onExitHasBeenSet = true; m_onExit = value; } /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline void SetOnExit(OnExitLifecycle&& value) { m_onExitHasBeenSet = true; m_onExit = std::move(value); } /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline State& WithOnExit(const OnExitLifecycle& value) { SetOnExit(value); return *this;} /** *

When exiting this state, perform these actions if the specified * condition is TRUE.

*/ inline State& WithOnExit(OnExitLifecycle&& value) { SetOnExit(std::move(value)); return *this;} private: Aws::String m_stateName; bool m_stateNameHasBeenSet; OnInputLifecycle m_onInput; bool m_onInputHasBeenSet; OnEnterLifecycle m_onEnter; bool m_onEnterHasBeenSet; OnExitLifecycle m_onExit; bool m_onExitHasBeenSet; }; } // namespace Model } // namespace IoTEvents } // namespace Aws