AWS SDK for C++  0.12.9
AWS SDK for C++
ContextEntry.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/iam/IAM_EXPORTS.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Xml
27 {
28  class XmlNode;
29 } // namespace Xml
30 } // namespace Utils
31 namespace IAM
32 {
33 namespace Model
34 {
35 
45  {
46  public:
47  ContextEntry();
48  ContextEntry(const Aws::Utils::Xml::XmlNode& xmlNode);
49  ContextEntry& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
50 
51  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
52  void OutputToStream(Aws::OStream& oStream, const char* location) const;
53 
58  inline const Aws::String& GetContextKeyName() const{ return m_contextKeyName; }
59 
64  inline void SetContextKeyName(const Aws::String& value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName = value; }
65 
70  inline void SetContextKeyName(Aws::String&& value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName = value; }
71 
76  inline void SetContextKeyName(const char* value) { m_contextKeyNameHasBeenSet = true; m_contextKeyName.assign(value); }
77 
82  inline ContextEntry& WithContextKeyName(const Aws::String& value) { SetContextKeyName(value); return *this;}
83 
88  inline ContextEntry& WithContextKeyName(Aws::String&& value) { SetContextKeyName(value); return *this;}
89 
94  inline ContextEntry& WithContextKeyName(const char* value) { SetContextKeyName(value); return *this;}
95 
101  inline const Aws::Vector<Aws::String>& GetContextKeyValues() const{ return m_contextKeyValues; }
102 
108  inline void SetContextKeyValues(const Aws::Vector<Aws::String>& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues = value; }
109 
115  inline void SetContextKeyValues(Aws::Vector<Aws::String>&& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues = value; }
116 
122  inline ContextEntry& WithContextKeyValues(const Aws::Vector<Aws::String>& value) { SetContextKeyValues(value); return *this;}
123 
129  inline ContextEntry& WithContextKeyValues(Aws::Vector<Aws::String>&& value) { SetContextKeyValues(value); return *this;}
130 
136  inline ContextEntry& AddContextKeyValues(const Aws::String& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(value); return *this; }
137 
143  inline ContextEntry& AddContextKeyValues(Aws::String&& value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(value); return *this; }
144 
150  inline ContextEntry& AddContextKeyValues(const char* value) { m_contextKeyValuesHasBeenSet = true; m_contextKeyValues.push_back(value); return *this; }
151 
156  inline const ContextKeyTypeEnum& GetContextKeyType() const{ return m_contextKeyType; }
157 
162  inline void SetContextKeyType(const ContextKeyTypeEnum& value) { m_contextKeyTypeHasBeenSet = true; m_contextKeyType = value; }
163 
168  inline void SetContextKeyType(ContextKeyTypeEnum&& value) { m_contextKeyTypeHasBeenSet = true; m_contextKeyType = value; }
169 
174  inline ContextEntry& WithContextKeyType(const ContextKeyTypeEnum& value) { SetContextKeyType(value); return *this;}
175 
180  inline ContextEntry& WithContextKeyType(ContextKeyTypeEnum&& value) { SetContextKeyType(value); return *this;}
181 
182  private:
183  Aws::String m_contextKeyName;
184  bool m_contextKeyNameHasBeenSet;
185  Aws::Vector<Aws::String> m_contextKeyValues;
186  bool m_contextKeyValuesHasBeenSet;
187  ContextKeyTypeEnum m_contextKeyType;
188  bool m_contextKeyTypeHasBeenSet;
189  };
190 
191 } // namespace Model
192 } // namespace IAM
193 } // namespace Aws
void SetContextKeyName(const char *value)
Definition: ContextEntry.h:76
Definition: ContextEntry.h:44
void SetContextKeyName(Aws::String &&value)
Definition: ContextEntry.h:70
ContextEntry & WithContextKeyValues(const Aws::Vector< Aws::String > &value)
Definition: ContextEntry.h:122
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ContextEntry & AddContextKeyValues(const Aws::String &value)
Definition: ContextEntry.h:136
void SetContextKeyValues(const Aws::Vector< Aws::String > &value)
Definition: ContextEntry.h:108
ContextEntry & WithContextKeyName(Aws::String &&value)
Definition: ContextEntry.h:88
const Aws::Vector< Aws::String > & GetContextKeyValues() const
Definition: ContextEntry.h:101
ContextEntry & AddContextKeyValues(Aws::String &&value)
Definition: ContextEntry.h:143
ContextEntry & WithContextKeyType(const ContextKeyTypeEnum &value)
Definition: ContextEntry.h:174
void SetContextKeyValues(Aws::Vector< Aws::String > &&value)
Definition: ContextEntry.h:115
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
ContextEntry & WithContextKeyName(const Aws::String &value)
Definition: ContextEntry.h:82
const ContextKeyTypeEnum & GetContextKeyType() const
Definition: ContextEntry.h:156
ContextEntry & AddContextKeyValues(const char *value)
Definition: ContextEntry.h:150
ContextEntry & WithContextKeyValues(Aws::Vector< Aws::String > &&value)
Definition: ContextEntry.h:129
void SetContextKeyName(const Aws::String &value)
Definition: ContextEntry.h:64
ContextEntry & WithContextKeyType(ContextKeyTypeEnum &&value)
Definition: ContextEntry.h:180
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ContextEntry & WithContextKeyName(const char *value)
Definition: ContextEntry.h:94
const Aws::String & GetContextKeyName() const
Definition: ContextEntry.h:58
void SetContextKeyType(ContextKeyTypeEnum &&value)
Definition: ContextEntry.h:168
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:34
void SetContextKeyType(const ContextKeyTypeEnum &value)
Definition: ContextEntry.h:162
JSON (JavaScript Object Notation).