AWS SDK for C++  0.14.3
AWS SDK for C++
ScheduledInstanceRecurrenceRequest.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:
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 ScheduledInstanceRecurrenceRequest& WithFrequency(const Aws::String& value) { SetFrequency(value); return *this;}
77 
82  inline ScheduledInstanceRecurrenceRequest& WithFrequency(Aws::String&& value) { SetFrequency(value); return *this;}
83 
88  inline ScheduledInstanceRecurrenceRequest& 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 ScheduledInstanceRecurrenceRequest& WithInterval(int value) { SetInterval(value); return *this;}
107 
115  inline const Aws::Vector<int>& GetOccurrenceDays() const{ return m_occurrenceDays; }
116 
124  inline void SetOccurrenceDays(const Aws::Vector<int>& value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays = value; }
125 
133  inline void SetOccurrenceDays(Aws::Vector<int>&& value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays = value; }
134 
142  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceDays(const Aws::Vector<int>& value) { SetOccurrenceDays(value); return *this;}
143 
151  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceDays(Aws::Vector<int>&& value) { SetOccurrenceDays(value); return *this;}
152 
160  inline ScheduledInstanceRecurrenceRequest& AddOccurrenceDays(int value) { m_occurrenceDaysHasBeenSet = true; m_occurrenceDays.push_back(value); return *this; }
161 
166  inline bool GetOccurrenceRelativeToEnd() const{ return m_occurrenceRelativeToEnd; }
167 
172  inline void SetOccurrenceRelativeToEnd(bool value) { m_occurrenceRelativeToEndHasBeenSet = true; m_occurrenceRelativeToEnd = value; }
173 
178  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceRelativeToEnd(bool value) { SetOccurrenceRelativeToEnd(value); return *this;}
179 
186  inline const Aws::String& GetOccurrenceUnit() const{ return m_occurrenceUnit; }
187 
194  inline void SetOccurrenceUnit(const Aws::String& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = value; }
195 
202  inline void SetOccurrenceUnit(Aws::String&& value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit = value; }
203 
210  inline void SetOccurrenceUnit(const char* value) { m_occurrenceUnitHasBeenSet = true; m_occurrenceUnit.assign(value); }
211 
218  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(const Aws::String& value) { SetOccurrenceUnit(value); return *this;}
219 
226  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(Aws::String&& value) { SetOccurrenceUnit(value); return *this;}
227 
234  inline ScheduledInstanceRecurrenceRequest& WithOccurrenceUnit(const char* value) { SetOccurrenceUnit(value); return *this;}
235 
236  private:
237  Aws::String m_frequency;
238  bool m_frequencyHasBeenSet;
239  int m_interval;
240  bool m_intervalHasBeenSet;
241  Aws::Vector<int> m_occurrenceDays;
242  bool m_occurrenceDaysHasBeenSet;
243  bool m_occurrenceRelativeToEnd;
244  bool m_occurrenceRelativeToEndHasBeenSet;
245  Aws::String m_occurrenceUnit;
246  bool m_occurrenceUnitHasBeenSet;
247  };
248 
249 } // namespace Model
250 } // namespace EC2
251 } // namespace Aws
ScheduledInstanceRecurrenceRequest & WithOccurrenceUnit(const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ScheduledInstanceRecurrenceRequest & AddOccurrenceDays(int value)
ScheduledInstanceRecurrenceRequest & WithOccurrenceUnit(const Aws::String &value)
ScheduledInstanceRecurrenceRequest & WithFrequency(Aws::String &&value)
ScheduledInstanceRecurrenceRequest & WithInterval(int value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
ScheduledInstanceRecurrenceRequest & WithOccurrenceRelativeToEnd(bool value)
ScheduledInstanceRecurrenceRequest & WithOccurrenceUnit(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ScheduledInstanceRecurrenceRequest & WithFrequency(const char *value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
ScheduledInstanceRecurrenceRequest & WithOccurrenceDays(Aws::Vector< int > &&value)
ScheduledInstanceRecurrenceRequest & WithFrequency(const Aws::String &value)
ScheduledInstanceRecurrenceRequest & WithOccurrenceDays(const Aws::Vector< int > &value)
JSON (JavaScript Object Notation).