AWS SDK for C++  0.14.3
AWS SDK for C++
Predicate.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/waf/WAF_EXPORTS.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace WAF
30 {
31 namespace Model
32 {
33 
42  {
43  public:
44  Predicate();
45  Predicate(const Aws::Utils::Json::JsonValue& jsonValue);
46  Predicate& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
63  inline bool GetNegated() const{ return m_negated; }
64 
79  inline void SetNegated(bool value) { m_negatedHasBeenSet = true; m_negated = value; }
80 
95  inline Predicate& WithNegated(bool value) { SetNegated(value); return *this;}
96 
101  inline const PredicateType& GetType() const{ return m_type; }
102 
107  inline void SetType(const PredicateType& value) { m_typeHasBeenSet = true; m_type = value; }
108 
113  inline void SetType(PredicateType&& value) { m_typeHasBeenSet = true; m_type = value; }
114 
119  inline Predicate& WithType(const PredicateType& value) { SetType(value); return *this;}
120 
125  inline Predicate& WithType(PredicateType&& value) { SetType(value); return *this;}
126 
132  inline const Aws::String& GetDataId() const{ return m_dataId; }
133 
139  inline void SetDataId(const Aws::String& value) { m_dataIdHasBeenSet = true; m_dataId = value; }
140 
146  inline void SetDataId(Aws::String&& value) { m_dataIdHasBeenSet = true; m_dataId = value; }
147 
153  inline void SetDataId(const char* value) { m_dataIdHasBeenSet = true; m_dataId.assign(value); }
154 
160  inline Predicate& WithDataId(const Aws::String& value) { SetDataId(value); return *this;}
161 
167  inline Predicate& WithDataId(Aws::String&& value) { SetDataId(value); return *this;}
168 
174  inline Predicate& WithDataId(const char* value) { SetDataId(value); return *this;}
175 
176  private:
177  bool m_negated;
178  bool m_negatedHasBeenSet;
179  PredicateType m_type;
180  bool m_typeHasBeenSet;
181  Aws::String m_dataId;
182  bool m_dataIdHasBeenSet;
183  };
184 
185 } // namespace Model
186 } // namespace WAF
187 } // namespace Aws
void SetDataId(const char *value)
Definition: Predicate.h:153
const PredicateType & GetType() const
Definition: Predicate.h:101
Predicate & WithDataId(Aws::String &&value)
Definition: Predicate.h:167
Predicate & WithType(PredicateType &&value)
Definition: Predicate.h:125
void SetDataId(Aws::String &&value)
Definition: Predicate.h:146
Predicate & WithNegated(bool value)
Definition: Predicate.h:95
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:37
void SetDataId(const Aws::String &value)
Definition: Predicate.h:139
Predicate & WithType(const PredicateType &value)
Definition: Predicate.h:119
void SetNegated(bool value)
Definition: Predicate.h:79
Predicate & WithDataId(const char *value)
Definition: Predicate.h:174
bool GetNegated() const
Definition: Predicate.h:63
void SetType(PredicateType &&value)
Definition: Predicate.h:113
void SetType(const PredicateType &value)
Definition: Predicate.h:107
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Predicate & WithDataId(const Aws::String &value)
Definition: Predicate.h:160
const Aws::String & GetDataId() const
Definition: Predicate.h:132
JSON (JavaScript Object Notation).