AWS SDK for C++  0.14.3
AWS SDK for C++
FieldToMatch.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 
38  {
39  public:
40  FieldToMatch();
41  FieldToMatch(const Aws::Utils::Json::JsonValue& jsonValue);
42  FieldToMatch& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
43  Aws::Utils::Json::JsonValue Jsonize() const;
44 
67  inline const MatchFieldType& GetType() const{ return m_type; }
68 
91  inline void SetType(const MatchFieldType& value) { m_typeHasBeenSet = true; m_type = value; }
92 
115  inline void SetType(MatchFieldType&& value) { m_typeHasBeenSet = true; m_type = value; }
116 
139  inline FieldToMatch& WithType(const MatchFieldType& value) { SetType(value); return *this;}
140 
163  inline FieldToMatch& WithType(MatchFieldType&& value) { SetType(value); return *this;}
164 
171  inline const Aws::String& GetData() const{ return m_data; }
172 
179  inline void SetData(const Aws::String& value) { m_dataHasBeenSet = true; m_data = value; }
180 
187  inline void SetData(Aws::String&& value) { m_dataHasBeenSet = true; m_data = value; }
188 
195  inline void SetData(const char* value) { m_dataHasBeenSet = true; m_data.assign(value); }
196 
203  inline FieldToMatch& WithData(const Aws::String& value) { SetData(value); return *this;}
204 
211  inline FieldToMatch& WithData(Aws::String&& value) { SetData(value); return *this;}
212 
219  inline FieldToMatch& WithData(const char* value) { SetData(value); return *this;}
220 
221  private:
222  MatchFieldType m_type;
223  bool m_typeHasBeenSet;
224  Aws::String m_data;
225  bool m_dataHasBeenSet;
226  };
227 
228 } // namespace Model
229 } // namespace WAF
230 } // namespace Aws
void SetType(MatchFieldType &&value)
Definition: FieldToMatch.h:115
FieldToMatch & WithData(const Aws::String &value)
Definition: FieldToMatch.h:203
void SetData(const char *value)
Definition: FieldToMatch.h:195
FieldToMatch & WithData(const char *value)
Definition: FieldToMatch.h:219
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:37
const Aws::String & GetData() const
Definition: FieldToMatch.h:171
FieldToMatch & WithData(Aws::String &&value)
Definition: FieldToMatch.h:211
void SetType(const MatchFieldType &value)
Definition: FieldToMatch.h:91
void SetData(const Aws::String &value)
Definition: FieldToMatch.h:179
void SetData(Aws::String &&value)
Definition: FieldToMatch.h:187
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
FieldToMatch & WithType(const MatchFieldType &value)
Definition: FieldToMatch.h:139
FieldToMatch & WithType(MatchFieldType &&value)
Definition: FieldToMatch.h:163
const MatchFieldType & GetType() const
Definition: FieldToMatch.h:67
JSON (JavaScript Object Notation).