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

Defines a condition under which a trigger fires.

See Also:

* AWS * API Reference

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

A logical operator.

*/ inline const LogicalOperator& GetLogicalOperator() const{ return m_logicalOperator; } /** *

A logical operator.

*/ inline bool LogicalOperatorHasBeenSet() const { return m_logicalOperatorHasBeenSet; } /** *

A logical operator.

*/ inline void SetLogicalOperator(const LogicalOperator& value) { m_logicalOperatorHasBeenSet = true; m_logicalOperator = value; } /** *

A logical operator.

*/ inline void SetLogicalOperator(LogicalOperator&& value) { m_logicalOperatorHasBeenSet = true; m_logicalOperator = std::move(value); } /** *

A logical operator.

*/ inline Condition& WithLogicalOperator(const LogicalOperator& value) { SetLogicalOperator(value); return *this;} /** *

A logical operator.

*/ inline Condition& WithLogicalOperator(LogicalOperator&& value) { SetLogicalOperator(std::move(value)); return *this;} /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline const Aws::String& GetJobName() const{ return m_jobName; } /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline bool JobNameHasBeenSet() const { return m_jobNameHasBeenSet; } /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline void SetJobName(const Aws::String& value) { m_jobNameHasBeenSet = true; m_jobName = value; } /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline void SetJobName(Aws::String&& value) { m_jobNameHasBeenSet = true; m_jobName = std::move(value); } /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline void SetJobName(const char* value) { m_jobNameHasBeenSet = true; m_jobName.assign(value); } /** *

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

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

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

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

The name of the job whose JobRuns this condition applies to, and * on which this trigger waits.

*/ inline Condition& WithJobName(const char* value) { SetJobName(value); return *this;} /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline const JobRunState& GetState() const{ return m_state; } /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline void SetState(const JobRunState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline void SetState(JobRunState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline Condition& WithState(const JobRunState& value) { SetState(value); return *this;} /** *

The condition state. Currently, the only job states that a trigger can listen * for are SUCCEEDED, STOPPED, FAILED, and * TIMEOUT. The only crawler states that a trigger can listen for are * SUCCEEDED, FAILED, and CANCELLED.

*/ inline Condition& WithState(JobRunState&& value) { SetState(std::move(value)); return *this;} /** *

The name of the crawler to which this condition applies.

*/ inline const Aws::String& GetCrawlerName() const{ return m_crawlerName; } /** *

The name of the crawler to which this condition applies.

*/ inline bool CrawlerNameHasBeenSet() const { return m_crawlerNameHasBeenSet; } /** *

The name of the crawler to which this condition applies.

*/ inline void SetCrawlerName(const Aws::String& value) { m_crawlerNameHasBeenSet = true; m_crawlerName = value; } /** *

The name of the crawler to which this condition applies.

*/ inline void SetCrawlerName(Aws::String&& value) { m_crawlerNameHasBeenSet = true; m_crawlerName = std::move(value); } /** *

The name of the crawler to which this condition applies.

*/ inline void SetCrawlerName(const char* value) { m_crawlerNameHasBeenSet = true; m_crawlerName.assign(value); } /** *

The name of the crawler to which this condition applies.

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

The name of the crawler to which this condition applies.

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

The name of the crawler to which this condition applies.

*/ inline Condition& WithCrawlerName(const char* value) { SetCrawlerName(value); return *this;} /** *

The state of the crawler to which this condition applies.

*/ inline const CrawlState& GetCrawlState() const{ return m_crawlState; } /** *

The state of the crawler to which this condition applies.

*/ inline bool CrawlStateHasBeenSet() const { return m_crawlStateHasBeenSet; } /** *

The state of the crawler to which this condition applies.

*/ inline void SetCrawlState(const CrawlState& value) { m_crawlStateHasBeenSet = true; m_crawlState = value; } /** *

The state of the crawler to which this condition applies.

*/ inline void SetCrawlState(CrawlState&& value) { m_crawlStateHasBeenSet = true; m_crawlState = std::move(value); } /** *

The state of the crawler to which this condition applies.

*/ inline Condition& WithCrawlState(const CrawlState& value) { SetCrawlState(value); return *this;} /** *

The state of the crawler to which this condition applies.

*/ inline Condition& WithCrawlState(CrawlState&& value) { SetCrawlState(std::move(value)); return *this;} private: LogicalOperator m_logicalOperator; bool m_logicalOperatorHasBeenSet = false; Aws::String m_jobName; bool m_jobNameHasBeenSet = false; JobRunState m_state; bool m_stateHasBeenSet = false; Aws::String m_crawlerName; bool m_crawlerNameHasBeenSet = false; CrawlState m_crawlState; bool m_crawlStateHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws