AWS SDK for C++  0.14.3
AWS SDK for C++
AttachedPolicy.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/iam/IAM_EXPORTS.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace IAM
30 {
31 namespace Model
32 {
33 
45  {
46  public:
49  AttachedPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
50 
51  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
52  void OutputToStream(Aws::OStream& oStream, const char* location) const;
53 
57  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
58 
62  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
63 
67  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
68 
72  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
73 
77  inline AttachedPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
78 
82  inline AttachedPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(value); return *this;}
83 
87  inline AttachedPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
88 
89 
90  inline const Aws::String& GetPolicyArn() const{ return m_policyArn; }
91 
92 
93  inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; }
94 
95 
96  inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = value; }
97 
98 
99  inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); }
100 
101 
102  inline AttachedPolicy& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;}
103 
104 
105  inline AttachedPolicy& WithPolicyArn(Aws::String&& value) { SetPolicyArn(value); return *this;}
106 
107 
108  inline AttachedPolicy& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;}
109 
110  private:
111  Aws::String m_policyName;
112  bool m_policyNameHasBeenSet;
113  Aws::String m_policyArn;
114  bool m_policyArnHasBeenSet;
115  };
116 
117 } // namespace Model
118 } // namespace IAM
119 } // namespace Aws
AttachedPolicy & WithPolicyArn(Aws::String &&value)
const Aws::String & GetPolicyArn() const
AttachedPolicy & WithPolicyName(const Aws::String &value)
void SetPolicyArn(Aws::String &&value)
void SetPolicyArn(const Aws::String &value)
AttachedPolicy & WithPolicyName(const char *value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
AttachedPolicy & WithPolicyArn(const char *value)
void SetPolicyName(const char *value)
AttachedPolicy & WithPolicyArn(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetPolicyName(const Aws::String &value)
void SetPolicyArn(const char *value)
#define AWS_IAM_API
Definition: IAM_EXPORTS.h:37
AttachedPolicy & WithPolicyName(Aws::String &&value)
void SetPolicyName(Aws::String &&value)
const Aws::String & GetPolicyName() const
JSON (JavaScript Object Notation).