AWS SDK for C++  0.12.9
AWS SDK for C++
Rule.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
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace DeviceFarm
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  Rule();
42  Rule(const Aws::Utils::Json::JsonValue& jsonValue);
43  Rule& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
53  inline const DeviceAttribute& GetAttribute() const{ return m_attribute; }
54 
62  inline void SetAttribute(const DeviceAttribute& value) { m_attributeHasBeenSet = true; m_attribute = value; }
63 
71  inline void SetAttribute(DeviceAttribute&& value) { m_attributeHasBeenSet = true; m_attribute = value; }
72 
80  inline Rule& WithAttribute(const DeviceAttribute& value) { SetAttribute(value); return *this;}
81 
89  inline Rule& WithAttribute(DeviceAttribute&& value) { SetAttribute(value); return *this;}
90 
97  inline const RuleOperator& GetOperator() const{ return m_operator; }
98 
105  inline void SetOperator(const RuleOperator& value) { m_operatorHasBeenSet = true; m_operator = value; }
106 
113  inline void SetOperator(RuleOperator&& value) { m_operatorHasBeenSet = true; m_operator = value; }
114 
121  inline Rule& WithOperator(const RuleOperator& value) { SetOperator(value); return *this;}
122 
129  inline Rule& WithOperator(RuleOperator&& value) { SetOperator(value); return *this;}
130 
134  inline const Aws::String& GetValue() const{ return m_value; }
135 
139  inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
140 
144  inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = value; }
145 
149  inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
150 
154  inline Rule& WithValue(const Aws::String& value) { SetValue(value); return *this;}
155 
159  inline Rule& WithValue(Aws::String&& value) { SetValue(value); return *this;}
160 
164  inline Rule& WithValue(const char* value) { SetValue(value); return *this;}
165 
166  private:
167  DeviceAttribute m_attribute;
168  bool m_attributeHasBeenSet;
169  RuleOperator m_operator;
170  bool m_operatorHasBeenSet;
171  Aws::String m_value;
172  bool m_valueHasBeenSet;
173  };
174 
175 } // namespace Model
176 } // namespace DeviceFarm
177 } // namespace Aws
Rule & WithAttribute(const DeviceAttribute &value)
Definition: Rule.h:80
#define AWS_DEVICEFARM_API
Rule & WithAttribute(DeviceAttribute &&value)
Definition: Rule.h:89
void SetAttribute(const DeviceAttribute &value)
Definition: Rule.h:62
void SetValue(Aws::String &&value)
Definition: Rule.h:144
Rule & WithOperator(const RuleOperator &value)
Definition: Rule.h:121
void SetOperator(RuleOperator &&value)
Definition: Rule.h:113
const RuleOperator & GetOperator() const
Definition: Rule.h:97
Rule & WithValue(const char *value)
Definition: Rule.h:164
const DeviceAttribute & GetAttribute() const
Definition: Rule.h:53
const Aws::String & GetValue() const
Definition: Rule.h:134
Rule & WithOperator(RuleOperator &&value)
Definition: Rule.h:129
Rule & WithValue(const Aws::String &value)
Definition: Rule.h:154
Rule & WithValue(Aws::String &&value)
Definition: Rule.h:159
void SetValue(const Aws::String &value)
Definition: Rule.h:139
void SetAttribute(DeviceAttribute &&value)
Definition: Rule.h:71
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetValue(const char *value)
Definition: Rule.h:149
void SetOperator(const RuleOperator &value)
Definition: Rule.h:105
JSON (JavaScript Object Notation).