AWS SDK for C++  0.14.3
AWS SDK for C++
Attribute.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
18 
19 namespace Aws
20 {
21 namespace Utils
22 {
23 namespace Json
24 {
25  class JsonValue;
26 } // namespace Json
27 } // namespace Utils
28 namespace Inspector
29 {
30 namespace Model
31 {
32 
39  {
40  public:
41  Attribute();
42  Attribute(const Aws::Utils::Json::JsonValue& jsonValue);
43  Attribute& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetKey() const{ return m_key; }
50 
54  inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
55 
59  inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = value; }
60 
64  inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
65 
69  inline Attribute& WithKey(const Aws::String& value) { SetKey(value); return *this;}
70 
74  inline Attribute& WithKey(Aws::String&& value) { SetKey(value); return *this;}
75 
79  inline Attribute& WithKey(const char* value) { SetKey(value); return *this;}
80 
84  inline const Aws::String& GetValue() const{ return m_value; }
85 
89  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
90 
94  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = value; }
95 
99  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
100 
104  inline Attribute& WithValue(const Aws::String& value) { SetValue(value); return *this;}
105 
109  inline Attribute& WithValue(Aws::String&& value) { SetValue(value); return *this;}
110 
114  inline Attribute& WithValue(const char* value) { SetValue(value); return *this;}
115 
116  private:
117  Aws::String m_key;
118  bool m_keyHasBeenSet;
119  Aws::String m_value;
120  bool m_valueHasBeenSet;
121  };
122 
123 } // namespace Model
124 } // namespace Inspector
125 } // namespace Aws
void SetValue(Aws::String &&value)
Definition: Attribute.h:94
Attribute & WithValue(Aws::String &&value)
Definition: Attribute.h:109
void SetKey(const Aws::String &value)
Definition: Attribute.h:54
#define AWS_INSPECTOR_API
const Aws::String & GetValue() const
Definition: Attribute.h:84
Attribute & WithKey(Aws::String &&value)
Definition: Attribute.h:74
const Aws::String & GetKey() const
Definition: Attribute.h:49
Attribute & WithKey(const Aws::String &value)
Definition: Attribute.h:69
void SetKey(const char *value)
Definition: Attribute.h:64
Attribute & WithValue(const Aws::String &value)
Definition: Attribute.h:104
void SetKey(Aws::String &&value)
Definition: Attribute.h:59
Attribute & WithValue(const char *value)
Definition: Attribute.h:114
Attribute & WithKey(const char *value)
Definition: Attribute.h:79
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetValue(const char *value)
Definition: Attribute.h:99
void SetValue(const Aws::String &value)
Definition: Attribute.h:89
JSON (JavaScript Object Notation).