1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/gamelift/GameLift_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace GameLift
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>Values for use in <a>Player</a> attribute key-value pairs. This object lets
30    * you specify an attribute value using any of the valid data types: string,
31    * number, string array, or data map. Each <code>AttributeValue</code> object can
32    * use only one of the available properties.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/AttributeValue">AWS
34    * API Reference</a></p>
35    */
36   class AWS_GAMELIFT_API AttributeValue
37   {
38   public:
39     AttributeValue();
40     AttributeValue(Aws::Utils::Json::JsonView jsonValue);
41     AttributeValue& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>For single string values. Maximum string length is 100 characters.</p>
47      */
GetS()48     inline const Aws::String& GetS() const{ return m_s; }
49 
50     /**
51      * <p>For single string values. Maximum string length is 100 characters.</p>
52      */
SHasBeenSet()53     inline bool SHasBeenSet() const { return m_sHasBeenSet; }
54 
55     /**
56      * <p>For single string values. Maximum string length is 100 characters.</p>
57      */
SetS(const Aws::String & value)58     inline void SetS(const Aws::String& value) { m_sHasBeenSet = true; m_s = value; }
59 
60     /**
61      * <p>For single string values. Maximum string length is 100 characters.</p>
62      */
SetS(Aws::String && value)63     inline void SetS(Aws::String&& value) { m_sHasBeenSet = true; m_s = std::move(value); }
64 
65     /**
66      * <p>For single string values. Maximum string length is 100 characters.</p>
67      */
SetS(const char * value)68     inline void SetS(const char* value) { m_sHasBeenSet = true; m_s.assign(value); }
69 
70     /**
71      * <p>For single string values. Maximum string length is 100 characters.</p>
72      */
WithS(const Aws::String & value)73     inline AttributeValue& WithS(const Aws::String& value) { SetS(value); return *this;}
74 
75     /**
76      * <p>For single string values. Maximum string length is 100 characters.</p>
77      */
WithS(Aws::String && value)78     inline AttributeValue& WithS(Aws::String&& value) { SetS(std::move(value)); return *this;}
79 
80     /**
81      * <p>For single string values. Maximum string length is 100 characters.</p>
82      */
WithS(const char * value)83     inline AttributeValue& WithS(const char* value) { SetS(value); return *this;}
84 
85 
86     /**
87      * <p>For number values, expressed as double.</p>
88      */
GetN()89     inline double GetN() const{ return m_n; }
90 
91     /**
92      * <p>For number values, expressed as double.</p>
93      */
NHasBeenSet()94     inline bool NHasBeenSet() const { return m_nHasBeenSet; }
95 
96     /**
97      * <p>For number values, expressed as double.</p>
98      */
SetN(double value)99     inline void SetN(double value) { m_nHasBeenSet = true; m_n = value; }
100 
101     /**
102      * <p>For number values, expressed as double.</p>
103      */
WithN(double value)104     inline AttributeValue& WithN(double value) { SetN(value); return *this;}
105 
106 
107     /**
108      * <p>For a list of up to 10 strings. Maximum length for each string is 100
109      * characters. Duplicate values are not recognized; all occurrences of the repeated
110      * value after the first of a repeated value are ignored.</p>
111      */
GetSL()112     inline const Aws::Vector<Aws::String>& GetSL() const{ return m_sL; }
113 
114     /**
115      * <p>For a list of up to 10 strings. Maximum length for each string is 100
116      * characters. Duplicate values are not recognized; all occurrences of the repeated
117      * value after the first of a repeated value are ignored.</p>
118      */
SLHasBeenSet()119     inline bool SLHasBeenSet() const { return m_sLHasBeenSet; }
120 
121     /**
122      * <p>For a list of up to 10 strings. Maximum length for each string is 100
123      * characters. Duplicate values are not recognized; all occurrences of the repeated
124      * value after the first of a repeated value are ignored.</p>
125      */
SetSL(const Aws::Vector<Aws::String> & value)126     inline void SetSL(const Aws::Vector<Aws::String>& value) { m_sLHasBeenSet = true; m_sL = value; }
127 
128     /**
129      * <p>For a list of up to 10 strings. Maximum length for each string is 100
130      * characters. Duplicate values are not recognized; all occurrences of the repeated
131      * value after the first of a repeated value are ignored.</p>
132      */
SetSL(Aws::Vector<Aws::String> && value)133     inline void SetSL(Aws::Vector<Aws::String>&& value) { m_sLHasBeenSet = true; m_sL = std::move(value); }
134 
135     /**
136      * <p>For a list of up to 10 strings. Maximum length for each string is 100
137      * characters. Duplicate values are not recognized; all occurrences of the repeated
138      * value after the first of a repeated value are ignored.</p>
139      */
WithSL(const Aws::Vector<Aws::String> & value)140     inline AttributeValue& WithSL(const Aws::Vector<Aws::String>& value) { SetSL(value); return *this;}
141 
142     /**
143      * <p>For a list of up to 10 strings. Maximum length for each string is 100
144      * characters. Duplicate values are not recognized; all occurrences of the repeated
145      * value after the first of a repeated value are ignored.</p>
146      */
WithSL(Aws::Vector<Aws::String> && value)147     inline AttributeValue& WithSL(Aws::Vector<Aws::String>&& value) { SetSL(std::move(value)); return *this;}
148 
149     /**
150      * <p>For a list of up to 10 strings. Maximum length for each string is 100
151      * characters. Duplicate values are not recognized; all occurrences of the repeated
152      * value after the first of a repeated value are ignored.</p>
153      */
AddSL(const Aws::String & value)154     inline AttributeValue& AddSL(const Aws::String& value) { m_sLHasBeenSet = true; m_sL.push_back(value); return *this; }
155 
156     /**
157      * <p>For a list of up to 10 strings. Maximum length for each string is 100
158      * characters. Duplicate values are not recognized; all occurrences of the repeated
159      * value after the first of a repeated value are ignored.</p>
160      */
AddSL(Aws::String && value)161     inline AttributeValue& AddSL(Aws::String&& value) { m_sLHasBeenSet = true; m_sL.push_back(std::move(value)); return *this; }
162 
163     /**
164      * <p>For a list of up to 10 strings. Maximum length for each string is 100
165      * characters. Duplicate values are not recognized; all occurrences of the repeated
166      * value after the first of a repeated value are ignored.</p>
167      */
AddSL(const char * value)168     inline AttributeValue& AddSL(const char* value) { m_sLHasBeenSet = true; m_sL.push_back(value); return *this; }
169 
170 
171     /**
172      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
173      * value is 100 characters. </p>
174      */
GetSDM()175     inline const Aws::Map<Aws::String, double>& GetSDM() const{ return m_sDM; }
176 
177     /**
178      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
179      * value is 100 characters. </p>
180      */
SDMHasBeenSet()181     inline bool SDMHasBeenSet() const { return m_sDMHasBeenSet; }
182 
183     /**
184      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
185      * value is 100 characters. </p>
186      */
SetSDM(const Aws::Map<Aws::String,double> & value)187     inline void SetSDM(const Aws::Map<Aws::String, double>& value) { m_sDMHasBeenSet = true; m_sDM = value; }
188 
189     /**
190      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
191      * value is 100 characters. </p>
192      */
SetSDM(Aws::Map<Aws::String,double> && value)193     inline void SetSDM(Aws::Map<Aws::String, double>&& value) { m_sDMHasBeenSet = true; m_sDM = std::move(value); }
194 
195     /**
196      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
197      * value is 100 characters. </p>
198      */
WithSDM(const Aws::Map<Aws::String,double> & value)199     inline AttributeValue& WithSDM(const Aws::Map<Aws::String, double>& value) { SetSDM(value); return *this;}
200 
201     /**
202      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
203      * value is 100 characters. </p>
204      */
WithSDM(Aws::Map<Aws::String,double> && value)205     inline AttributeValue& WithSDM(Aws::Map<Aws::String, double>&& value) { SetSDM(std::move(value)); return *this;}
206 
207     /**
208      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
209      * value is 100 characters. </p>
210      */
AddSDM(const Aws::String & key,double value)211     inline AttributeValue& AddSDM(const Aws::String& key, double value) { m_sDMHasBeenSet = true; m_sDM.emplace(key, value); return *this; }
212 
213     /**
214      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
215      * value is 100 characters. </p>
216      */
AddSDM(Aws::String && key,double value)217     inline AttributeValue& AddSDM(Aws::String&& key, double value) { m_sDMHasBeenSet = true; m_sDM.emplace(std::move(key), value); return *this; }
218 
219     /**
220      * <p>For a map of up to 10 data type:value pairs. Maximum length for each string
221      * value is 100 characters. </p>
222      */
AddSDM(const char * key,double value)223     inline AttributeValue& AddSDM(const char* key, double value) { m_sDMHasBeenSet = true; m_sDM.emplace(key, value); return *this; }
224 
225   private:
226 
227     Aws::String m_s;
228     bool m_sHasBeenSet;
229 
230     double m_n;
231     bool m_nHasBeenSet;
232 
233     Aws::Vector<Aws::String> m_sL;
234     bool m_sLHasBeenSet;
235 
236     Aws::Map<Aws::String, double> m_sDM;
237     bool m_sDMHasBeenSet;
238   };
239 
240 } // namespace Model
241 } // namespace GameLift
242 } // namespace Aws
243