AWS SDK for C++  0.14.3
AWS SDK for C++
ScheduledInstanceRecurrence.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace EC2
31 {
32 namespace Model
33 {
34 
39  {
40  public:
43  ScheduledInstanceRecurrence& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
52  inline const Aws::String& GetFrequency() const{ return m_frequency; }
53 
58  inline void SetFrequency(const Aws::String& value) { m_frequencyHasBeenSet = true; m_frequency = value; }
59 
64  inline void SetFrequency(Aws::String&& value) { m_frequencyHasBeenSet = true; m_frequency = value; }
65 
70  inline void SetFrequency(const char* value) { m_frequencyHasBeenSet = true; m_frequency.assign(value); }
71 
76  inline ScheduledInstanceRecurrence& WithFrequency(const Aws::String& value) { SetFrequency(value); return *this;}
77 
82  inline ScheduledInstanceRecurrence& WithFrequency(Aws::String&& value) { SetFrequency(value); return *this;}
83 
88  inline ScheduledInstanceRecurrence& WithFrequency(const char* value) { SetFrequency(value); return *this;}
89 
94  inline int GetInterval() const{ return m_interval; }
95 
100  inline void SetInterval(int value) { m_intervalHasBeenSet = true; m_interval = value; }
101 
106  inline ScheduledInstanceRecurrence& WithInterval(int value) { SetInterval(value); return *this;}
107 
113  inline const Aws::Vector<int>& GetOccurrenceDaySet() const{ return m_occurrenceDaySet; }
114 
120  inline void SetOccurrenceDaySet(const Aws::Vector<int>& value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet = value; }
121 
127  inline void SetOccurrenceDaySet(Aws::Vector<int>&& value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet = value; }
128 
134  inline ScheduledInstanceRecurrence& WithOccurrenceDaySet(const Aws::Vector<int>& value) { SetOccurrenceDaySet(value); return *this;}
135 
141  inline ScheduledInstanceRecurrence& WithOccurrenceDaySet(Aws::Vector<int>&& value) { SetOccurrenceDaySet(value); return *this;}
142 
148  inline ScheduledInstanceRecurrence& AddOccurrenceDaySet(int value) { m_occurrenceDaySetHasBeenSet = true; m_occurrenceDaySet.push_back(value); return *this; }
149 
154  inline bool GetOccurrenceRelativeToEnd() const{ return m_occurrenceRelativeToEnd; }
155 
160  inline void SetOccurrenceRelativeToEnd(bool value) { m_occurrenceRelativeToEndHasBeenSet = true; m_occurrenceRelativeToEnd = value; }
161 
166  inline ScheduledInstanceRecurrence& WithOccurrenceRelativeToEnd(bool value) { SetOccurrenceRelativeToEnd(value); return *this;}
167 
172  inline const Aws::String& GetOccurrenceUnit() const{ return m_occurrenceUnit; }
173 
178  inline void SetOccurrenceUnit(const Aws::String& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = value; }
179 
184  inline void SetOccurrenceUnit(Aws::String&& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = value; }
185 
190  inline void SetOccurrenceUnit(const char* value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit.assign(value); }
191 
196  inline ScheduledInstanceRecurrence& WithOccurrenceUnit(const Aws::String& value) { SetOccurrenceUnit(value); return *this;}
197 
202  inline ScheduledInstanceRecurrence& WithOccurrenceUnit(Aws::String&& value) { SetOccurrenceUnit(value); return *this;}
203 
208  inline ScheduledInstanceRecurrence& WithOccurrenceUnit(const char* value) { SetOccurrenceUnit(value); return *this;}
209 
210  private:
211  Aws::String m_frequency;
212  bool m_frequencyHasBeenSet;
213  int m_interval;
214  bool m_intervalHasBeenSet;
215  Aws::Vector<int> m_occurrenceDaySet;
216  bool m_occurrenceDaySetHasBeenSet;
217  bool m_occurrenceRelativeToEnd;
218  bool m_occurrenceRelativeToEndHasBeenSet;
219  Aws::String m_occurrenceUnit;
220  bool m_occurrenceUnitHasBeenSet;
221  };
222 
223 } // namespace Model
224 } // namespace EC2
225 } // namespace Aws
ScheduledInstanceRecurrence & WithInterval(int value)
void SetOccurrenceDaySet(const Aws::Vector< int > &value)
ScheduledInstanceRecurrence & WithFrequency(const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ScheduledInstanceRecurrence & WithOccurrenceDaySet(const Aws::Vector< int > &value)
ScheduledInstanceRecurrence & WithOccurrenceRelativeToEnd(bool value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
ScheduledInstanceRecurrence & AddOccurrenceDaySet(int value)
ScheduledInstanceRecurrence & WithOccurrenceUnit(const char *value)
ScheduledInstanceRecurrence & WithOccurrenceDaySet(Aws::Vector< int > &&value)
ScheduledInstanceRecurrence & WithOccurrenceUnit(Aws::String &&value)
ScheduledInstanceRecurrence & WithFrequency(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ScheduledInstanceRecurrence & WithOccurrenceUnit(const Aws::String &value)
ScheduledInstanceRecurrence & WithFrequency(const Aws::String &value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
const Aws::Vector< int > & GetOccurrenceDaySet() const
JSON (JavaScript Object Notation).