/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the dlm-2018-01-12.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.DLM.Model { /// /// [Snapshot and AMI policies only] Specifies when the policy should create snapshots /// or AMIs. /// /// /// public partial class CreateRule { private string _cronExpression; private int? _interval; private IntervalUnitValues _intervalUnit; private LocationValues _location; private List _times = new List(); /// /// Gets and sets the property CronExpression. /// /// The schedule, as a Cron expression. The schedule interval must be between 1 hour and /// 1 year. For more information, see Cron /// expressions in the Amazon CloudWatch User Guide. /// /// [AWSProperty(Min=17, Max=106)] public string CronExpression { get { return this._cronExpression; } set { this._cronExpression = value; } } // Check to see if CronExpression property is set internal bool IsSetCronExpression() { return this._cronExpression != null; } /// /// Gets and sets the property Interval. /// /// The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and /// 24. /// /// [AWSProperty(Min=1)] public int Interval { get { return this._interval.GetValueOrDefault(); } set { this._interval = value; } } // Check to see if Interval property is set internal bool IsSetInterval() { return this._interval.HasValue; } /// /// Gets and sets the property IntervalUnit. /// /// The interval unit. /// /// public IntervalUnitValues IntervalUnit { get { return this._intervalUnit; } set { this._intervalUnit = value; } } // Check to see if IntervalUnit property is set internal bool IsSetIntervalUnit() { return this._intervalUnit != null; } /// /// Gets and sets the property Location. /// /// [Snapshot policies only] Specifies the destination for snapshots created by /// the policy. To create snapshots in the same Region as the source resource, specify /// CLOUD. To create snapshots on the same Outpost as the source resource, /// specify OUTPOST_LOCAL. If you omit this parameter, CLOUD /// is used by default. /// /// /// /// If the policy targets resources in an Amazon Web Services Region, then you must create /// snapshots in the same Region as the source resource. If the policy targets resources /// on an Outpost, then you can create snapshots on the same Outpost as the source resource, /// or in the Region of that Outpost. /// /// public LocationValues Location { get { return this._location; } set { this._location = value; } } // Check to see if Location property is set internal bool IsSetLocation() { return this._location != null; } /// /// Gets and sets the property Times. /// /// The time, in UTC, to start the operation. The supported format is hh:mm. /// /// /// /// The operation occurs within a one-hour window following the specified time. If you /// do not specify a time, Amazon Data Lifecycle Manager selects a time within the next /// 24 hours. /// /// [AWSProperty(Max=1)] public List Times { get { return this._times; } set { this._times = value; } } // Check to see if Times property is set internal bool IsSetTimes() { return this._times != null && this._times.Count > 0; } } }