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/s3/S3_EXPORTS.h> 8 #include <aws/s3/S3Request.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSMap.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Http 16 { 17 class URI; 18 } //namespace Http 19 namespace S3 20 { 21 namespace Model 22 { 23 24 /** 25 */ 26 class AWS_S3_API GetObjectLockConfigurationRequest : public S3Request 27 { 28 public: 29 GetObjectLockConfigurationRequest(); 30 31 // Service request name is the Operation name which will send this request out, 32 // each operation should has unique request name, so that we can get operation's name from this request. 33 // Note: this is not true for response, multiple operations may have the same response name, 34 // so we can not get operation's name from response. GetServiceRequestName()35 inline virtual const char* GetServiceRequestName() const override { return "GetObjectLockConfiguration"; } 36 37 Aws::String SerializePayload() const override; 38 39 void AddQueryStringParameters(Aws::Http::URI& uri) const override; 40 41 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 42 43 44 /** 45 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 46 * using this action with an access point, you must direct requests to the access 47 * point hostname. The access point hostname takes the form 48 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 49 * When using this action with an access point through the Amazon Web Services 50 * SDKs, you provide the access point ARN in place of the bucket name. For more 51 * information about access point ARNs, see <a 52 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 53 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 54 */ GetBucket()55 inline const Aws::String& GetBucket() const{ return m_bucket; } 56 57 /** 58 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 59 * using this action with an access point, you must direct requests to the access 60 * point hostname. The access point hostname takes the form 61 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 62 * When using this action with an access point through the Amazon Web Services 63 * SDKs, you provide the access point ARN in place of the bucket name. For more 64 * information about access point ARNs, see <a 65 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 66 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 67 */ BucketHasBeenSet()68 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } 69 70 /** 71 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 72 * using this action with an access point, you must direct requests to the access 73 * point hostname. The access point hostname takes the form 74 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 75 * When using this action with an access point through the Amazon Web Services 76 * SDKs, you provide the access point ARN in place of the bucket name. For more 77 * information about access point ARNs, see <a 78 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 79 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 80 */ SetBucket(const Aws::String & value)81 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } 82 83 /** 84 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 85 * using this action with an access point, you must direct requests to the access 86 * point hostname. The access point hostname takes the form 87 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 88 * When using this action with an access point through the Amazon Web Services 89 * SDKs, you provide the access point ARN in place of the bucket name. For more 90 * information about access point ARNs, see <a 91 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 92 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 93 */ SetBucket(Aws::String && value)94 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } 95 96 /** 97 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 98 * using this action with an access point, you must direct requests to the access 99 * point hostname. The access point hostname takes the form 100 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 101 * When using this action with an access point through the Amazon Web Services 102 * SDKs, you provide the access point ARN in place of the bucket name. For more 103 * information about access point ARNs, see <a 104 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 105 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 106 */ SetBucket(const char * value)107 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } 108 109 /** 110 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 111 * using this action with an access point, you must direct requests to the access 112 * point hostname. The access point hostname takes the form 113 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 114 * When using this action with an access point through the Amazon Web Services 115 * SDKs, you provide the access point ARN in place of the bucket name. For more 116 * information about access point ARNs, see <a 117 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 118 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 119 */ WithBucket(const Aws::String & value)120 inline GetObjectLockConfigurationRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} 121 122 /** 123 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 124 * using this action with an access point, you must direct requests to the access 125 * point hostname. The access point hostname takes the form 126 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 127 * When using this action with an access point through the Amazon Web Services 128 * SDKs, you provide the access point ARN in place of the bucket name. For more 129 * information about access point ARNs, see <a 130 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 131 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 132 */ WithBucket(Aws::String && value)133 inline GetObjectLockConfigurationRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} 134 135 /** 136 * <p>The bucket whose Object Lock configuration you want to retrieve.</p> <p>When 137 * using this action with an access point, you must direct requests to the access 138 * point hostname. The access point hostname takes the form 139 * <i>AccessPointName</i>-<i>AccountId</i>.s3-accesspoint.<i>Region</i>.amazonaws.com. 140 * When using this action with an access point through the Amazon Web Services 141 * SDKs, you provide the access point ARN in place of the bucket name. For more 142 * information about access point ARNs, see <a 143 * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html">Using 144 * access points</a> in the <i>Amazon S3 User Guide</i>.</p> 145 */ WithBucket(const char * value)146 inline GetObjectLockConfigurationRequest& WithBucket(const char* value) { SetBucket(value); return *this;} 147 148 149 /** 150 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 151 * different account, the request will fail with an HTTP <code>403 (Access 152 * Denied)</code> error.</p> 153 */ GetExpectedBucketOwner()154 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; } 155 156 /** 157 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 158 * different account, the request will fail with an HTTP <code>403 (Access 159 * Denied)</code> error.</p> 160 */ ExpectedBucketOwnerHasBeenSet()161 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; } 162 163 /** 164 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 165 * different account, the request will fail with an HTTP <code>403 (Access 166 * Denied)</code> error.</p> 167 */ SetExpectedBucketOwner(const Aws::String & value)168 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; } 169 170 /** 171 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 172 * different account, the request will fail with an HTTP <code>403 (Access 173 * Denied)</code> error.</p> 174 */ SetExpectedBucketOwner(Aws::String && value)175 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); } 176 177 /** 178 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 179 * different account, the request will fail with an HTTP <code>403 (Access 180 * Denied)</code> error.</p> 181 */ SetExpectedBucketOwner(const char * value)182 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); } 183 184 /** 185 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 186 * different account, the request will fail with an HTTP <code>403 (Access 187 * Denied)</code> error.</p> 188 */ WithExpectedBucketOwner(const Aws::String & value)189 inline GetObjectLockConfigurationRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;} 190 191 /** 192 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 193 * different account, the request will fail with an HTTP <code>403 (Access 194 * Denied)</code> error.</p> 195 */ WithExpectedBucketOwner(Aws::String && value)196 inline GetObjectLockConfigurationRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;} 197 198 /** 199 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 200 * different account, the request will fail with an HTTP <code>403 (Access 201 * Denied)</code> error.</p> 202 */ WithExpectedBucketOwner(const char * value)203 inline GetObjectLockConfigurationRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;} 204 205 206 GetCustomizedAccessLogTag()207 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } 208 209 CustomizedAccessLogTagHasBeenSet()210 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } 211 212 SetCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)213 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } 214 215 SetCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)216 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } 217 218 WithCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)219 inline GetObjectLockConfigurationRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;} 220 221 WithCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)222 inline GetObjectLockConfigurationRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} 223 224 AddCustomizedAccessLogTag(const Aws::String & key,const Aws::String & value)225 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 226 227 AddCustomizedAccessLogTag(Aws::String && key,const Aws::String & value)228 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 229 230 AddCustomizedAccessLogTag(const Aws::String & key,Aws::String && value)231 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 232 233 AddCustomizedAccessLogTag(Aws::String && key,Aws::String && value)234 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } 235 236 AddCustomizedAccessLogTag(const char * key,Aws::String && value)237 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 238 239 AddCustomizedAccessLogTag(Aws::String && key,const char * value)240 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 241 242 AddCustomizedAccessLogTag(const char * key,const char * value)243 inline GetObjectLockConfigurationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 244 245 private: 246 247 Aws::String m_bucket; 248 bool m_bucketHasBeenSet; 249 250 Aws::String m_expectedBucketOwner; 251 bool m_expectedBucketOwnerHasBeenSet; 252 253 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag; 254 bool m_customizedAccessLogTagHasBeenSet; 255 }; 256 257 } // namespace Model 258 } // namespace S3 259 } // namespace Aws 260