/** * 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 Schedule { public: AWS_IMAGEBUILDER_API Schedule(); AWS_IMAGEBUILDER_API Schedule(Aws::Utils::Json::JsonView jsonValue); AWS_IMAGEBUILDER_API Schedule& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

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

For information on how to * format a cron expression in Image Builder, see Use * cron expressions in EC2 Image Builder.

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

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline const Aws::String& GetTimezone() const{ return m_timezone; } /** *

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline bool TimezoneHasBeenSet() const { return m_timezoneHasBeenSet; } /** *

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline void SetTimezone(const Aws::String& value) { m_timezoneHasBeenSet = true; m_timezone = value; } /** *

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline void SetTimezone(Aws::String&& value) { m_timezoneHasBeenSet = true; m_timezone = std::move(value); } /** *

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline void SetTimezone(const char* value) { m_timezoneHasBeenSet = true; m_timezone.assign(value); } /** *

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

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

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

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

The timezone that applies to the scheduling expression. For example, * "Etc/UTC", "America/Los_Angeles" in the IANA timezone format. * If not specified this defaults to UTC.

*/ inline Schedule& WithTimezone(const char* value) { SetTimezone(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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

*/ 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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

*/ 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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

*/ 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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

*/ 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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

*/ 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, and you use * semantic version filters on the base image or components in your image recipe, * EC2 Image Builder will build a new image only when there are new versions of the * image or components in your recipe that match the semantic version filter. When * it is set to EXPRESSION_MATCH_ONLY, it will build a new image every * time the CRON expression matches the current time. For semantic version syntax, * see CreateComponent * in the EC2 Image Builder API Reference.

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