| 1 | /* |
| 2 | * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | * You may not use this file except in compliance with the License. |
| 6 | * A copy of the License is located at |
| 7 | * |
| 8 | * http://aws.amazon.com/apache2.0 |
| 9 | * |
| 10 | * or in the "license" file accompanying this file. This file is distributed |
| 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | * express or implied. See the License for the specific language governing |
| 13 | * permissions and limitations under the License. |
| 14 | */ |
| 15 | |
| 16 | #pragma once |
| 17 | #include <aws/s3/S3_EXPORTS.h> |
| 18 | #include <aws/s3/model/ServerSideEncryption.h> |
| 19 | #include <aws/core/utils/memory/stl/AWSString.h> |
| 20 | #include <aws/s3/model/RequestCharged.h> |
| 21 | #include <utility> |
| 22 | |
| 23 | namespace Aws |
| 24 | { |
| 25 | template<typename RESULT_TYPE> |
| 26 | class AmazonWebServiceResult; |
| 27 | |
| 28 | namespace Utils |
| 29 | { |
| 30 | namespace Xml |
| 31 | { |
| 32 | class XmlDocument; |
| 33 | } // namespace Xml |
| 34 | } // namespace Utils |
| 35 | namespace S3 |
| 36 | { |
| 37 | namespace Model |
| 38 | { |
| 39 | class AWS_S3_API UploadPartResult |
| 40 | { |
| 41 | public: |
| 42 | UploadPartResult(); |
| 43 | UploadPartResult(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result); |
| 44 | UploadPartResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Xml::XmlDocument>& result); |
| 45 | |
| 46 | |
| 47 | /** |
| 48 | * <p>The server-side encryption algorithm used when storing this object in Amazon |
| 49 | * S3 (for example, AES256, aws:kms).</p> |
| 50 | */ |
| 51 | inline const ServerSideEncryption& GetServerSideEncryption() const{ return m_serverSideEncryption; } |
| 52 | |
| 53 | /** |
| 54 | * <p>The server-side encryption algorithm used when storing this object in Amazon |
| 55 | * S3 (for example, AES256, aws:kms).</p> |
| 56 | */ |
| 57 | inline void SetServerSideEncryption(const ServerSideEncryption& value) { m_serverSideEncryption = value; } |
| 58 | |
| 59 | /** |
| 60 | * <p>The server-side encryption algorithm used when storing this object in Amazon |
| 61 | * S3 (for example, AES256, aws:kms).</p> |
| 62 | */ |
| 63 | inline void SetServerSideEncryption(ServerSideEncryption&& value) { m_serverSideEncryption = std::move(value); } |
| 64 | |
| 65 | /** |
| 66 | * <p>The server-side encryption algorithm used when storing this object in Amazon |
| 67 | * S3 (for example, AES256, aws:kms).</p> |
| 68 | */ |
| 69 | inline UploadPartResult& WithServerSideEncryption(const ServerSideEncryption& value) { SetServerSideEncryption(value); return *this;} |
| 70 | |
| 71 | /** |
| 72 | * <p>The server-side encryption algorithm used when storing this object in Amazon |
| 73 | * S3 (for example, AES256, aws:kms).</p> |
| 74 | */ |
| 75 | inline UploadPartResult& WithServerSideEncryption(ServerSideEncryption&& value) { SetServerSideEncryption(std::move(value)); return *this;} |
| 76 | |
| 77 | |
| 78 | /** |
| 79 | * <p>Entity tag for the uploaded object.</p> |
| 80 | */ |
| 81 | inline const Aws::String& GetETag() const{ return m_eTag; } |
| 82 | |
| 83 | /** |
| 84 | * <p>Entity tag for the uploaded object.</p> |
| 85 | */ |
| 86 | inline void SetETag(const Aws::String& value) { m_eTag = value; } |
| 87 | |
| 88 | /** |
| 89 | * <p>Entity tag for the uploaded object.</p> |
| 90 | */ |
| 91 | inline void SetETag(Aws::String&& value) { m_eTag = std::move(value); } |
| 92 | |
| 93 | /** |
| 94 | * <p>Entity tag for the uploaded object.</p> |
| 95 | */ |
| 96 | inline void SetETag(const char* value) { m_eTag.assign(value); } |
| 97 | |
| 98 | /** |
| 99 | * <p>Entity tag for the uploaded object.</p> |
| 100 | */ |
| 101 | inline UploadPartResult& WithETag(const Aws::String& value) { SetETag(value); return *this;} |
| 102 | |
| 103 | /** |
| 104 | * <p>Entity tag for the uploaded object.</p> |
| 105 | */ |
| 106 | inline UploadPartResult& WithETag(Aws::String&& value) { SetETag(std::move(value)); return *this;} |
| 107 | |
| 108 | /** |
| 109 | * <p>Entity tag for the uploaded object.</p> |
| 110 | */ |
| 111 | inline UploadPartResult& WithETag(const char* value) { SetETag(value); return *this;} |
| 112 | |
| 113 | |
| 114 | /** |
| 115 | * <p>If server-side encryption with a customer-provided encryption key was |
| 116 | * requested, the response will include this header confirming the encryption |
| 117 | * algorithm used.</p> |
| 118 | */ |
| 119 | inline const Aws::String& GetSSECustomerAlgorithm() const{ return m_sSECustomerAlgorithm; } |
| 120 | |
| 121 | /** |
| 122 | * <p>If server-side encryption with a customer-provided encryption key was |
| 123 | * requested, the response will include this header confirming the encryption |
| 124 | * algorithm used.</p> |
| 125 | */ |
| 126 | inline void SetSSECustomerAlgorithm(const Aws::String& value) { m_sSECustomerAlgorithm = value; } |
| 127 | |
| 128 | /** |
| 129 | * <p>If server-side encryption with a customer-provided encryption key was |
| 130 | * requested, the response will include this header confirming the encryption |
| 131 | * algorithm used.</p> |
| 132 | */ |
| 133 | inline void SetSSECustomerAlgorithm(Aws::String&& value) { m_sSECustomerAlgorithm = std::move(value); } |
| 134 | |
| 135 | /** |
| 136 | * <p>If server-side encryption with a customer-provided encryption key was |
| 137 | * requested, the response will include this header confirming the encryption |
| 138 | * algorithm used.</p> |
| 139 | */ |
| 140 | inline void SetSSECustomerAlgorithm(const char* value) { m_sSECustomerAlgorithm.assign(value); } |
| 141 | |
| 142 | /** |
| 143 | * <p>If server-side encryption with a customer-provided encryption key was |
| 144 | * requested, the response will include this header confirming the encryption |
| 145 | * algorithm used.</p> |
| 146 | */ |
| 147 | inline UploadPartResult& WithSSECustomerAlgorithm(const Aws::String& value) { SetSSECustomerAlgorithm(value); return *this;} |
| 148 | |
| 149 | /** |
| 150 | * <p>If server-side encryption with a customer-provided encryption key was |
| 151 | * requested, the response will include this header confirming the encryption |
| 152 | * algorithm used.</p> |
| 153 | */ |
| 154 | inline UploadPartResult& WithSSECustomerAlgorithm(Aws::String&& value) { SetSSECustomerAlgorithm(std::move(value)); return *this;} |
| 155 | |
| 156 | /** |
| 157 | * <p>If server-side encryption with a customer-provided encryption key was |
| 158 | * requested, the response will include this header confirming the encryption |
| 159 | * algorithm used.</p> |
| 160 | */ |
| 161 | inline UploadPartResult& WithSSECustomerAlgorithm(const char* value) { SetSSECustomerAlgorithm(value); return *this;} |
| 162 | |
| 163 | |
| 164 | /** |
| 165 | * <p>If server-side encryption with a customer-provided encryption key was |
| 166 | * requested, the response will include this header to provide round-trip message |
| 167 | * integrity verification of the customer-provided encryption key.</p> |
| 168 | */ |
| 169 | inline const Aws::String& GetSSECustomerKeyMD5() const{ return m_sSECustomerKeyMD5; } |
| 170 | |
| 171 | /** |
| 172 | * <p>If server-side encryption with a customer-provided encryption key was |
| 173 | * requested, the response will include this header to provide round-trip message |
| 174 | * integrity verification of the customer-provided encryption key.</p> |
| 175 | */ |
| 176 | inline void SetSSECustomerKeyMD5(const Aws::String& value) { m_sSECustomerKeyMD5 = value; } |
| 177 | |
| 178 | /** |
| 179 | * <p>If server-side encryption with a customer-provided encryption key was |
| 180 | * requested, the response will include this header to provide round-trip message |
| 181 | * integrity verification of the customer-provided encryption key.</p> |
| 182 | */ |
| 183 | inline void SetSSECustomerKeyMD5(Aws::String&& value) { m_sSECustomerKeyMD5 = std::move(value); } |
| 184 | |
| 185 | /** |
| 186 | * <p>If server-side encryption with a customer-provided encryption key was |
| 187 | * requested, the response will include this header to provide round-trip message |
| 188 | * integrity verification of the customer-provided encryption key.</p> |
| 189 | */ |
| 190 | inline void SetSSECustomerKeyMD5(const char* value) { m_sSECustomerKeyMD5.assign(value); } |
| 191 | |
| 192 | /** |
| 193 | * <p>If server-side encryption with a customer-provided encryption key was |
| 194 | * requested, the response will include this header to provide round-trip message |
| 195 | * integrity verification of the customer-provided encryption key.</p> |
| 196 | */ |
| 197 | inline UploadPartResult& WithSSECustomerKeyMD5(const Aws::String& value) { SetSSECustomerKeyMD5(value); return *this;} |
| 198 | |
| 199 | /** |
| 200 | * <p>If server-side encryption with a customer-provided encryption key was |
| 201 | * requested, the response will include this header to provide round-trip message |
| 202 | * integrity verification of the customer-provided encryption key.</p> |
| 203 | */ |
| 204 | inline UploadPartResult& WithSSECustomerKeyMD5(Aws::String&& value) { SetSSECustomerKeyMD5(std::move(value)); return *this;} |
| 205 | |
| 206 | /** |
| 207 | * <p>If server-side encryption with a customer-provided encryption key was |
| 208 | * requested, the response will include this header to provide round-trip message |
| 209 | * integrity verification of the customer-provided encryption key.</p> |
| 210 | */ |
| 211 | inline UploadPartResult& WithSSECustomerKeyMD5(const char* value) { SetSSECustomerKeyMD5(value); return *this;} |
| 212 | |
| 213 | |
| 214 | /** |
| 215 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 216 | * customer master key (CMK) was used for the object.</p> |
| 217 | */ |
| 218 | inline const Aws::String& GetSSEKMSKeyId() const{ return m_sSEKMSKeyId; } |
| 219 | |
| 220 | /** |
| 221 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 222 | * customer master key (CMK) was used for the object.</p> |
| 223 | */ |
| 224 | inline void SetSSEKMSKeyId(const Aws::String& value) { m_sSEKMSKeyId = value; } |
| 225 | |
| 226 | /** |
| 227 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 228 | * customer master key (CMK) was used for the object.</p> |
| 229 | */ |
| 230 | inline void SetSSEKMSKeyId(Aws::String&& value) { m_sSEKMSKeyId = std::move(value); } |
| 231 | |
| 232 | /** |
| 233 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 234 | * customer master key (CMK) was used for the object.</p> |
| 235 | */ |
| 236 | inline void SetSSEKMSKeyId(const char* value) { m_sSEKMSKeyId.assign(value); } |
| 237 | |
| 238 | /** |
| 239 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 240 | * customer master key (CMK) was used for the object.</p> |
| 241 | */ |
| 242 | inline UploadPartResult& WithSSEKMSKeyId(const Aws::String& value) { SetSSEKMSKeyId(value); return *this;} |
| 243 | |
| 244 | /** |
| 245 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 246 | * customer master key (CMK) was used for the object.</p> |
| 247 | */ |
| 248 | inline UploadPartResult& WithSSEKMSKeyId(Aws::String&& value) { SetSSEKMSKeyId(std::move(value)); return *this;} |
| 249 | |
| 250 | /** |
| 251 | * <p>If present, specifies the ID of the AWS Key Management Service (AWS KMS) |
| 252 | * customer master key (CMK) was used for the object.</p> |
| 253 | */ |
| 254 | inline UploadPartResult& WithSSEKMSKeyId(const char* value) { SetSSEKMSKeyId(value); return *this;} |
| 255 | |
| 256 | |
| 257 | |
| 258 | inline const RequestCharged& GetRequestCharged() const{ return m_requestCharged; } |
| 259 | |
| 260 | |
| 261 | inline void SetRequestCharged(const RequestCharged& value) { m_requestCharged = value; } |
| 262 | |
| 263 | |
| 264 | inline void SetRequestCharged(RequestCharged&& value) { m_requestCharged = std::move(value); } |
| 265 | |
| 266 | |
| 267 | inline UploadPartResult& WithRequestCharged(const RequestCharged& value) { SetRequestCharged(value); return *this;} |
| 268 | |
| 269 | |
| 270 | inline UploadPartResult& WithRequestCharged(RequestCharged&& value) { SetRequestCharged(std::move(value)); return *this;} |
| 271 | |
| 272 | private: |
| 273 | |
| 274 | ServerSideEncryption m_serverSideEncryption; |
| 275 | |
| 276 | Aws::String m_eTag; |
| 277 | |
| 278 | Aws::String m_sSECustomerAlgorithm; |
| 279 | |
| 280 | Aws::String m_sSECustomerKeyMD5; |
| 281 | |
| 282 | Aws::String m_sSEKMSKeyId; |
| 283 | |
| 284 | RequestCharged m_requestCharged; |
| 285 | }; |
| 286 | |
| 287 | } // namespace Model |
| 288 | } // namespace S3 |
| 289 | } // namespace Aws |
| 290 | |