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/s3-crt/model/MetricsConfiguration.h> 11 #include <aws/core/utils/memory/stl/AWSMap.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Http 17 { 18 class URI; 19 } //namespace Http 20 namespace S3Crt 21 { 22 namespace Model 23 { 24 25 /** 26 */ 27 class AWS_S3CRT_API PutBucketMetricsConfigurationRequest : public S3CrtRequest 28 { 29 public: 30 PutBucketMetricsConfigurationRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "PutBucketMetricsConfiguration"; } 37 38 Aws::String SerializePayload() const override; 39 40 void AddQueryStringParameters(Aws::Http::URI& uri) const override; 41 42 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 43 44 45 /** 46 * <p>The name of the bucket for which the metrics configuration is set.</p> 47 */ GetBucket()48 inline const Aws::String& GetBucket() const{ return m_bucket; } 49 50 /** 51 * <p>The name of the bucket for which the metrics configuration is set.</p> 52 */ BucketHasBeenSet()53 inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } 54 55 /** 56 * <p>The name of the bucket for which the metrics configuration is set.</p> 57 */ SetBucket(const Aws::String & value)58 inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } 59 60 /** 61 * <p>The name of the bucket for which the metrics configuration is set.</p> 62 */ SetBucket(Aws::String && value)63 inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } 64 65 /** 66 * <p>The name of the bucket for which the metrics configuration is set.</p> 67 */ SetBucket(const char * value)68 inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } 69 70 /** 71 * <p>The name of the bucket for which the metrics configuration is set.</p> 72 */ WithBucket(const Aws::String & value)73 inline PutBucketMetricsConfigurationRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} 74 75 /** 76 * <p>The name of the bucket for which the metrics configuration is set.</p> 77 */ WithBucket(Aws::String && value)78 inline PutBucketMetricsConfigurationRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} 79 80 /** 81 * <p>The name of the bucket for which the metrics configuration is set.</p> 82 */ WithBucket(const char * value)83 inline PutBucketMetricsConfigurationRequest& WithBucket(const char* value) { SetBucket(value); return *this;} 84 85 86 /** 87 * <p>The ID used to identify the metrics configuration.</p> 88 */ GetId()89 inline const Aws::String& GetId() const{ return m_id; } 90 91 /** 92 * <p>The ID used to identify the metrics configuration.</p> 93 */ IdHasBeenSet()94 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 95 96 /** 97 * <p>The ID used to identify the metrics configuration.</p> 98 */ SetId(const Aws::String & value)99 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 100 101 /** 102 * <p>The ID used to identify the metrics configuration.</p> 103 */ SetId(Aws::String && value)104 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 105 106 /** 107 * <p>The ID used to identify the metrics configuration.</p> 108 */ SetId(const char * value)109 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 110 111 /** 112 * <p>The ID used to identify the metrics configuration.</p> 113 */ WithId(const Aws::String & value)114 inline PutBucketMetricsConfigurationRequest& WithId(const Aws::String& value) { SetId(value); return *this;} 115 116 /** 117 * <p>The ID used to identify the metrics configuration.</p> 118 */ WithId(Aws::String && value)119 inline PutBucketMetricsConfigurationRequest& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 120 121 /** 122 * <p>The ID used to identify the metrics configuration.</p> 123 */ WithId(const char * value)124 inline PutBucketMetricsConfigurationRequest& WithId(const char* value) { SetId(value); return *this;} 125 126 127 /** 128 * <p>Specifies the metrics configuration.</p> 129 */ GetMetricsConfiguration()130 inline const MetricsConfiguration& GetMetricsConfiguration() const{ return m_metricsConfiguration; } 131 132 /** 133 * <p>Specifies the metrics configuration.</p> 134 */ MetricsConfigurationHasBeenSet()135 inline bool MetricsConfigurationHasBeenSet() const { return m_metricsConfigurationHasBeenSet; } 136 137 /** 138 * <p>Specifies the metrics configuration.</p> 139 */ SetMetricsConfiguration(const MetricsConfiguration & value)140 inline void SetMetricsConfiguration(const MetricsConfiguration& value) { m_metricsConfigurationHasBeenSet = true; m_metricsConfiguration = value; } 141 142 /** 143 * <p>Specifies the metrics configuration.</p> 144 */ SetMetricsConfiguration(MetricsConfiguration && value)145 inline void SetMetricsConfiguration(MetricsConfiguration&& value) { m_metricsConfigurationHasBeenSet = true; m_metricsConfiguration = std::move(value); } 146 147 /** 148 * <p>Specifies the metrics configuration.</p> 149 */ WithMetricsConfiguration(const MetricsConfiguration & value)150 inline PutBucketMetricsConfigurationRequest& WithMetricsConfiguration(const MetricsConfiguration& value) { SetMetricsConfiguration(value); return *this;} 151 152 /** 153 * <p>Specifies the metrics configuration.</p> 154 */ WithMetricsConfiguration(MetricsConfiguration && value)155 inline PutBucketMetricsConfigurationRequest& WithMetricsConfiguration(MetricsConfiguration&& value) { SetMetricsConfiguration(std::move(value)); return *this;} 156 157 158 /** 159 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 160 * different account, the request will fail with an HTTP <code>403 (Access 161 * Denied)</code> error.</p> 162 */ GetExpectedBucketOwner()163 inline const Aws::String& GetExpectedBucketOwner() const{ return m_expectedBucketOwner; } 164 165 /** 166 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 167 * different account, the request will fail with an HTTP <code>403 (Access 168 * Denied)</code> error.</p> 169 */ ExpectedBucketOwnerHasBeenSet()170 inline bool ExpectedBucketOwnerHasBeenSet() const { return m_expectedBucketOwnerHasBeenSet; } 171 172 /** 173 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 174 * different account, the request will fail with an HTTP <code>403 (Access 175 * Denied)</code> error.</p> 176 */ SetExpectedBucketOwner(const Aws::String & value)177 inline void SetExpectedBucketOwner(const Aws::String& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = value; } 178 179 /** 180 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 181 * different account, the request will fail with an HTTP <code>403 (Access 182 * Denied)</code> error.</p> 183 */ SetExpectedBucketOwner(Aws::String && value)184 inline void SetExpectedBucketOwner(Aws::String&& value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner = std::move(value); } 185 186 /** 187 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 188 * different account, the request will fail with an HTTP <code>403 (Access 189 * Denied)</code> error.</p> 190 */ SetExpectedBucketOwner(const char * value)191 inline void SetExpectedBucketOwner(const char* value) { m_expectedBucketOwnerHasBeenSet = true; m_expectedBucketOwner.assign(value); } 192 193 /** 194 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 195 * different account, the request will fail with an HTTP <code>403 (Access 196 * Denied)</code> error.</p> 197 */ WithExpectedBucketOwner(const Aws::String & value)198 inline PutBucketMetricsConfigurationRequest& WithExpectedBucketOwner(const Aws::String& value) { SetExpectedBucketOwner(value); return *this;} 199 200 /** 201 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 202 * different account, the request will fail with an HTTP <code>403 (Access 203 * Denied)</code> error.</p> 204 */ WithExpectedBucketOwner(Aws::String && value)205 inline PutBucketMetricsConfigurationRequest& WithExpectedBucketOwner(Aws::String&& value) { SetExpectedBucketOwner(std::move(value)); return *this;} 206 207 /** 208 * <p>The account ID of the expected bucket owner. If the bucket is owned by a 209 * different account, the request will fail with an HTTP <code>403 (Access 210 * Denied)</code> error.</p> 211 */ WithExpectedBucketOwner(const char * value)212 inline PutBucketMetricsConfigurationRequest& WithExpectedBucketOwner(const char* value) { SetExpectedBucketOwner(value); return *this;} 213 214 215 GetCustomizedAccessLogTag()216 inline const Aws::Map<Aws::String, Aws::String>& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } 217 218 CustomizedAccessLogTagHasBeenSet()219 inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } 220 221 SetCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)222 inline void SetCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } 223 224 SetCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)225 inline void SetCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } 226 227 WithCustomizedAccessLogTag(const Aws::Map<Aws::String,Aws::String> & value)228 inline PutBucketMetricsConfigurationRequest& WithCustomizedAccessLogTag(const Aws::Map<Aws::String, Aws::String>& value) { SetCustomizedAccessLogTag(value); return *this;} 229 230 WithCustomizedAccessLogTag(Aws::Map<Aws::String,Aws::String> && value)231 inline PutBucketMetricsConfigurationRequest& WithCustomizedAccessLogTag(Aws::Map<Aws::String, Aws::String>&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} 232 233 AddCustomizedAccessLogTag(const Aws::String & key,const Aws::String & value)234 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 235 236 AddCustomizedAccessLogTag(Aws::String && key,const Aws::String & value)237 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 238 239 AddCustomizedAccessLogTag(const Aws::String & key,Aws::String && value)240 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 241 242 AddCustomizedAccessLogTag(Aws::String && key,Aws::String && value)243 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } 244 245 AddCustomizedAccessLogTag(const char * key,Aws::String && value)246 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } 247 248 AddCustomizedAccessLogTag(Aws::String && key,const char * value)249 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } 250 251 AddCustomizedAccessLogTag(const char * key,const char * value)252 inline PutBucketMetricsConfigurationRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } 253 254 private: 255 256 Aws::String m_bucket; 257 bool m_bucketHasBeenSet; 258 259 Aws::String m_id; 260 bool m_idHasBeenSet; 261 262 MetricsConfiguration m_metricsConfiguration; 263 bool m_metricsConfigurationHasBeenSet; 264 265 Aws::String m_expectedBucketOwner; 266 bool m_expectedBucketOwnerHasBeenSet; 267 268 Aws::Map<Aws::String, Aws::String> m_customizedAccessLogTag; 269 bool m_customizedAccessLogTagHasBeenSet; 270 }; 271 272 } // namespace Model 273 } // namespace S3Crt 274 } // namespace Aws 275