AWS SDK for C++  0.12.9
AWS SDK for C++
ParameterConstraints.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 CloudFormation
31 {
32 namespace Model
33 {
34 
41  {
42  public:
45  ParameterConstraints& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::Vector<Aws::String>& GetAllowedValues() const{ return m_allowedValues; }
54 
58  inline void SetAllowedValues(const Aws::Vector<Aws::String>& value) { m_allowedValuesHasBeenSet = true; m_allowedValues = value; }
59 
63  inline void SetAllowedValues(Aws::Vector<Aws::String>&& value) { m_allowedValuesHasBeenSet = true; m_allowedValues = value; }
64 
68  inline ParameterConstraints& WithAllowedValues(const Aws::Vector<Aws::String>& value) { SetAllowedValues(value); return *this;}
69 
73  inline ParameterConstraints& WithAllowedValues(Aws::Vector<Aws::String>&& value) { SetAllowedValues(value); return *this;}
74 
78  inline ParameterConstraints& AddAllowedValues(const Aws::String& value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; }
79 
83  inline ParameterConstraints& AddAllowedValues(Aws::String&& value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; }
84 
88  inline ParameterConstraints& AddAllowedValues(const char* value) { m_allowedValuesHasBeenSet = true; m_allowedValues.push_back(value); return *this; }
89 
90  private:
91  Aws::Vector<Aws::String> m_allowedValues;
92  bool m_allowedValuesHasBeenSet;
93  };
94 
95 } // namespace Model
96 } // namespace CloudFormation
97 } // namespace Aws
ParameterConstraints & AddAllowedValues(const char *value)
ParameterConstraints & WithAllowedValues(Aws::Vector< Aws::String > &&value)
ParameterConstraints & WithAllowedValues(const Aws::Vector< Aws::String > &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetAllowedValues(const Aws::Vector< Aws::String > &value)
void SetAllowedValues(Aws::Vector< Aws::String > &&value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
const Aws::Vector< Aws::String > & GetAllowedValues() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_CLOUDFORMATION_API
ParameterConstraints & AddAllowedValues(Aws::String &&value)
ParameterConstraints & AddAllowedValues(const Aws::String &value)
JSON (JavaScript Object Notation).