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

Specifies a backup schedule.

See Also:

AWS API * Reference

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

The name of the schedule.

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

Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.

*/ inline bool GetCopyTags() const{ return m_copyTags; } /** *

Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.

*/ inline bool CopyTagsHasBeenSet() const { return m_copyTagsHasBeenSet; } /** *

Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.

*/ inline void SetCopyTags(bool value) { m_copyTagsHasBeenSet = true; m_copyTags = value; } /** *

Copy all user-defined tags on a source volume to snapshots of the volume * created by this policy.

*/ inline Schedule& WithCopyTags(bool value) { SetCopyTags(value); return *this;} /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline const Aws::Vector& GetTagsToAdd() const{ return m_tagsToAdd; } /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline bool TagsToAddHasBeenSet() const { return m_tagsToAddHasBeenSet; } /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline void SetTagsToAdd(const Aws::Vector& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd = value; } /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline void SetTagsToAdd(Aws::Vector&& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd = std::move(value); } /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline Schedule& WithTagsToAdd(const Aws::Vector& value) { SetTagsToAdd(value); return *this;} /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline Schedule& WithTagsToAdd(Aws::Vector&& value) { SetTagsToAdd(std::move(value)); return *this;} /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline Schedule& AddTagsToAdd(const Tag& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd.push_back(value); return *this; } /** *

The tags to apply to policy-created resources. These user-defined tags are in * addition to the AWS-added lifecycle tags.

*/ inline Schedule& AddTagsToAdd(Tag&& value) { m_tagsToAddHasBeenSet = true; m_tagsToAdd.push_back(std::move(value)); return *this; } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline const Aws::Vector& GetVariableTags() const{ return m_variableTags; } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline bool VariableTagsHasBeenSet() const { return m_variableTagsHasBeenSet; } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline void SetVariableTags(const Aws::Vector& value) { m_variableTagsHasBeenSet = true; m_variableTags = value; } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline void SetVariableTags(Aws::Vector&& value) { m_variableTagsHasBeenSet = true; m_variableTags = std::move(value); } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline Schedule& WithVariableTags(const Aws::Vector& value) { SetVariableTags(value); return *this;} /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline Schedule& WithVariableTags(Aws::Vector&& value) { SetVariableTags(std::move(value)); return *this;} /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline Schedule& AddVariableTags(const Tag& value) { m_variableTagsHasBeenSet = true; m_variableTags.push_back(value); return *this; } /** *

A collection of key/value pairs with values determined dynamically when the * policy is executed. Keys may be any valid Amazon EC2 tag key. Values must be in * one of the two following formats: $(instance-id) or * $(timestamp). Variable tags are only valid for EBS Snapshot * Management – Instance policies.

*/ inline Schedule& AddVariableTags(Tag&& value) { m_variableTagsHasBeenSet = true; m_variableTags.push_back(std::move(value)); return *this; } /** *

The creation rule.

*/ inline const CreateRule& GetCreateRule() const{ return m_createRule; } /** *

The creation rule.

*/ inline bool CreateRuleHasBeenSet() const { return m_createRuleHasBeenSet; } /** *

The creation rule.

*/ inline void SetCreateRule(const CreateRule& value) { m_createRuleHasBeenSet = true; m_createRule = value; } /** *

The creation rule.

*/ inline void SetCreateRule(CreateRule&& value) { m_createRuleHasBeenSet = true; m_createRule = std::move(value); } /** *

The creation rule.

*/ inline Schedule& WithCreateRule(const CreateRule& value) { SetCreateRule(value); return *this;} /** *

The creation rule.

*/ inline Schedule& WithCreateRule(CreateRule&& value) { SetCreateRule(std::move(value)); return *this;} /** *

The retention rule.

*/ inline const RetainRule& GetRetainRule() const{ return m_retainRule; } /** *

The retention rule.

*/ inline bool RetainRuleHasBeenSet() const { return m_retainRuleHasBeenSet; } /** *

The retention rule.

*/ inline void SetRetainRule(const RetainRule& value) { m_retainRuleHasBeenSet = true; m_retainRule = value; } /** *

The retention rule.

*/ inline void SetRetainRule(RetainRule&& value) { m_retainRuleHasBeenSet = true; m_retainRule = std::move(value); } /** *

The retention rule.

*/ inline Schedule& WithRetainRule(const RetainRule& value) { SetRetainRule(value); return *this;} /** *

The retention rule.

*/ inline Schedule& WithRetainRule(RetainRule&& value) { SetRetainRule(std::move(value)); return *this;} /** *

The rule for enabling fast snapshot restore.

*/ inline const FastRestoreRule& GetFastRestoreRule() const{ return m_fastRestoreRule; } /** *

The rule for enabling fast snapshot restore.

*/ inline bool FastRestoreRuleHasBeenSet() const { return m_fastRestoreRuleHasBeenSet; } /** *

The rule for enabling fast snapshot restore.

*/ inline void SetFastRestoreRule(const FastRestoreRule& value) { m_fastRestoreRuleHasBeenSet = true; m_fastRestoreRule = value; } /** *

The rule for enabling fast snapshot restore.

*/ inline void SetFastRestoreRule(FastRestoreRule&& value) { m_fastRestoreRuleHasBeenSet = true; m_fastRestoreRule = std::move(value); } /** *

The rule for enabling fast snapshot restore.

*/ inline Schedule& WithFastRestoreRule(const FastRestoreRule& value) { SetFastRestoreRule(value); return *this;} /** *

The rule for enabling fast snapshot restore.

*/ inline Schedule& WithFastRestoreRule(FastRestoreRule&& value) { SetFastRestoreRule(std::move(value)); return *this;} /** *

The rule for cross-Region snapshot copies.

*/ inline const Aws::Vector& GetCrossRegionCopyRules() const{ return m_crossRegionCopyRules; } /** *

The rule for cross-Region snapshot copies.

*/ inline bool CrossRegionCopyRulesHasBeenSet() const { return m_crossRegionCopyRulesHasBeenSet; } /** *

The rule for cross-Region snapshot copies.

*/ inline void SetCrossRegionCopyRules(const Aws::Vector& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules = value; } /** *

The rule for cross-Region snapshot copies.

*/ inline void SetCrossRegionCopyRules(Aws::Vector&& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules = std::move(value); } /** *

The rule for cross-Region snapshot copies.

*/ inline Schedule& WithCrossRegionCopyRules(const Aws::Vector& value) { SetCrossRegionCopyRules(value); return *this;} /** *

The rule for cross-Region snapshot copies.

*/ inline Schedule& WithCrossRegionCopyRules(Aws::Vector&& value) { SetCrossRegionCopyRules(std::move(value)); return *this;} /** *

The rule for cross-Region snapshot copies.

*/ inline Schedule& AddCrossRegionCopyRules(const CrossRegionCopyRule& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules.push_back(value); return *this; } /** *

The rule for cross-Region snapshot copies.

*/ inline Schedule& AddCrossRegionCopyRules(CrossRegionCopyRule&& value) { m_crossRegionCopyRulesHasBeenSet = true; m_crossRegionCopyRules.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet; bool m_copyTags; bool m_copyTagsHasBeenSet; Aws::Vector m_tagsToAdd; bool m_tagsToAddHasBeenSet; Aws::Vector m_variableTags; bool m_variableTagsHasBeenSet; CreateRule m_createRule; bool m_createRuleHasBeenSet; RetainRule m_retainRule; bool m_retainRuleHasBeenSet; FastRestoreRule m_fastRestoreRule; bool m_fastRestoreRuleHasBeenSet; Aws::Vector m_crossRegionCopyRules; bool m_crossRegionCopyRulesHasBeenSet; }; } // namespace Model } // namespace DLM } // namespace Aws