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-crt/S3Crt_EXPORTS.h> 8 #include <aws/s3-crt/S3CrtRequest.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 S3Crt 20 { 21 namespace Model 22 { 23 24 /** 25 */ 26 class AWS_S3CRT_API GetBucketLocationRequest : public S3CrtRequest 27 { 28 public: 29 GetBucketLocationRequest(); 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 "GetBucketLocation"; } 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 name of the bucket for which to get the location.</p> 46 */ GetBucket()47 inline const Aws::String& GetBucket() const{ return m_bucket; } 48 49 /** 50 * <p>The name of the bucket for which to get the location.</p> 51 */ BucketHasBeenSet()52 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } 53 54 /** 55 * <p>The name of the bucket for which to get the location.</p> 56 */ SetBucket(const Aws::String & value)57 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } 58 59 /** 60 * <p>The name of the bucket for which to get the location.</p> 61 */ SetBucket(Aws::String && value)62 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } 63 64 /** 65 * <p>The name of the bucket for which to get the location.</p> 66 */ SetBucket(const char * value)67 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } 68 69 /** 70 * <p>The name of the bucket for which to get the location.</p> 71 */ WithBucket(const Aws::String & value)72 inline GetBucketLocationRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} 73 74 /** 75 * <p>The name of the bucket for which to get the location.</p> 76 */ WithBucket(Aws::String && value)77 inline GetBucketLocationRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} 78 79 /** 80 * <p>The name of the bucket for which to get the location.</p> 81 */ WithBucket(const char * value)82 inline GetBucketLocationRequest& WithBucket(const char* value) { SetBucket(value); return *this;} 83 84 85 /** 86 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 87 * different account, the request will fail with an HTTP <code>403 (Access 88 * Denied)</code> error.</p> 89 */ GetExpectedBucketOwner()90 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; } 91 92 /** 93 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 94 * different account, the request will fail with an HTTP <code>403 (Access 95 * Denied)</code> error.</p> 96 */ ExpectedBucketOwnerHasBeenSet()97 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; } 98 99 /** 100 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 101 * different account, the request will fail with an HTTP <code>403 (Access 102 * Denied)</code> error.</p> 103 */ SetExpectedBucketOwner(const Aws::String & value)104 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; } 105 106 /** 107 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 108 * different account, the request will fail with an HTTP <code>403 (Access 109 * Denied)</code> error.</p> 110 */ SetExpectedBucketOwner(Aws::String && value)111 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); } 112 113 /** 114 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 115 * different account, the request will fail with an HTTP <code>403 (Access 116 * Denied)</code> error.</p> 117 */ SetExpectedBucketOwner(const char * value)118 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); } 119 120 /** 121 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 122 * different account, the request will fail with an HTTP <code>403 (Access 123 * Denied)</code> error.</p> 124 */ WithExpectedBucketOwner(const Aws::String & value)125 inline GetBucketLocationRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;} 126 127 /** 128 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 129 * different account, the request will fail with an HTTP <code>403 (Access 130 * Denied)</code> error.</p> 131 */ WithExpectedBucketOwner(Aws::String && value)132 inline GetBucketLocationRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;} 133 134 /** 135 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 136 * different account, the request will fail with an HTTP <code>403 (Access 137 * Denied)</code> error.</p> 138 */ WithExpectedBucketOwner(const char * value)139 inline GetBucketLocationRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;} 140 141 142 GetCustomizedAccessLogTag()143 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } 144 145 CustomizedAccessLogTagHasBeenSet()146 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } 147 148 SetCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)149 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } 150 151 SetCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)152 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } 153 154 WithCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)155 inline GetBucketLocationRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;} 156 157 WithCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)158 inline GetBucketLocationRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} 159 160 AddCustomizedAccessLogTag(const Aws::String & key,const Aws::String & value)161 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 162 163 AddCustomizedAccessLogTag(Aws::String && key,const Aws::String & value)164 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 165 166 AddCustomizedAccessLogTag(const Aws::String & key,Aws::String && value)167 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 168 169 AddCustomizedAccessLogTag(Aws::String && key,Aws::String && value)170 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } 171 172 AddCustomizedAccessLogTag(const char * key,Aws::String && value)173 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 174 175 AddCustomizedAccessLogTag(Aws::String && key,const char * value)176 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 177 178 AddCustomizedAccessLogTag(const char * key,const char * value)179 inline GetBucketLocationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 180 181 private: 182 183 Aws::String m_bucket; 184 bool m_bucketHasBeenSet; 185 186 Aws::String m_expectedBucketOwner; 187 bool m_expectedBucketOwnerHasBeenSet; 188 189 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag; 190 bool m_customizedAccessLogTagHasBeenSet; 191 }; 192 193 } // namespace Model 194 } // namespace S3Crt 195 } // namespace Aws 196