AWS SDK for C++  0.14.3
AWS SDK for C++
RuleCondition.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 Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace ElasticLoadBalancingv2
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  RuleCondition();
43  RuleCondition& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
46  void OutputToStream(Aws::OStream& oStream, const char* location) const;
47 
51  inline const Aws::String& GetField() const{ return m_field; }
52 
56  inline void SetField(const Aws::String& value) { m_fieldHasBeenSet = true; m_field = value; }
57 
61  inline void SetField(Aws::String&& value) { m_fieldHasBeenSet = true; m_field = value; }
62 
66  inline void SetField(const char* value) { m_fieldHasBeenSet = true; m_field.assign(value); }
67 
71  inline RuleCondition& WithField(const Aws::String& value) { SetField(value); return *this;}
72 
76  inline RuleCondition& WithField(Aws::String&& value) { SetField(value); return *this;}
77 
81  inline RuleCondition& WithField(const char* value) { SetField(value); return *this;}
82 
91  inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
92 
101  inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
102 
111  inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = value; }
112 
121  inline RuleCondition& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
122 
131  inline RuleCondition& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(value); return *this;}
132 
141  inline RuleCondition& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
142 
151  inline RuleCondition& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
152 
161  inline RuleCondition& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
162 
163  private:
164  Aws::String m_field;
165  bool m_fieldHasBeenSet;
166  Aws::Vector<Aws::String> m_values;
167  bool m_valuesHasBeenSet;
168  };
169 
170 } // namespace Model
171 } // namespace ElasticLoadBalancingv2
172 } // namespace Aws
RuleCondition & AddValues(Aws::String &&value)
RuleCondition & WithValues(const Aws::Vector< Aws::String > &value)
RuleCondition & AddValues(const char *value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
RuleCondition & WithField(Aws::String &&value)
Definition: RuleCondition.h:76
RuleCondition & WithField(const Aws::String &value)
Definition: RuleCondition.h:71
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
RuleCondition & WithField(const char *value)
Definition: RuleCondition.h:81
const Aws::Vector< Aws::String > & GetValues() const
Definition: RuleCondition.h:91
RuleCondition & AddValues(const Aws::String &value)
void SetValues(Aws::Vector< Aws::String > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
RuleCondition & WithValues(Aws::Vector< Aws::String > &&value)
void SetValues(const Aws::Vector< Aws::String > &value)
#define AWS_ELASTICLOADBALANCINGV2_API
JSON (JavaScript Object Notation).