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