1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/lightsail/Lightsail_EXPORTS.h> 8 #include <aws/lightsail/LightsailRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/lightsail/model/ResourceBucketAccess.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Lightsail 16 { 17 namespace Model 18 { 19 20 /** 21 */ 22 class AWS_LIGHTSAIL_API SetResourceAccessForBucketRequest : public LightsailRequest 23 { 24 public: 25 SetResourceAccessForBucketRequest(); 26 27 // Service request name is the Operation name which will send this request out, 28 // each operation should has unique request name, so that we can get operation's name from this request. 29 // Note: this is not true for response, multiple operations may have the same response name, 30 // so we can not get operation's name from response. GetServiceRequestName()31 inline virtual const char* GetServiceRequestName() const override { return "SetResourceAccessForBucket"; } 32 33 Aws::String SerializePayload() const override; 34 35 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 36 37 38 /** 39 * <p>The name of the Lightsail instance for which to set bucket access. The 40 * instance must be in a running or stopped state.</p> 41 */ GetResourceName()42 inline const Aws::String& GetResourceName() const{ return m_resourceName; } 43 44 /** 45 * <p>The name of the Lightsail instance for which to set bucket access. The 46 * instance must be in a running or stopped state.</p> 47 */ ResourceNameHasBeenSet()48 inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; } 49 50 /** 51 * <p>The name of the Lightsail instance for which to set bucket access. The 52 * instance must be in a running or stopped state.</p> 53 */ SetResourceName(const Aws::String & value)54 inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; } 55 56 /** 57 * <p>The name of the Lightsail instance for which to set bucket access. The 58 * instance must be in a running or stopped state.</p> 59 */ SetResourceName(Aws::String && value)60 inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = std::move(value); } 61 62 /** 63 * <p>The name of the Lightsail instance for which to set bucket access. The 64 * instance must be in a running or stopped state.</p> 65 */ SetResourceName(const char * value)66 inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); } 67 68 /** 69 * <p>The name of the Lightsail instance for which to set bucket access. The 70 * instance must be in a running or stopped state.</p> 71 */ WithResourceName(const Aws::String & value)72 inline SetResourceAccessForBucketRequest& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;} 73 74 /** 75 * <p>The name of the Lightsail instance for which to set bucket access. The 76 * instance must be in a running or stopped state.</p> 77 */ WithResourceName(Aws::String && value)78 inline SetResourceAccessForBucketRequest& WithResourceName(Aws::String&& value) { SetResourceName(std::move(value)); return *this;} 79 80 /** 81 * <p>The name of the Lightsail instance for which to set bucket access. The 82 * instance must be in a running or stopped state.</p> 83 */ WithResourceName(const char * value)84 inline SetResourceAccessForBucketRequest& WithResourceName(const char* value) { SetResourceName(value); return *this;} 85 86 87 /** 88 * <p>The name of the bucket for which to set access to another Lightsail 89 * resource.</p> 90 */ GetBucketName()91 inline const Aws::String& GetBucketName() const{ return m_bucketName; } 92 93 /** 94 * <p>The name of the bucket for which to set access to another Lightsail 95 * resource.</p> 96 */ BucketNameHasBeenSet()97 inline bool BucketNameHasBeenSet() const { return m_bucketNameHasBeenSet; } 98 99 /** 100 * <p>The name of the bucket for which to set access to another Lightsail 101 * resource.</p> 102 */ SetBucketName(const Aws::String & value)103 inline void SetBucketName(const Aws::String& value) { m_bucketNameHasBeenSet = true; m_bucketName = value; } 104 105 /** 106 * <p>The name of the bucket for which to set access to another Lightsail 107 * resource.</p> 108 */ SetBucketName(Aws::String && value)109 inline void SetBucketName(Aws::String&& value) { m_bucketNameHasBeenSet = true; m_bucketName = std::move(value); } 110 111 /** 112 * <p>The name of the bucket for which to set access to another Lightsail 113 * resource.</p> 114 */ SetBucketName(const char * value)115 inline void SetBucketName(const char* value) { m_bucketNameHasBeenSet = true; m_bucketName.assign(value); } 116 117 /** 118 * <p>The name of the bucket for which to set access to another Lightsail 119 * resource.</p> 120 */ WithBucketName(const Aws::String & value)121 inline SetResourceAccessForBucketRequest& WithBucketName(const Aws::String& value) { SetBucketName(value); return *this;} 122 123 /** 124 * <p>The name of the bucket for which to set access to another Lightsail 125 * resource.</p> 126 */ WithBucketName(Aws::String && value)127 inline SetResourceAccessForBucketRequest& WithBucketName(Aws::String&& value) { SetBucketName(std::move(value)); return *this;} 128 129 /** 130 * <p>The name of the bucket for which to set access to another Lightsail 131 * resource.</p> 132 */ WithBucketName(const char * value)133 inline SetResourceAccessForBucketRequest& WithBucketName(const char* value) { SetBucketName(value); return *this;} 134 135 136 /** 137 * <p>The access setting.</p> <p>The following access settings are available:</p> 138 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 139 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 140 * its objects. Use this setting to remove access for a resource previously set to 141 * <code>allow</code>.</p> </li> </ul> 142 */ GetAccess()143 inline const ResourceBucketAccess& GetAccess() const{ return m_access; } 144 145 /** 146 * <p>The access setting.</p> <p>The following access settings are available:</p> 147 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 148 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 149 * its objects. Use this setting to remove access for a resource previously set to 150 * <code>allow</code>.</p> </li> </ul> 151 */ AccessHasBeenSet()152 inline bool AccessHasBeenSet() const { return m_accessHasBeenSet; } 153 154 /** 155 * <p>The access setting.</p> <p>The following access settings are available:</p> 156 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 157 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 158 * its objects. Use this setting to remove access for a resource previously set to 159 * <code>allow</code>.</p> </li> </ul> 160 */ SetAccess(const ResourceBucketAccess & value)161 inline void SetAccess(const ResourceBucketAccess& value) { m_accessHasBeenSet = true; m_access = value; } 162 163 /** 164 * <p>The access setting.</p> <p>The following access settings are available:</p> 165 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 166 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 167 * its objects. Use this setting to remove access for a resource previously set to 168 * <code>allow</code>.</p> </li> </ul> 169 */ SetAccess(ResourceBucketAccess && value)170 inline void SetAccess(ResourceBucketAccess&& value) { m_accessHasBeenSet = true; m_access = std::move(value); } 171 172 /** 173 * <p>The access setting.</p> <p>The following access settings are available:</p> 174 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 175 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 176 * its objects. Use this setting to remove access for a resource previously set to 177 * <code>allow</code>.</p> </li> </ul> 178 */ WithAccess(const ResourceBucketAccess & value)179 inline SetResourceAccessForBucketRequest& WithAccess(const ResourceBucketAccess& value) { SetAccess(value); return *this;} 180 181 /** 182 * <p>The access setting.</p> <p>The following access settings are available:</p> 183 * <ul> <li> <p> <code>allow</code> - Allows access to the bucket and its 184 * objects.</p> </li> <li> <p> <code>deny</code> - Denies access to the bucket and 185 * its objects. Use this setting to remove access for a resource previously set to 186 * <code>allow</code>.</p> </li> </ul> 187 */ WithAccess(ResourceBucketAccess && value)188 inline SetResourceAccessForBucketRequest& WithAccess(ResourceBucketAccess&& value) { SetAccess(std::move(value)); return *this;} 189 190 private: 191 192 Aws::String m_resourceName; 193 bool m_resourceNameHasBeenSet; 194 195 Aws::String m_bucketName; 196 bool m_bucketNameHasBeenSet; 197 198 ResourceBucketAccess m_access; 199 bool m_accessHasBeenSet; 200 }; 201 202 } // namespace Model 203 } // namespace Lightsail 204 } // namespace Aws 205