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

A schedule configures how often and when a pipeline will automatically create * a new image.

See Also:

AWS * API Reference

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

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; } /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; } /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; } /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::move(value); } /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); } /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline Schedule& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;} /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline Schedule& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(std::move(value)); return *this;} /** *

The expression determines how often EC2 Image Builder evaluates your * pipelineExecutionStartCondition.

*/ inline Schedule& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;} /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline const PipelineExecutionStartCondition& GetPipelineExecutionStartCondition() const{ return m_pipelineExecutionStartCondition; } /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline bool PipelineExecutionStartConditionHasBeenSet() const { return m_pipelineExecutionStartConditionHasBeenSet; } /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline void SetPipelineExecutionStartCondition(const PipelineExecutionStartCondition& value) { m_pipelineExecutionStartConditionHasBeenSet = true; m_pipelineExecutionStartCondition = value; } /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline void SetPipelineExecutionStartCondition(PipelineExecutionStartCondition&& value) { m_pipelineExecutionStartConditionHasBeenSet = true; m_pipelineExecutionStartCondition = std::move(value); } /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline Schedule& WithPipelineExecutionStartCondition(const PipelineExecutionStartCondition& value) { SetPipelineExecutionStartCondition(value); return *this;} /** *

The condition configures when the pipeline should trigger a new image build. * When the pipelineExecutionStartCondition is set to * EXPRESSION_MATCH_AND_DEPENDENCY_UPDATES_AVAILABLE, EC2 Image * Builder will build a new image only when there are known changes pending. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time.

*/ inline Schedule& WithPipelineExecutionStartCondition(PipelineExecutionStartCondition&& value) { SetPipelineExecutionStartCondition(std::move(value)); return *this;} private: Aws::String m_scheduleExpression; bool m_scheduleExpressionHasBeenSet; PipelineExecutionStartCondition m_pipelineExecutionStartCondition; bool m_pipelineExecutionStartConditionHasBeenSet; }; } // namespace Model } // namespace imagebuilder } // namespace Aws