AWS SDK for C++  0.14.3
AWS SDK for C++
IdFormat.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:
41  IdFormat();
42  IdFormat(const Aws::Utils::Xml::XmlNode& xmlNode);
43  IdFormat& 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 
51  inline const Aws::String& GetResource() const{ return m_resource; }
52 
56  inline void SetResource(const Aws::String& value) { m_resourceHasBeenSet = true; m_resource = value; }
57 
61  inline void SetResource(Aws::String&& value) { m_resourceHasBeenSet = true; m_resource = value; }
62 
66  inline void SetResource(const char* value) { m_resourceHasBeenSet = true; m_resource.assign(value); }
67 
71  inline IdFormat& WithResource(const Aws::String& value) { SetResource(value); return *this;}
72 
76  inline IdFormat& WithResource(Aws::String&& value) { SetResource(value); return *this;}
77 
81  inline IdFormat& WithResource(const char* value) { SetResource(value); return *this;}
82 
87  inline bool GetUseLongIds() const{ return m_useLongIds; }
88 
93  inline void SetUseLongIds(bool value) { m_useLongIdsHasBeenSet = true; m_useLongIds = value; }
94 
99  inline IdFormat& WithUseLongIds(bool value) { SetUseLongIds(value); return *this;}
100 
106  inline const Aws::Utils::DateTime& GetDeadline() const{ return m_deadline; }
107 
113  inline void SetDeadline(const Aws::Utils::DateTime& value) { m_deadlineHasBeenSet = true; m_deadline = value; }
114 
120  inline void SetDeadline(Aws::Utils::DateTime&& value) { m_deadlineHasBeenSet = true; m_deadline = value; }
121 
127  inline IdFormat& WithDeadline(const Aws::Utils::DateTime& value) { SetDeadline(value); return *this;}
128 
134  inline IdFormat& WithDeadline(Aws::Utils::DateTime&& value) { SetDeadline(value); return *this;}
135 
136  private:
137  Aws::String m_resource;
138  bool m_resourceHasBeenSet;
139  bool m_useLongIds;
140  bool m_useLongIdsHasBeenSet;
141  Aws::Utils::DateTime m_deadline;
142  bool m_deadlineHasBeenSet;
143  };
144 
145 } // namespace Model
146 } // namespace EC2
147 } // namespace Aws
IdFormat & WithResource(const Aws::String &value)
Definition: IdFormat.h:71
void SetUseLongIds(bool value)
Definition: IdFormat.h:93
const Aws::String & GetResource() const
Definition: IdFormat.h:51
void SetDeadline(Aws::Utils::DateTime &&value)
Definition: IdFormat.h:120
IdFormat & WithDeadline(const Aws::Utils::DateTime &value)
Definition: IdFormat.h:127
void SetDeadline(const Aws::Utils::DateTime &value)
Definition: IdFormat.h:113
IdFormat & WithResource(Aws::String &&value)
Definition: IdFormat.h:76
const Aws::Utils::DateTime & GetDeadline() const
Definition: IdFormat.h:106
bool GetUseLongIds() const
Definition: IdFormat.h:87
IdFormat & WithResource(const char *value)
Definition: IdFormat.h:81
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetResource(Aws::String &&value)
Definition: IdFormat.h:61
IdFormat & WithDeadline(Aws::Utils::DateTime &&value)
Definition: IdFormat.h:134
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetResource(const Aws::String &value)
Definition: IdFormat.h:56
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:37
void SetResource(const char *value)
Definition: IdFormat.h:66
IdFormat & WithUseLongIds(bool value)
Definition: IdFormat.h:99
JSON (JavaScript Object Notation).