AWS SDK for C++  0.14.3
AWS SDK for C++
TaggedResource.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
18 #include <aws/redshift/model/Tag.h>
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace Redshift
31 {
32 namespace Model
33 {
34 
39  {
40  public:
43  TaggedResource& 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 Tag& GetTag() const{ return m_tag; }
52 
56  inline void SetTag(const Tag& value) { m_tagHasBeenSet = true; m_tag = value; }
57 
61  inline void SetTag(Tag&& value) { m_tagHasBeenSet = true; m_tag = value; }
62 
66  inline TaggedResource& WithTag(const Tag& value) { SetTag(value); return *this;}
67 
71  inline TaggedResource& WithTag(Tag&& value) { SetTag(value); return *this;}
72 
77  inline const Aws::String& GetResourceName() const{ return m_resourceName; }
78 
83  inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; }
84 
89  inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; }
90 
95  inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); }
96 
101  inline TaggedResource& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;}
102 
107  inline TaggedResource& WithResourceName(Aws::String&& value) { SetResourceName(value); return *this;}
108 
113  inline TaggedResource& WithResourceName(const char* value) { SetResourceName(value); return *this;}
114 
126  inline const Aws::String& GetResourceType() const{ return m_resourceType; }
127 
139  inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
140 
152  inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
153 
165  inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); }
166 
178  inline TaggedResource& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;}
179 
191  inline TaggedResource& WithResourceType(Aws::String&& value) { SetResourceType(value); return *this;}
192 
204  inline TaggedResource& WithResourceType(const char* value) { SetResourceType(value); return *this;}
205 
206  private:
207  Tag m_tag;
208  bool m_tagHasBeenSet;
209  Aws::String m_resourceName;
210  bool m_resourceNameHasBeenSet;
211  Aws::String m_resourceType;
212  bool m_resourceTypeHasBeenSet;
213  };
214 
215 } // namespace Model
216 } // namespace Redshift
217 } // namespace Aws
const Aws::String & GetResourceType() const
TaggedResource & WithResourceType(Aws::String &&value)
TaggedResource & WithResourceName(Aws::String &&value)
void SetResourceName(const Aws::String &value)
void SetResourceType(const char *value)
TaggedResource & WithResourceType(const Aws::String &value)
TaggedResource & WithResourceType(const char *value)
const Aws::String & GetResourceName() const
#define AWS_REDSHIFT_API
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetResourceType(const Aws::String &value)
TaggedResource & WithResourceName(const char *value)
TaggedResource & WithResourceName(const Aws::String &value)
void SetResourceName(const char *value)
void SetResourceType(Aws::String &&value)
TaggedResource & WithTag(Tag &&value)
void SetResourceName(Aws::String &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
TaggedResource & WithTag(const Tag &value)
JSON (JavaScript Object Notation).