From 8baad1471aa9bfb0831a4c28595d116b065473cc Mon Sep 17 00:00:00 2001 From: Peter Song Date: Tue, 9 Dec 2025 20:48:10 -0800 Subject: [PATCH] Generate DeleteObjects stack-info: PR: https://github.com/aws/aws-sdk-net/pull/4240, branch: peterrsongg/petesong/phase-3-pr6/2 --- .../ServiceClientGeneratorLib/ServiceModel.cs | 3 +- .../ServiceModels/s3/s3.customizations.json | 78 +- .../Services/S3/Custom/Model/DeleteError.cs | 1519 +--------------- .../S3/Custom/Model/DeleteObjectsRequest.cs | 383 +--- .../S3/Custom/Model/DeleteObjectsResponse.cs | 69 +- .../Services/S3/Custom/Model/DeletedObject.cs | 109 +- .../DeleteObjectsRequestMarshaller.cs | 113 +- .../Services/S3/Custom/Model/KeyVersion.cs | 126 -- sdk/src/Services/S3/Generated/Model/Delete.cs | 92 + .../S3/Generated/Model/DeleteError.cs | 1585 +++++++++++++++++ .../Generated/Model/DeleteObjectsRequest.cs | 453 +++++ .../Generated/Model/DeleteObjectsResponse.cs | 105 ++ .../S3/Generated/Model/DeletedObject.cs | 137 ++ .../DeleteErrorUnmarshaller.cs} | 71 +- .../DeleteObjectsRequestMarshaller.cs | 160 ++ .../DeleteObjectsResponseUnmarshaller.cs | 111 +- .../DeletedObjectUnmarshaller.cs} | 70 +- .../Services/S3/Generated/Model/KeyVersion.cs | 167 ++ 18 files changed, 2932 insertions(+), 2419 deletions(-) delete mode 100644 sdk/src/Services/S3/Custom/Model/KeyVersion.cs create mode 100644 sdk/src/Services/S3/Generated/Model/Delete.cs create mode 100644 sdk/src/Services/S3/Generated/Model/DeleteError.cs create mode 100644 sdk/src/Services/S3/Generated/Model/DeleteObjectsRequest.cs create mode 100644 sdk/src/Services/S3/Generated/Model/DeleteObjectsResponse.cs create mode 100644 sdk/src/Services/S3/Generated/Model/DeletedObject.cs rename sdk/src/Services/S3/{Custom/Model/Internal/MarshallTransformations/ErrorsItemUnmarshaller.cs => Generated/Model/Internal/MarshallTransformations/DeleteErrorUnmarshaller.cs} (54%) create mode 100644 sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs rename sdk/src/Services/S3/{Custom => Generated}/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs (50%) rename sdk/src/Services/S3/{Custom/Model/Internal/MarshallTransformations/DeletedItemUnmarshaller.cs => Generated/Model/Internal/MarshallTransformations/DeletedObjectUnmarshaller.cs} (55%) create mode 100644 sdk/src/Services/S3/Generated/Model/KeyVersion.cs diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index c08f3ba91907..2c5623382cca 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -580,7 +580,8 @@ public List S3AllowListOperations new Operation(this,"UpdateBucketMetadataJournalTableConfiguration", DocumentRoot[OperationsKey]["UpdateBucketMetadataJournalTableConfiguration"]), new Operation(this, "ListMultipartUploads", DocumentRoot[OperationsKey]["ListMultipartUploads"]), new Operation(this, "CompleteMultipartUpload", DocumentRoot[OperationsKey]["CompleteMultipartUpload"]), - new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]) + new Operation(this, "DeleteObject", DocumentRoot[OperationsKey]["DeleteObject"]), + new Operation(this, "DeleteObjects", DocumentRoot[OperationsKey]["DeleteObjects"]) }; } return _s3AllowListOperations.Where(operation => operation.data != null).ToList(); diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 6d320f3b4fc3..3dc80c9e64e6 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -101,24 +101,6 @@ } ] }, - "DeleteObjectsRequest": { - "exclude": [ - "Delete" - ], - "inject": [ - { - "Objects": { - "shape": "ObjectIdentifierList", - "originalMember" : "Delete" - } - }, - { - "Quiet": { - "shape": "Quiet" - } - } - ] - }, "ReplicationDestination" : { "modify": [ { @@ -1397,6 +1379,50 @@ "DeleteMarker":{"injectXmlUnmarshallCode": ["DeleteMarkerCustomUnmarshall(context, response);"]} } ] + }, + "DeleteObjectsRequest":{ + "modify":[ + { + "MFA":{"emitPropertyName" :"MfaCodes"} + }, + { + "MfaCodes":{ + "injectXmlIsSet": ["return CustomMfaCodesIsSet();"], + "injectXmlMarshallCode" : ["MfaCodesCustomMarshall(request, publicRequest);"] + } + }, + { + "ExpectedBucketOwner":{ + "injectXmlIsSet": ["return !String.IsNullOrEmpty(this._expectedBucketOwner);"] + } + } + ] + }, + "DeleteObjectsOutput":{ + "modify":[ + { + "Deleted":{"emitPropertyName":"DeletedObjects"} + }, + { + "Errors":{"emitPropertyName":"DeleteErrors"} + } + ] + }, + "Delete":{ + "modify":[ + { + "Objects":{ + "skipXmlIsSet": true + } + } + ] + }, + "KeyVersion" : { + "modify":[ + { + "ETag":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._eTag);"]} + } + ] } }, "operationModifiers": { @@ -1557,6 +1583,12 @@ }, "MFA":{ "renameShape": "MfaCodes" + }, + "ObjectIdentifier":{ + "renameShape": "KeyVersion" + }, + "Error":{ + "renameShape": "DeleteError" } }, "overrideTreatEnumsAsString":{ @@ -1765,6 +1797,13 @@ "Marshaller": "StringUtils.FromString", "Unmarshaller": "StringUnmarshaller" } + }, + "DeleteObjectsRequest":{ + "MfaCodes":{ + "Type": "MfaCodes", + "Marshaller": "StringUtils.FromString", + "Unmarshaller": "StringUnmarshaller" + } } }, "excludeMembers":{ @@ -1845,6 +1884,9 @@ ], "CompleteMultipartUploadRequest":[ "MultipartUpload" + ], + "DeleteObjectsRequest":[ + "Delete" ] }, "excludeShapes":[ diff --git a/sdk/src/Services/S3/Custom/Model/DeleteError.cs b/sdk/src/Services/S3/Custom/Model/DeleteError.cs index 5faafdf6eee4..9d5e416b627e 100644 --- a/sdk/src/Services/S3/Custom/Model/DeleteError.cs +++ b/sdk/src/Services/S3/Custom/Model/DeleteError.cs @@ -26,1524 +26,7 @@ namespace Amazon.S3.Model #if !NETSTANDARD [Serializable] #endif - public class DeleteError + public partial class DeleteError { - - private string code; - private string key; - private string message; - private string versionId; - - /// - /// Gets and sets the property Key. - /// - /// The error key. - /// - /// - public string Key - { - get { return this.key; } - set { this.key = value; } - } - - /// - /// Gets and sets the property VersionId. - /// - /// The version ID of the error. - /// - /// - public string VersionId - { - get { return this.versionId; } - set { this.versionId = value; } - } - - /// - /// Gets and sets the property Code. - /// - /// The error code is a string that uniquely identifies an error condition. It is meant - /// to be read and understood by programs that detect and handle errors by type. The following - /// is a list of Amazon S3 error codes. For more information, see Error - /// responses. - /// - ///
    • - /// - /// Code: AccessDenied - /// - ///
    • - /// - /// Description: Access Denied - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: AccountProblem - /// - ///
    • - /// - /// Description: There is a problem with your Amazon Web Services account that - /// prevents the action from completing successfully. Contact Amazon Web Services Support - /// for further assistance. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: AllAccessDisabled - /// - ///
    • - /// - /// Description: All access to this Amazon S3 resource has been disabled. Contact - /// Amazon Web Services Support for further assistance. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: AmbiguousGrantByEmailAddress - /// - ///
    • - /// - /// Description: The email address you provided is associated with more than one - /// account. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: AuthorizationHeaderMalformed - /// - ///
    • - /// - /// Description: The authorization header you provided is invalid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// HTTP Status Code: N/A - /// - ///
    • - /// - /// Code: BadDigest - /// - ///
    • - /// - /// Description: The Content-MD5 you specified did not match what we received. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: BucketAlreadyExists - /// - ///
    • - /// - /// Description: The requested bucket name is not available. The bucket namespace - /// is shared by all users of the system. Please select a different name and try again. - /// - ///
    • - /// - /// HTTP Status Code: 409 Conflict - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: BucketAlreadyOwnedByYou - /// - ///
    • - /// - /// Description: The bucket you tried to create already exists, and you own it. - /// Amazon S3 returns this error in all Amazon Web Services Regions except in the North - /// Virginia Region. For legacy compatibility, if you re-create an existing bucket that - /// you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets - /// the bucket access control lists (ACLs). - /// - ///
    • - /// - /// Code: 409 Conflict (in all Regions except the North Virginia Region) - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: BucketNotEmpty - /// - ///
    • - /// - /// Description: The bucket you tried to delete is not empty. - /// - ///
    • - /// - /// HTTP Status Code: 409 Conflict - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: CredentialsNotSupported - /// - ///
    • - /// - /// Description: This request does not support credentials. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: CrossLocationLoggingProhibited - /// - ///
    • - /// - /// Description: Cross-location logging not allowed. Buckets in one geographic - /// location cannot log information to a bucket in another location. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: EntityTooSmall - /// - ///
    • - /// - /// Description: Your proposed upload is smaller than the minimum allowed object - /// size. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: EntityTooLarge - /// - ///
    • - /// - /// Description: Your proposed upload exceeds the maximum allowed object size. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: ExpiredToken - /// - ///
    • - /// - /// Description: The provided token has expired. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: IllegalVersioningConfigurationException - /// - ///
    • - /// - /// Description: Indicates that the versioning configuration specified in the - /// request is invalid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: IncompleteBody - /// - ///
    • - /// - /// Description: You did not provide the number of bytes specified by the Content-Length - /// HTTP header - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: IncorrectNumberOfFilesInPostRequest - /// - ///
    • - /// - /// Description: POST requires exactly one file upload per request. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InlineDataTooLarge - /// - ///
    • - /// - /// Description: Inline data exceeds the maximum allowed size. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InternalError - /// - ///
    • - /// - /// Description: We encountered an internal error. Please try again. - /// - ///
    • - /// - /// HTTP Status Code: 500 Internal Server Error - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Server - /// - ///
    • - /// - /// Code: InvalidAccessKeyId - /// - ///
    • - /// - /// Description: The Amazon Web Services access key ID you provided does not exist - /// in our records. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidAddressingHeader - /// - ///
    • - /// - /// Description: You must specify the Anonymous role. - /// - ///
    • - /// - /// HTTP Status Code: N/A - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidArgument - /// - ///
    • - /// - /// Description: Invalid Argument - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidBucketName - /// - ///
    • - /// - /// Description: The specified bucket is not valid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidBucketState - /// - ///
    • - /// - /// Description: The request is not valid with the current state of the bucket. - /// - ///
    • - /// - /// HTTP Status Code: 409 Conflict - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidDigest - /// - ///
    • - /// - /// Description: The Content-MD5 you specified is not valid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidEncryptionAlgorithmError - /// - ///
    • - /// - /// Description: The encryption request you specified is not valid. The valid - /// value is AES256. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidLocationConstraint - /// - ///
    • - /// - /// Description: The specified location constraint is not valid. For more information - /// about Regions, see How - /// to Select a Region for Your Buckets. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidObjectState - /// - ///
    • - /// - /// Description: The action is not valid for the current state of the object. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidPart - /// - ///
    • - /// - /// Description: One or more of the specified parts could not be found. The part - /// might not have been uploaded, or the specified entity tag might not have matched the - /// part's entity tag. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidPartOrder - /// - ///
    • - /// - /// Description: The list of parts was not in ascending order. Parts list must - /// be specified in order by part number. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidPayer - /// - ///
    • - /// - /// Description: All access to this object has been disabled. Please contact Amazon - /// Web Services Support for further assistance. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidPolicyDocument - /// - ///
    • - /// - /// Description: The content of the form does not meet the conditions specified - /// in the policy document. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidRange - /// - ///
    • - /// - /// Description: The requested range cannot be satisfied. - /// - ///
    • - /// - /// HTTP Status Code: 416 Requested Range Not Satisfiable - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Please use AWS4-HMAC-SHA256. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: SOAP requests must be made over an HTTPS connection. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Acceleration is not supported for buckets - /// with non-DNS compliant names. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Acceleration is not supported for buckets - /// with periods (.) in their names. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Accelerate endpoint only supports virtual - /// style requests. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Accelerate is not configured on this bucket. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Accelerate is disabled on this bucket. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Acceleration is not supported on this bucket. - /// Contact Amazon Web Services Support for more information. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidRequest - /// - ///
    • - /// - /// Description: Amazon S3 Transfer Acceleration cannot be enabled on this bucket. - /// Contact Amazon Web Services Support for more information. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// Code: N/A - /// - ///
    • - /// - /// Code: InvalidSecurity - /// - ///
    • - /// - /// Description: The provided security credentials are not valid. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidSOAPRequest - /// - ///
    • - /// - /// Description: The SOAP request body is invalid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidStorageClass - /// - ///
    • - /// - /// Description: The storage class you specified is not valid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidTargetBucketForLogging - /// - ///
    • - /// - /// Description: The target bucket for logging does not exist, is not owned by - /// you, or does not have the appropriate grants for the log-delivery group. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidToken - /// - ///
    • - /// - /// Description: The provided token is malformed or otherwise invalid. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: InvalidURI - /// - ///
    • - /// - /// Description: Couldn't parse the specified URI. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: KeyTooLongError - /// - ///
    • - /// - /// Description: Your key is too long. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MalformedACLError - /// - ///
    • - /// - /// Description: The XML you provided was not well-formed or did not validate - /// against our published schema. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MalformedPOSTRequest - /// - ///
    • - /// - /// Description: The body of your POST request is not well-formed multipart/form-data. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MalformedXML - /// - ///
    • - /// - /// Description: This happens when the user sends malformed XML (XML that doesn't - /// conform to the published XSD) for the configuration. The error message is, "The XML - /// you provided was not well-formed or did not validate against our published schema." - /// - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MaxMessageLengthExceeded - /// - ///
    • - /// - /// Description: Your request was too big. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MaxPostPreDataLengthExceededError - /// - ///
    • - /// - /// Description: Your POST request fields preceding the upload file were too large. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MetadataTooLarge - /// - ///
    • - /// - /// Description: Your metadata headers exceed the maximum allowed metadata size. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MethodNotAllowed - /// - ///
    • - /// - /// Description: The specified method is not allowed against this resource. - /// - ///
    • - /// - /// HTTP Status Code: 405 Method Not Allowed - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MissingAttachment - /// - ///
    • - /// - /// Description: A SOAP attachment was expected, but none were found. - /// - ///
    • - /// - /// HTTP Status Code: N/A - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MissingContentLength - /// - ///
    • - /// - /// Description: You must provide the Content-Length HTTP header. - /// - ///
    • - /// - /// HTTP Status Code: 411 Length Required - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MissingRequestBodyError - /// - ///
    • - /// - /// Description: This happens when the user sends an empty XML document as a request. - /// The error message is, "Request body is empty." - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MissingSecurityElement - /// - ///
    • - /// - /// Description: The SOAP 1.1 request is missing a security element. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: MissingSecurityHeader - /// - ///
    • - /// - /// Description: Your request is missing a required header. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoLoggingStatusForKey - /// - ///
    • - /// - /// Description: There is no such thing as a logging status subresource for a - /// key. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchBucket - /// - ///
    • - /// - /// Description: The specified bucket does not exist. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchBucketPolicy - /// - ///
    • - /// - /// Description: The specified bucket does not have a bucket policy. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchKey - /// - ///
    • - /// - /// Description: The specified key does not exist. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchLifecycleConfiguration - /// - ///
    • - /// - /// Description: The lifecycle configuration does not exist. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchUpload - /// - ///
    • - /// - /// Description: The specified multipart upload does not exist. The upload ID - /// might be invalid, or the multipart upload might have been aborted or completed. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NoSuchVersion - /// - ///
    • - /// - /// Description: Indicates that the version ID specified in the request does not - /// match an existing version. - /// - ///
    • - /// - /// HTTP Status Code: 404 Not Found - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: NotImplemented - /// - ///
    • - /// - /// Description: A header you provided implies functionality that is not implemented. - /// - ///
    • - /// - /// HTTP Status Code: 501 Not Implemented - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Server - /// - ///
    • - /// - /// Code: NotSignedUp - /// - ///
    • - /// - /// Description: Your account is not signed up for the Amazon S3 service. You - /// must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: OperationAborted - /// - ///
    • - /// - /// Description: A conflicting conditional action is currently in progress against - /// this resource. Try again. - /// - ///
    • - /// - /// HTTP Status Code: 409 Conflict - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: PermanentRedirect - /// - ///
    • - /// - /// Description: The bucket you are attempting to access must be addressed using - /// the specified endpoint. Send all future requests to this endpoint. - /// - ///
    • - /// - /// HTTP Status Code: 301 Moved Permanently - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: PreconditionFailed - /// - ///
    • - /// - /// Description: At least one of the preconditions you specified did not hold. - /// - ///
    • - /// - /// HTTP Status Code: 412 Precondition Failed - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: Redirect - /// - ///
    • - /// - /// Description: Temporary redirect. - /// - ///
    • - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: RestoreAlreadyInProgress - /// - ///
    • - /// - /// Description: Object restore is already in progress. - /// - ///
    • - /// - /// HTTP Status Code: 409 Conflict - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: RequestIsNotMultiPartContent - /// - ///
    • - /// - /// Description: Bucket POST must be of the enclosure-type multipart/form-data. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: RequestTimeout - /// - ///
    • - /// - /// Description: Your socket connection to the server was not read from or written - /// to within the timeout period. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: RequestTimeTooSkewed - /// - ///
    • - /// - /// Description: The difference between the request time and the server's time - /// is too large. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: RequestTorrentOfBucketError - /// - ///
    • - /// - /// Description: Requesting the torrent file of a bucket is not permitted. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: SignatureDoesNotMatch - /// - ///
    • - /// - /// Description: The request signature we calculated does not match the signature - /// you provided. Check your Amazon Web Services secret access key and signing method. - /// For more information, see REST - /// Authentication and SOAP - /// Authentication for details. - /// - ///
    • - /// - /// HTTP Status Code: 403 Forbidden - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: ServiceUnavailable - /// - ///
    • - /// - /// Description: Reduce your request rate. - /// - ///
    • - /// - /// HTTP Status Code: 503 Service Unavailable - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Server - /// - ///
    • - /// - /// Code: SlowDown - /// - ///
    • - /// - /// Description: Reduce your request rate. - /// - ///
    • - /// - /// HTTP Status Code: 503 Slow Down - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Server - /// - ///
    • - /// - /// Code: TemporaryRedirect - /// - ///
    • - /// - /// Description: You are being redirected to the bucket while DNS updates. - /// - ///
    • - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: TokenRefreshRequired - /// - ///
    • - /// - /// Description: The provided token must be refreshed. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: TooManyBuckets - /// - ///
    • - /// - /// Description: You have attempted to create more buckets than allowed. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: UnexpectedContent - /// - ///
    • - /// - /// Description: This request does not support content. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: UnresolvableGrantByEmailAddress - /// - ///
    • - /// - /// Description: The email address you provided does not match any account on - /// record. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
    • - /// - /// Code: UserKeyMustBeSpecified - /// - ///
    • - /// - /// Description: The bucket POST must contain the specified field name. If it - /// is specified, check the order of the fields. - /// - ///
    • - /// - /// HTTP Status Code: 400 Bad Request - /// - ///
    • - /// - /// SOAP Fault Code Prefix: Client - /// - ///
- ///
- public string Code - { - get { return this.code; } - set { this.code = value; } - } - - /// - /// Gets and sets the property Message. - /// - /// The error message contains a generic description of the error condition in English. - /// It is intended for a human audience. Simple programs display the message directly - /// to the end user if they encounter an error condition they don't know how or don't - /// care to handle. Sophisticated programs with more exhaustive error handling and proper - /// internationalization are more likely to ignore the error message. - /// - /// - public string Message - { - get { return this.message; } - set { this.message = value; } - } } } diff --git a/sdk/src/Services/S3/Custom/Model/DeleteObjectsRequest.cs b/sdk/src/Services/S3/Custom/Model/DeleteObjectsRequest.cs index d1f175c0fe02..532ebc53a1a1 100644 --- a/sdk/src/Services/S3/Custom/Model/DeleteObjectsRequest.cs +++ b/sdk/src/Services/S3/Custom/Model/DeleteObjectsRequest.cs @@ -23,392 +23,15 @@ namespace Amazon.S3.Model { - /// - /// Container for the parameters to the DeleteObjects operation. - /// This operation enables you to delete multiple objects from a bucket using a single - /// HTTP request. If you know the object keys that you want to delete, then this operation - /// provides a suitable alternative to sending individual delete requests, reducing per-request - /// overhead. - /// - /// - /// - /// The request can contain a list of up to 1,000 keys that you want to delete. In the - /// XML, you provide the object key names, and optionally, version IDs if you want to - /// delete a specific version of the object from a versioning-enabled bucket. For each - /// key, Amazon S3 performs a delete operation and returns the result of that delete, - /// success or failure, in the response. If the object specified in the request - /// isn't found, Amazon S3 confirms the deletion by returning the result as deleted. - /// - ///
  • - /// - /// Directory buckets - S3 Versioning isn't enabled and supported for directory - /// buckets. - /// - ///
  • - /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style - /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. - /// - ///
- /// - /// The operation supports two modes for the response: verbose and quiet. By default, - /// the operation uses verbose mode in which the response includes the result of deletion - /// of each key in your request. In quiet mode the response includes only keys where the - /// delete operation encountered an error. For a successful deletion in a quiet mode, - /// the operation does not return any information about the delete in the response body. - /// - /// - /// - /// When performing this action on an MFA Delete enabled bucket, that attempts to delete - /// any versioned objects, you must include an MFA token. If you do not provide one, the - /// entire request will fail, even if there are non-versioned objects you are trying to - /// delete. If you provide an invalid token, whether there are versioned keys in the request - /// or not, the entire Multi-Object Delete request will fail. For information about MFA - /// Delete, see MFA - /// Delete in the Amazon S3 User Guide. - /// - /// - /// - /// Directory buckets - MFA delete is not supported by directory buckets. - /// - ///
Permissions
  • - /// - /// General purpose bucket permissions - The following permissions are required - /// in your policies when your DeleteObjects request includes specific headers. - /// - ///
    • - /// - /// s3:DeleteObject - To delete an object from a bucket, you must always - /// specify the s3:DeleteObject permission. - /// - ///
    • - /// - /// s3:DeleteObjectVersion - To delete a specific version of an object - /// from a versiong-enabled bucket, you must specify the s3:DeleteObjectVersion - /// permission. - /// - ///
  • - /// - /// Directory bucket permissions - To grant access to this API operation on a - /// directory bucket, we recommend that you use the - /// CreateSession API operation for session-based authorization. Specifically, - /// you grant the s3express:CreateSession permission to the directory bucket in - /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession - /// API call on the bucket to obtain a session token. With the session token in your request - /// header, you can make API requests to this operation. After the session token expires, - /// you make another CreateSession API call to generate a new session token for - /// use. Amazon Web Services CLI or SDKs create session and refresh the session token - /// automatically to avoid service interruptions when a session expires. For more information - /// about authorization, see - /// CreateSession . - /// - ///
Content-MD5 request header
  • - /// - /// General purpose bucket - The Content-MD5 request header is required for all - /// Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your - /// request body has not been altered in transit. - /// - ///
  • - /// - /// Directory bucket - The Content-MD5 request header or a additional checksum - /// request header (including x-amz-checksum-crc32, x-amz-checksum-crc32c, - /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is required for all Multi-Object - /// Delete requests. - /// - ///
HTTP Host header syntax
- /// - /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. - /// - ///
- /// - /// The following operations are related to DeleteObjects: - /// - /// - ///
+ // custom partial to preserve IsSetBehavior public partial class DeleteObjectsRequest : AmazonWebServiceRequest { - private string bucketName; - private bool? bypassGovernanceRetention; - private ChecksumAlgorithm _checksumAlgorithm; - private List objects = AWSConfigs.InitializeCollections ? new List() : null; - private bool? quiet; - private MfaCodes mfaCodes; - private RequestPayer requestPayer; - private string expectedBucketOwner; - - /// - /// Gets and sets the property BucketName. - /// - /// The bucket name containing the objects to delete. - /// - /// - /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests - /// in the format Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are - /// not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must - /// follow the format bucket-base-name--zone-id--x-s3 (for example, amzn-s3-demo-bucket--usw2-az1--x-s3). For - /// information about bucket naming restrictions, see - /// Directory bucket naming rules in - /// the Amazon S3 User Guide. Access points - When you use this action with an access point for general - /// purpose buckets, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When - /// you use this action with an access point for directory buckets, you must provide the access point name in place of the bucket - /// name. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the - /// form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point - /// through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access - /// point ARNs, see - /// Using access points in the Amazon S3 User Guide. - /// - /// - /// - /// Object Lambda access points are not supported by directory buckets. - /// - /// - /// - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on - /// Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When - /// you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more - /// information about S3 on Outposts, see - /// What is S3 on Outposts? in the Amazon S3 User Guide. - /// - /// - public string BucketName - { - get { return this.bucketName; } - set { this.bucketName = value; } - } - - // Check to see if BucketName property is set - internal bool IsSetBucketName() - { - return this.bucketName != null; - } - - /// - /// Gets and sets the property BypassGovernanceRetention. - /// - /// Specifies whether you want to delete this object even if it has a Governance-type - /// Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention - /// permission. - /// - /// - /// - /// This functionality is not supported for directory buckets. - /// - /// - /// - public bool? BypassGovernanceRetention - { - get { return this.bypassGovernanceRetention; } - set { this.bypassGovernanceRetention = value; } - } - - // Check to see if BypassGovernanceRetention property is set - internal bool IsSetBypassGovernanceRetention() - { - return this.bypassGovernanceRetention.HasValue; - } - - /// - /// Gets and sets the property ChecksumAlgorithm. - /// - /// Indicates the algorithm used to create the checksum for the object when you use the - /// SDK. This header will not provide any additional functionality if you don't use the - /// SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the - /// request with the HTTP status code 400 Bad Request. - /// - /// - /// - /// For the x-amz-checksum-algorithm header, replace algorithm - /// with the supported algorithm from the following list: - /// - ///
  • - /// - /// CRC-32 - /// - ///
  • - /// - /// CRC-32C - /// - ///
  • - /// - /// CRC-64NVME - /// - ///
  • - /// - /// SHA-1 - /// - ///
  • - /// - /// SHA-256 - /// - ///
- /// - /// For more information, see Checking - /// object integrity in the Amazon S3 User Guide. - /// - /// - /// - /// If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, - /// Amazon S3 fails the request with a BadDigest error. - /// - /// - /// - /// If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm - /// parameter. - /// - ///
- public ChecksumAlgorithm ChecksumAlgorithm - { - get { return this._checksumAlgorithm; } - set { this._checksumAlgorithm = value; } - } - - // Check to see if ChecksumAlgorithm property is set - internal bool IsSetChecksumAlgorithm() - { - return this._checksumAlgorithm != null; - } - - /// - /// Gets and sets the property ExpectedBucketOwner. - /// - /// The account ID of the expected bucket owner. If the account ID that you provide does - /// not match the actual owner of the bucket, the request fails with the HTTP status code - /// 403 Forbidden (access denied). - /// - /// - public string ExpectedBucketOwner - { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } - } - - // Check to see if ExpectedBucketOwner property is set - internal bool IsSetExpectedBucketOwner() - { - return !String.IsNullOrEmpty(this.expectedBucketOwner); - } - - /// - /// Gets and sets the property Objects. - /// - public List Objects - { - get { return this.objects; } - set { this.objects = value; } - } - - // Check to see if Objects property is set - internal bool IsSetObjects() - { - return this.objects != null && (this.objects.Count > 0 || !AWSConfigs.InitializeCollections); - } - /// - /// Gets and sets the property MFA. - /// - /// The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device. Required to permanently delete a - /// versioned object if versioning is configured with MFA delete enabled. - /// - /// - /// - /// When performing the DeleteObjects operation on an MFA delete enabled - /// bucket, which attempts to delete the specified versioned objects, you must include - /// an MFA token. If you don't provide an MFA token, the entire request will fail, even - /// if there are non-versioned objects that you are trying to delete. If you provide an - /// invalid token, whether there are versioned object keys in the request or not, the - /// entire Multi-Object Delete request will fail. For information about MFA Delete, see - /// - /// MFA Delete in the Amazon S3 User Guide. - /// - /// - /// - /// This functionality is not supported for directory buckets. - /// - /// - /// - /// - /// This is a required property for this request if:
- /// 1. EnableMfaDelete was configured on the bucket - /// containing this object's version.
- /// 2. You are deleting an object's version - ///
- public MfaCodes MfaCodes - { - get { return this.mfaCodes; } - set { this.mfaCodes = value; } - } - - /// - /// Checks if the MfaCodes property is set. - /// - /// true if the MfaCodes property is set. - internal bool IsSetMfaCodes() + internal bool CustomMfaCodesIsSet() { - return (this.mfaCodes != null) && + return (this._mfaCodes != null) && (!System.String.IsNullOrEmpty(MfaCodes.SerialNumber)) && (!System.String.IsNullOrEmpty(MfaCodes.AuthenticationValue)); } - - - /// - /// Gets and sets the property RequestPayer. - /// - public RequestPayer RequestPayer - { - get { return this.requestPayer; } - set { this.requestPayer = value; } - } - - // Check to see if RequestPayer property is set - internal bool IsSetRequestPayer() - { - return this.requestPayer != null; - } - /// - /// Gets and sets the property Quiet. - /// - public bool? Quiet - { - get { return this.quiet; } - set { this.quiet = value; } - } - - // Check to see if Quiet property is set - internal bool IsSetQuiet() - { - return this.quiet.HasValue; - } - } } diff --git a/sdk/src/Services/S3/Custom/Model/DeleteObjectsResponse.cs b/sdk/src/Services/S3/Custom/Model/DeleteObjectsResponse.cs index 6adb230a8bb1..d3818ec7ab27 100644 --- a/sdk/src/Services/S3/Custom/Model/DeleteObjectsResponse.cs +++ b/sdk/src/Services/S3/Custom/Model/DeleteObjectsResponse.cs @@ -25,15 +25,11 @@ namespace Amazon.S3.Model /// #if !NETSTANDARD [Serializable] - public class DeleteObjectsResponse : AmazonWebServiceResponse, System.Runtime.Serialization.ISerializable + public partial class DeleteObjectsResponse : AmazonWebServiceResponse, System.Runtime.Serialization.ISerializable #else - public class DeleteObjectsResponse : AmazonWebServiceResponse + public partial class DeleteObjectsResponse : AmazonWebServiceResponse #endif - { - private List deleted = AWSConfigs.InitializeCollections ? new List() : null; - private List errors = AWSConfigs.InitializeCollections ? new List() : null; - private RequestCharged requestCharged; /// /// A default constructor for DeleteObjectsResponse @@ -42,56 +38,7 @@ public DeleteObjectsResponse() { } - /// - /// Gets and sets the DeletedObjects property. - /// A list of successful deletes. - /// Set only when Quiet=false on DeleteObjectsRequest. - /// - public List DeletedObjects - { - get { return this.deleted; } - set { this.deleted = value; } - } - - // Check to see if Deleted property is set - internal bool IsSetDeletedObjects() - { - return this.deleted != null && (this.deleted.Count > 0 || !AWSConfigs.InitializeCollections); - } - - /// - /// Gets and sets the DeleteErrors property. - /// A list of errors encountered while deleting objects. - /// - public List DeleteErrors - { - get { return this.errors; } - set { this.errors = value; } - } - // Check to see if DeleteErrors property is set - internal bool IsSetDeleteErrors() - { - return this.errors != null && (this.errors.Count > 0 || !AWSConfigs.InitializeCollections); - } - - /// - /// If present, indicates that the requester was successfully charged for the request. - /// - public RequestCharged RequestCharged - { - get { return this.requestCharged; } - set { this.requestCharged = value; } - } - - /// - /// Checks to see if RequestCharged is set. - /// - /// true, if RequestCharged property is set. - internal bool IsSetRequestCharged() - { - return requestCharged != null; - } #if !NETSTANDARD /// @@ -103,9 +50,9 @@ protected DeleteObjectsResponse(System.Runtime.Serialization.SerializationInfo i { if (info != null) { - this.deleted = (List)info.GetValue("deleted", typeof(List)); - this.errors = (List)info.GetValue("errors", typeof(List)); - this.requestCharged = RequestCharged.FindValue((string) info.GetValue("requestCharged", typeof(string))); + this._deletedObjects = (List)info.GetValue("deleted", typeof(List)); + this._deleteErrors = (List)info.GetValue("errors", typeof(List)); + this._requestCharged = RequestCharged.FindValue((string) info.GetValue("requestCharged", typeof(string))); } } @@ -121,9 +68,9 @@ public virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo { if (info != null) { - info.AddValue("deleted", deleted); - info.AddValue("errors", errors); - info.AddValue("requestCharged", (string) requestCharged); + info.AddValue("deleted", _deletedObjects); + info.AddValue("errors", _deleteErrors); + info.AddValue("requestCharged", (string) _requestCharged); } } #endif diff --git a/sdk/src/Services/S3/Custom/Model/DeletedObject.cs b/sdk/src/Services/S3/Custom/Model/DeletedObject.cs index ae61255242ca..1ff712312ba2 100644 --- a/sdk/src/Services/S3/Custom/Model/DeletedObject.cs +++ b/sdk/src/Services/S3/Custom/Model/DeletedObject.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,118 +12,23 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ + using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; namespace Amazon.S3.Model { - /// - /// Contains information about a successful delete operation against a specific S3 object. - /// #if !NETSTANDARD [Serializable] #endif - public class DeletedObject + public partial class DeletedObject { - - private bool? deleteMarker; - private string deleteMarkerVersionId; - private string key; - private string versionId; - - /// - /// Gets and sets the property DeleteMarker. - /// - /// Indicates whether the specified object version that was permanently deleted was (true) - /// or was not (false) a delete marker before deletion. In a simple DELETE, this header - /// indicates whether (true) or not (false) the current version of the object is a delete - /// marker. - /// - /// - /// - /// This functionality is not supported for directory buckets. - /// - /// - /// - public bool? DeleteMarker - { - get { return this.deleteMarker; } - set { this.deleteMarker = value; } - } - - // Check to see if DeleteMarker property is set - internal bool IsSetDeleteMarker() - { - return this.deleteMarker.HasValue; - } - - /// - /// Gets and sets the property DeleteMarkerVersionId. - /// - /// The version ID of the delete marker created as a result of the DELETE operation. If - /// you delete a specific object version, the value returned by this header is the version - /// ID of the object version deleted. - /// - /// - /// - /// This functionality is not supported for directory buckets. - /// - /// - /// - public string DeleteMarkerVersionId - { - get { return this.deleteMarkerVersionId; } - set { this.deleteMarkerVersionId = value; } - } - - // Check to see if DeleteMarkerVersionId property is set - internal bool IsSetDeleteMarkerVersionId() - { - return this.deleteMarkerVersionId != null; - } - - /// - /// Gets and sets the property Key. - /// - /// The name of the deleted object. - /// - /// - public string Key - { - get { return this.key; } - set { this.key = value; } - } - - // Check to see if Key property is set - internal bool IsSetKey() - { - return this.key != null; - } - - /// - /// Gets and sets the property VersionId. - /// - /// The version ID of the deleted object. - /// - /// - /// - /// This functionality is not supported for directory buckets. - /// - /// - /// - public string VersionId - { - get { return this.versionId; } - set { this.versionId = value; } - } - - // Check to see if VersionId property is set - internal bool IsSetVersionId() - { - return this.versionId != null; - } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs index a18b56f4b59e..824901c73db4 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs @@ -31,118 +31,13 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// Delete Objects Request Marshaller /// - public class DeleteObjectsRequestMarshaller : IMarshaller ,IMarshaller + public partial class DeleteObjectsRequestMarshaller : IMarshaller ,IMarshaller { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) - { - return this.Marshall((DeleteObjectsRequest)input); - } - - public IRequest Marshall(DeleteObjectsRequest deleteObjectsRequest) + void MfaCodesCustomMarshall(DefaultRequest request, DeleteObjectsRequest publicRequest) { - IRequest request = new DefaultRequest(deleteObjectsRequest, "Amazon.S3"); - - request.HttpMethod = "POST"; - - if (deleteObjectsRequest.IsSetBypassGovernanceRetention()) - request.Headers.Add("x-amz-bypass-governance-retention", S3Transforms.ToStringValue(deleteObjectsRequest.BypassGovernanceRetention.Value)); - if (deleteObjectsRequest.IsSetMfaCodes()) - request.Headers.Add(HeaderKeys.XAmzMfaHeader, deleteObjectsRequest.MfaCodes.FormattedMfaCodes); - if (deleteObjectsRequest.IsSetRequestPayer()) - request.Headers.Add(S3Constants.AmzHeaderRequestPayer, S3Transforms.ToStringValue(deleteObjectsRequest.RequestPayer.ToString())); - if (deleteObjectsRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(deleteObjectsRequest.ExpectedBucketOwner)); - if (deleteObjectsRequest.IsSetChecksumAlgorithm()) - request.Headers[S3Constants.AmzHeaderSdkChecksumAlgorithm] = S3Transforms.ToStringValue(deleteObjectsRequest.ChecksumAlgorithm); - - if (string.IsNullOrEmpty(deleteObjectsRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "DeleteObjectsRequest.BucketName"); - - request.ResourcePath = "/"; - - request.AddSubResource("delete"); - - var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); - using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) - { - xmlWriter.WriteStartElement("Delete", S3Constants.S3RequestXmlNamespace); - - var deleteDeleteobjectsList = deleteObjectsRequest.Objects; - if (deleteDeleteobjectsList != null && deleteDeleteobjectsList.Count > 0) - { - foreach (var deleteDeleteobjectsListValue in deleteDeleteobjectsList) - { - xmlWriter.WriteStartElement("Object", ""); - if (deleteDeleteobjectsListValue.IsSetKey()) - { - xmlWriter.WriteElementString("Key", "", S3Transforms.ToXmlStringValue(deleteDeleteobjectsListValue.Key)); - } - if (deleteDeleteobjectsListValue.IsSetVersionId()) - { - xmlWriter.WriteElementString("VersionId", "", S3Transforms.ToXmlStringValue(deleteDeleteobjectsListValue.VersionId)); - } - - if (deleteDeleteobjectsListValue.IsSetETag()) - { - xmlWriter.WriteElementString("ETag", "", S3Transforms.ToXmlStringValue(deleteDeleteobjectsListValue.ETag)); - } - if (deleteDeleteobjectsListValue.IsSetLastModifiedTime()) - { - xmlWriter.WriteElementString("LastModifiedTime", "", S3Transforms.ToXmlStringValue(deleteDeleteobjectsListValue.LastModifiedTime.Value)); - } - if (deleteDeleteobjectsListValue.IsSetSize()) - { - xmlWriter.WriteElementString("Size", "", S3Transforms.ToXmlStringValue(deleteDeleteobjectsListValue.Size.Value)); - } - - xmlWriter.WriteEndElement(); - } - } - if (deleteObjectsRequest.IsSetQuiet()) - { - xmlWriter.WriteElementString("Quiet", "", S3Transforms.ToXmlStringValue(deleteObjectsRequest.Quiet.Value)); - } - xmlWriter.WriteEndElement(); - } - - try - { - var content = stringWriter.ToString(); - request.Content = Encoding.UTF8.GetBytes(content); - request.Headers[HeaderKeys.ContentTypeHeader] = "application/xml"; - - ChecksumUtils.SetChecksumData( - request, - deleteObjectsRequest.ChecksumAlgorithm, - fallbackToMD5: false, - isRequestChecksumRequired: true, - headerName: S3Constants.AmzHeaderSdkChecksumAlgorithm - ); - } - catch (EncoderFallbackException e) - { - throw new AmazonServiceException("Unable to marshall request to XML", e); - } - - return request; + if (publicRequest.IsSetMfaCodes()) + request.Headers.Add(HeaderKeys.XAmzMfaHeader, publicRequest.MfaCodes.FormattedMfaCodes); } - - private static DeleteObjectsRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static DeleteObjectsRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new DeleteObjectsRequestMarshaller(); - } - return _instance; - } - } } } diff --git a/sdk/src/Services/S3/Custom/Model/KeyVersion.cs b/sdk/src/Services/S3/Custom/Model/KeyVersion.cs deleted file mode 100644 index b4e85765a461..000000000000 --- a/sdk/src/Services/S3/Custom/Model/KeyVersion.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ -using System; -using System.Collections.Generic; -using System.Xml.Serialization; -using System.Text; -using System.IO; - -namespace Amazon.S3.Model -{ - /// - /// Specifies an object key and optional object version. - /// - public class KeyVersion - { - - private string key; - private string versionId; - private string eTag; - private DateTime? lastModifiedTime; - private long? size; - - /// - /// Key name of the object to delete. - /// - /// - public string Key - { - get { return this.key; } - set { this.key = value; } - } - - // Check to see if Key property is set - internal bool IsSetKey() - { - return this.key != null; - } - - /// - /// VersionId for the specific version of the object to delete. - /// - /// - public string VersionId - { - get { return this.versionId; } - set { this.versionId = value; } - } - - // Check to see if VersionId property is set - internal bool IsSetVersionId() - { - return this.versionId != null; - } - - /// - /// Gets and sets the property ETag. - /// An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. - /// This header field makes the request method conditional on ETags. - /// - /// Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object. - /// - /// - public string ETag - { - get { return this.eTag; } - set { this.eTag = value; } - } - - // Check to see if ETag property is set - internal bool IsSetETag() - { - return !String.IsNullOrEmpty(this.eTag); - } - - /// - /// Gets and sets the property Size. - /// If present, the objects are deleted only if its size matches the provided size in bytes. - /// - /// This functionality is only supported for directory buckets. - /// - /// - public long? Size - { - get { return this.size; } - set { this.size = value; } - } - - // Check to see if Size property is set - internal bool IsSetSize() - { - return this.size.HasValue; - } - - /// - /// Gets and sets the property LastModifiedTime. - /// If present, the objects are deleted only if its modification times matches the provided Timestamp. - /// - /// - /// This functionality is only supported for directory buckets. - /// - /// - public DateTime? LastModifiedTime - { - get { return this.lastModifiedTime; } - set { this.lastModifiedTime = value; } - } - - // Check to see if LastModifiedTime property is set - internal bool IsSetLastModifiedTime() - { - return this.lastModifiedTime.HasValue; - } - } -} diff --git a/sdk/src/Services/S3/Generated/Model/Delete.cs b/sdk/src/Services/S3/Generated/Model/Delete.cs new file mode 100644 index 000000000000..eb33c4431931 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Delete.cs @@ -0,0 +1,92 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the objects to delete. + /// + public partial class Delete + { + private List _objects = AWSConfigs.InitializeCollections ? new List() : null; + private bool? _quiet; + + /// + /// Gets and sets the property Objects. + /// + /// The object to delete. + /// + /// + /// + /// Directory buckets - For directory buckets, an object that's composed entirely + /// of whitespace characters is not supported by the DeleteObjects API operation. + /// The request will receive a 400 Bad Request error and none of the objects in + /// the request will be deleted. + /// + /// + /// + /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned + /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller + /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous + /// SDK behavior set the AWSConfigs.InitializeCollections static property to true. + /// + [AWSProperty(Required=true)] + public List Objects + { + get { return this._objects; } + set { this._objects = value; } + } + + // Check to see if Objects property is set + internal bool IsSetObjects() + { + return this._objects != null && (this._objects.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property Quiet. + /// + /// Element to enable quiet mode for the request. When you add this element, you must + /// set its value to true. + /// + /// + public bool? Quiet + { + get { return this._quiet; } + set { this._quiet = value; } + } + + // Check to see if Quiet property is set + internal bool IsSetQuiet() + { + return this._quiet.HasValue; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeleteError.cs b/sdk/src/Services/S3/Generated/Model/DeleteError.cs new file mode 100644 index 000000000000..23b12564200a --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteError.cs @@ -0,0 +1,1585 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for all error elements. + /// + public partial class DeleteError + { + private string _code; + private string _key; + private string _message; + private string _versionId; + + /// + /// Gets and sets the property Code. + /// + /// The error code is a string that uniquely identifies an error condition. It is meant + /// to be read and understood by programs that detect and handle errors by type. The following + /// is a list of Amazon S3 error codes. For more information, see Error + /// responses. + /// + ///
    • + /// + /// Code: AccessDenied + /// + ///
    • + /// + /// Description: Access Denied + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: AccountProblem + /// + ///
    • + /// + /// Description: There is a problem with your Amazon Web Services account that + /// prevents the action from completing successfully. Contact Amazon Web Services Support + /// for further assistance. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: AllAccessDisabled + /// + ///
    • + /// + /// Description: All access to this Amazon S3 resource has been disabled. Contact + /// Amazon Web Services Support for further assistance. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: AmbiguousGrantByEmailAddress + /// + ///
    • + /// + /// Description: The email address you provided is associated with more than one + /// account. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: AuthorizationHeaderMalformed + /// + ///
    • + /// + /// Description: The authorization header you provided is invalid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// HTTP Status Code: N/A + /// + ///
    • + /// + /// Code: BadDigest + /// + ///
    • + /// + /// Description: The Content-MD5 you specified did not match what we received. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: BucketAlreadyExists + /// + ///
    • + /// + /// Description: The requested bucket name is not available. The bucket namespace + /// is shared by all users of the system. Please select a different name and try again. + /// + ///
    • + /// + /// HTTP Status Code: 409 Conflict + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: BucketAlreadyOwnedByYou + /// + ///
    • + /// + /// Description: The bucket you tried to create already exists, and you own it. + /// Amazon S3 returns this error in all Amazon Web Services Regions except in the North + /// Virginia Region. For legacy compatibility, if you re-create an existing bucket that + /// you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets + /// the bucket access control lists (ACLs). + /// + ///
    • + /// + /// Code: 409 Conflict (in all Regions except the North Virginia Region) + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: BucketNotEmpty + /// + ///
    • + /// + /// Description: The bucket you tried to delete is not empty. + /// + ///
    • + /// + /// HTTP Status Code: 409 Conflict + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: CredentialsNotSupported + /// + ///
    • + /// + /// Description: This request does not support credentials. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: CrossLocationLoggingProhibited + /// + ///
    • + /// + /// Description: Cross-location logging not allowed. Buckets in one geographic + /// location cannot log information to a bucket in another location. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: EntityTooSmall + /// + ///
    • + /// + /// Description: Your proposed upload is smaller than the minimum allowed object + /// size. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: EntityTooLarge + /// + ///
    • + /// + /// Description: Your proposed upload exceeds the maximum allowed object size. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: ExpiredToken + /// + ///
    • + /// + /// Description: The provided token has expired. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: IllegalVersioningConfigurationException + /// + ///
    • + /// + /// Description: Indicates that the versioning configuration specified in the + /// request is invalid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: IncompleteBody + /// + ///
    • + /// + /// Description: You did not provide the number of bytes specified by the Content-Length + /// HTTP header + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: IncorrectNumberOfFilesInPostRequest + /// + ///
    • + /// + /// Description: POST requires exactly one file upload per request. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InlineDataTooLarge + /// + ///
    • + /// + /// Description: Inline data exceeds the maximum allowed size. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InternalError + /// + ///
    • + /// + /// Description: We encountered an internal error. Please try again. + /// + ///
    • + /// + /// HTTP Status Code: 500 Internal Server Error + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Server + /// + ///
    • + /// + /// Code: InvalidAccessKeyId + /// + ///
    • + /// + /// Description: The Amazon Web Services access key ID you provided does not exist + /// in our records. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidAddressingHeader + /// + ///
    • + /// + /// Description: You must specify the Anonymous role. + /// + ///
    • + /// + /// HTTP Status Code: N/A + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidArgument + /// + ///
    • + /// + /// Description: Invalid Argument + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidBucketName + /// + ///
    • + /// + /// Description: The specified bucket is not valid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidBucketState + /// + ///
    • + /// + /// Description: The request is not valid with the current state of the bucket. + /// + ///
    • + /// + /// HTTP Status Code: 409 Conflict + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidDigest + /// + ///
    • + /// + /// Description: The Content-MD5 you specified is not valid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidEncryptionAlgorithmError + /// + ///
    • + /// + /// Description: The encryption request you specified is not valid. The valid + /// value is AES256. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidLocationConstraint + /// + ///
    • + /// + /// Description: The specified location constraint is not valid. For more information + /// about Regions, see How + /// to Select a Region for Your Buckets. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidObjectState + /// + ///
    • + /// + /// Description: The action is not valid for the current state of the object. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidPart + /// + ///
    • + /// + /// Description: One or more of the specified parts could not be found. The part + /// might not have been uploaded, or the specified entity tag might not have matched the + /// part's entity tag. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidPartOrder + /// + ///
    • + /// + /// Description: The list of parts was not in ascending order. Parts list must + /// be specified in order by part number. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidPayer + /// + ///
    • + /// + /// Description: All access to this object has been disabled. Please contact Amazon + /// Web Services Support for further assistance. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidPolicyDocument + /// + ///
    • + /// + /// Description: The content of the form does not meet the conditions specified + /// in the policy document. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidRange + /// + ///
    • + /// + /// Description: The requested range cannot be satisfied. + /// + ///
    • + /// + /// HTTP Status Code: 416 Requested Range Not Satisfiable + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Please use AWS4-HMAC-SHA256. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: SOAP requests must be made over an HTTPS connection. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Acceleration is not supported for buckets + /// with non-DNS compliant names. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Acceleration is not supported for buckets + /// with periods (.) in their names. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Accelerate endpoint only supports virtual + /// style requests. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Accelerate is not configured on this bucket. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Accelerate is disabled on this bucket. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Acceleration is not supported on this bucket. + /// Contact Amazon Web Services Support for more information. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidRequest + /// + ///
    • + /// + /// Description: Amazon S3 Transfer Acceleration cannot be enabled on this bucket. + /// Contact Amazon Web Services Support for more information. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// Code: N/A + /// + ///
    • + /// + /// Code: InvalidSecurity + /// + ///
    • + /// + /// Description: The provided security credentials are not valid. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidSOAPRequest + /// + ///
    • + /// + /// Description: The SOAP request body is invalid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidStorageClass + /// + ///
    • + /// + /// Description: The storage class you specified is not valid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidTargetBucketForLogging + /// + ///
    • + /// + /// Description: The target bucket for logging does not exist, is not owned by + /// you, or does not have the appropriate grants for the log-delivery group. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidToken + /// + ///
    • + /// + /// Description: The provided token is malformed or otherwise invalid. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: InvalidURI + /// + ///
    • + /// + /// Description: Couldn't parse the specified URI. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: KeyTooLongError + /// + ///
    • + /// + /// Description: Your key is too long. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MalformedACLError + /// + ///
    • + /// + /// Description: The XML you provided was not well-formed or did not validate + /// against our published schema. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MalformedPOSTRequest + /// + ///
    • + /// + /// Description: The body of your POST request is not well-formed multipart/form-data. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MalformedXML + /// + ///
    • + /// + /// Description: This happens when the user sends malformed XML (XML that doesn't + /// conform to the published XSD) for the configuration. The error message is, "The XML + /// you provided was not well-formed or did not validate against our published schema." + /// + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MaxMessageLengthExceeded + /// + ///
    • + /// + /// Description: Your request was too big. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MaxPostPreDataLengthExceededError + /// + ///
    • + /// + /// Description: Your POST request fields preceding the upload file were too large. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MetadataTooLarge + /// + ///
    • + /// + /// Description: Your metadata headers exceed the maximum allowed metadata size. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MethodNotAllowed + /// + ///
    • + /// + /// Description: The specified method is not allowed against this resource. + /// + ///
    • + /// + /// HTTP Status Code: 405 Method Not Allowed + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MissingAttachment + /// + ///
    • + /// + /// Description: A SOAP attachment was expected, but none were found. + /// + ///
    • + /// + /// HTTP Status Code: N/A + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MissingContentLength + /// + ///
    • + /// + /// Description: You must provide the Content-Length HTTP header. + /// + ///
    • + /// + /// HTTP Status Code: 411 Length Required + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MissingRequestBodyError + /// + ///
    • + /// + /// Description: This happens when the user sends an empty XML document as a request. + /// The error message is, "Request body is empty." + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MissingSecurityElement + /// + ///
    • + /// + /// Description: The SOAP 1.1 request is missing a security element. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: MissingSecurityHeader + /// + ///
    • + /// + /// Description: Your request is missing a required header. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoLoggingStatusForKey + /// + ///
    • + /// + /// Description: There is no such thing as a logging status subresource for a + /// key. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchBucket + /// + ///
    • + /// + /// Description: The specified bucket does not exist. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchBucketPolicy + /// + ///
    • + /// + /// Description: The specified bucket does not have a bucket policy. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchKey + /// + ///
    • + /// + /// Description: The specified key does not exist. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchLifecycleConfiguration + /// + ///
    • + /// + /// Description: The lifecycle configuration does not exist. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchUpload + /// + ///
    • + /// + /// Description: The specified multipart upload does not exist. The upload ID + /// might be invalid, or the multipart upload might have been aborted or completed. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NoSuchVersion + /// + ///
    • + /// + /// Description: Indicates that the version ID specified in the request does not + /// match an existing version. + /// + ///
    • + /// + /// HTTP Status Code: 404 Not Found + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: NotImplemented + /// + ///
    • + /// + /// Description: A header you provided implies functionality that is not implemented. + /// + ///
    • + /// + /// HTTP Status Code: 501 Not Implemented + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Server + /// + ///
    • + /// + /// Code: NotSignedUp + /// + ///
    • + /// + /// Description: Your account is not signed up for the Amazon S3 service. You + /// must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: OperationAborted + /// + ///
    • + /// + /// Description: A conflicting conditional action is currently in progress against + /// this resource. Try again. + /// + ///
    • + /// + /// HTTP Status Code: 409 Conflict + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: PermanentRedirect + /// + ///
    • + /// + /// Description: The bucket you are attempting to access must be addressed using + /// the specified endpoint. Send all future requests to this endpoint. + /// + ///
    • + /// + /// HTTP Status Code: 301 Moved Permanently + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: PreconditionFailed + /// + ///
    • + /// + /// Description: At least one of the preconditions you specified did not hold. + /// + ///
    • + /// + /// HTTP Status Code: 412 Precondition Failed + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: Redirect + /// + ///
    • + /// + /// Description: Temporary redirect. + /// + ///
    • + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: RestoreAlreadyInProgress + /// + ///
    • + /// + /// Description: Object restore is already in progress. + /// + ///
    • + /// + /// HTTP Status Code: 409 Conflict + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: RequestIsNotMultiPartContent + /// + ///
    • + /// + /// Description: Bucket POST must be of the enclosure-type multipart/form-data. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: RequestTimeout + /// + ///
    • + /// + /// Description: Your socket connection to the server was not read from or written + /// to within the timeout period. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: RequestTimeTooSkewed + /// + ///
    • + /// + /// Description: The difference between the request time and the server's time + /// is too large. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: RequestTorrentOfBucketError + /// + ///
    • + /// + /// Description: Requesting the torrent file of a bucket is not permitted. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: SignatureDoesNotMatch + /// + ///
    • + /// + /// Description: The request signature we calculated does not match the signature + /// you provided. Check your Amazon Web Services secret access key and signing method. + /// For more information, see REST + /// Authentication and SOAP + /// Authentication for details. + /// + ///
    • + /// + /// HTTP Status Code: 403 Forbidden + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: ServiceUnavailable + /// + ///
    • + /// + /// Description: Service is unable to handle request. + /// + ///
    • + /// + /// HTTP Status Code: 503 Service Unavailable + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Server + /// + ///
    • + /// + /// Code: SlowDown + /// + ///
    • + /// + /// Description: Reduce your request rate. + /// + ///
    • + /// + /// HTTP Status Code: 503 Slow Down + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Server + /// + ///
    • + /// + /// Code: TemporaryRedirect + /// + ///
    • + /// + /// Description: You are being redirected to the bucket while DNS updates. + /// + ///
    • + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: TokenRefreshRequired + /// + ///
    • + /// + /// Description: The provided token must be refreshed. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: TooManyBuckets + /// + ///
    • + /// + /// Description: You have attempted to create more buckets than allowed. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: UnexpectedContent + /// + ///
    • + /// + /// Description: This request does not support content. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: UnresolvableGrantByEmailAddress + /// + ///
    • + /// + /// Description: The email address you provided does not match any account on + /// record. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
    • + /// + /// Code: UserKeyMustBeSpecified + /// + ///
    • + /// + /// Description: The bucket POST must contain the specified field name. If it + /// is specified, check the order of the fields. + /// + ///
    • + /// + /// HTTP Status Code: 400 Bad Request + /// + ///
    • + /// + /// SOAP Fault Code Prefix: Client + /// + ///
+ ///
+ public string Code + { + get { return this._code; } + set { this._code = value; } + } + + // Check to see if Code property is set + internal bool IsSetCode() + { + return this._code != null; + } + + /// + /// Gets and sets the property Key. + /// + /// The error key. + /// + /// + [AWSProperty(Min=1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property Message. + /// + /// The error message contains a generic description of the error condition in English. + /// It is intended for a human audience. Simple programs display the message directly + /// to the end user if they encounter an error condition they don't know how or don't + /// care to handle. Sophisticated programs with more exhaustive error handling and proper + /// internationalization are more likely to ignore the error message. + /// + /// + public string Message + { + get { return this._message; } + set { this._message = value; } + } + + // Check to see if Message property is set + internal bool IsSetMessage() + { + return this._message != null; + } + + /// + /// Gets and sets the property VersionId. + /// + /// The version ID of the error. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return this._versionId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeleteObjectsRequest.cs b/sdk/src/Services/S3/Generated/Model/DeleteObjectsRequest.cs new file mode 100644 index 000000000000..46e9943b511d --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteObjectsRequest.cs @@ -0,0 +1,453 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the DeleteObjects operation. + /// This operation enables you to delete multiple objects from a bucket using a single + /// HTTP request. If you know the object keys that you want to delete, then this operation + /// provides a suitable alternative to sending individual delete requests, reducing per-request + /// overhead. + /// + /// + /// + /// The request can contain a list of up to 1,000 keys that you want to delete. In the + /// XML, you provide the object key names, and optionally, version IDs if you want to + /// delete a specific version of the object from a versioning-enabled bucket. For each + /// key, Amazon S3 performs a delete operation and returns the result of that delete, + /// success or failure, in the response. If the object specified in the request isn't + /// found, Amazon S3 confirms the deletion by returning the result as deleted. + /// + ///
  • + /// + /// Directory buckets - S3 Versioning isn't enabled and supported for directory + /// buckets. + /// + ///
  • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style + /// requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints + /// in Availability Zones, see Regional + /// and Zonal endpoints for directory buckets in Availability Zones in the Amazon + /// S3 User Guide. For more information about endpoints in Local Zones, see Concepts + /// for directory buckets in Local Zones in the Amazon S3 User Guide. + /// + ///
+ /// + /// The operation supports two modes for the response: verbose and quiet. By default, + /// the operation uses verbose mode in which the response includes the result of deletion + /// of each key in your request. In quiet mode the response includes only keys where the + /// delete operation encountered an error. For a successful deletion in a quiet mode, + /// the operation does not return any information about the delete in the response body. + /// + /// + /// + /// When performing this action on an MFA Delete enabled bucket, that attempts to delete + /// any versioned objects, you must include an MFA token. If you do not provide one, the + /// entire request will fail, even if there are non-versioned objects you are trying to + /// delete. If you provide an invalid token, whether there are versioned keys in the request + /// or not, the entire Multi-Object Delete request will fail. For information about MFA + /// Delete, see MFA + /// Delete in the Amazon S3 User Guide. + /// + /// + /// + /// Directory buckets - MFA delete is not supported by directory buckets. + /// + ///
Permissions
  • + /// + /// General purpose bucket permissions - The following permissions are required + /// in your policies when your DeleteObjects request includes specific headers. + /// + ///
    • + /// + /// s3:DeleteObject - To delete an object from a bucket, you must always + /// specify the s3:DeleteObject permission. + /// + ///
    • + /// + /// s3:DeleteObjectVersion - To delete a specific version of an object + /// from a versioning-enabled bucket, you must specify the s3:DeleteObjectVersion + /// permission. + /// + /// + /// + /// If the s3:DeleteObject or s3:DeleteObjectVersion permissions are explicitly + /// denied in your bucket policy, attempts to delete any unversioned objects result in + /// a 403 Access Denied error. + /// + ///
  • + /// + /// Directory bucket permissions - To grant access to this API operation on a + /// directory bucket, we recommend that you use the + /// CreateSession API operation for session-based authorization. Specifically, + /// you grant the s3express:CreateSession permission to the directory bucket in + /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession + /// API call on the bucket to obtain a session token. With the session token in your request + /// header, you can make API requests to this operation. After the session token expires, + /// you make another CreateSession API call to generate a new session token for + /// use. Amazon Web Services CLI or SDKs create session and refresh the session token + /// automatically to avoid service interruptions when a session expires. For more information + /// about authorization, see + /// CreateSession . + /// + ///
Content-MD5 request header
  • + /// + /// General purpose bucket - The Content-MD5 request header is required for all + /// Multi-Object Delete requests. Amazon S3 uses the header value to ensure that your + /// request body has not been altered in transit. + /// + ///
  • + /// + /// Directory bucket - The Content-MD5 request header or a additional checksum + /// request header (including x-amz-checksum-crc32, x-amz-checksum-crc32c, + /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is required for all Multi-Object + /// Delete requests. + /// + ///
HTTP Host header syntax
+ /// + /// Directory buckets - The HTTP Host header syntax is Bucket-name.s3express-zone-id.region-code.amazonaws.com. + /// + ///
+ /// + /// The following operations are related to DeleteObjects: + /// + /// + /// + /// You must URL encode any signed header values that contain spaces. For example, if + /// your header value is my file.txt, containing two spaces after my, you + /// must URL encode this value to my%20%20file.txt. + /// + /// + ///
+ public partial class DeleteObjectsRequest : AmazonWebServiceRequest + { + private string _bucketName; + private bool? _bypassGovernanceRetention; + private ChecksumAlgorithm _checksumAlgorithm; + private string _expectedBucketOwner; + private MfaCodes _mfaCodes; + private List _objects = AWSConfigs.InitializeCollections ? new List() : null; + private bool? _quiet; + private RequestPayer _requestPayer; + + /// + /// Gets and sets the property BucketName. + /// + /// The bucket name containing the objects to delete. + /// + /// + /// + /// Directory buckets - When you use this operation with a directory bucket, you + /// must use virtual-hosted-style requests in the format Bucket-name.s3express-zone-id.region-code.amazonaws.com. + /// Path-style requests are not supported. Directory bucket names must be unique in the + /// chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, amzn-s3-demo-bucket--usw2-az1--x-s3). + /// For information about bucket naming restrictions, see Directory + /// bucket naming rules in the Amazon S3 User Guide. + /// + /// + /// + /// Access points - When you use this action with an access point for general + /// purpose buckets, you must provide the alias of the access point in place of the bucket + /// name or specify the access point ARN. When you use this action with an access point + /// for directory buckets, you must provide the access point name in place of the bucket + /// name. When using the access point ARN, you must direct requests to the access point + /// hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. + /// When using this action with an access point through the Amazon Web Services SDKs, + /// you provide the access point ARN in place of the bucket name. For more information + /// about access point ARNs, see Using + /// access points in the Amazon S3 User Guide. + /// + /// + /// + /// Object Lambda access points are not supported by directory buckets. + /// + /// + /// + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct + /// requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. + /// When you use this action with S3 on Outposts, the destination bucket must be the Outposts + /// access point ARN or the access point alias. For more information about S3 on Outposts, + /// see What + /// is S3 on Outposts? in the Amazon S3 User Guide. + /// + /// + [AWSProperty(Required=true)] + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property BypassGovernanceRetention. + /// + /// Specifies whether you want to delete this object even if it has a Governance-type + /// Object Lock in place. To use this header, you must have the s3:BypassGovernanceRetention + /// permission. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public bool? BypassGovernanceRetention + { + get { return this._bypassGovernanceRetention; } + set { this._bypassGovernanceRetention = value; } + } + + // Check to see if BypassGovernanceRetention property is set + internal bool IsSetBypassGovernanceRetention() + { + return this._bypassGovernanceRetention.HasValue; + } + + /// + /// Gets and sets the property ChecksumAlgorithm. + /// + /// Indicates the algorithm used to create the checksum for the object when you use the + /// SDK. This header will not provide any additional functionality if you don't use the + /// SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with + /// the HTTP status code 400 Bad Request. + /// + /// + /// + /// For the x-amz-checksum-algorithm header, replace algorithm + /// with the supported algorithm from the following list: + /// + ///
  • + /// + /// CRC32 + /// + ///
  • + /// + /// CRC32C + /// + ///
  • + /// + /// CRC64NVME + /// + ///
  • + /// + /// SHA1 + /// + ///
  • + /// + /// SHA256 + /// + ///
+ /// + /// For more information, see Checking + /// object integrity in the Amazon S3 User Guide. + /// + /// + /// + /// If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, + /// Amazon S3 fails the request with a BadDigest error. + /// + /// + /// + /// If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm + /// parameter. + /// + ///
+ public ChecksumAlgorithm ChecksumAlgorithm + { + get { return this._checksumAlgorithm; } + set { this._checksumAlgorithm = value; } + } + + // Check to see if ChecksumAlgorithm property is set + internal bool IsSetChecksumAlgorithm() + { + return this._checksumAlgorithm != null; + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !String.IsNullOrEmpty(this._expectedBucketOwner); + } + + /// + /// Gets and sets the property MfaCodes. + /// + /// The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device. Required to permanently delete a + /// versioned object if versioning is configured with MFA delete enabled. + /// + /// + /// + /// When performing the DeleteObjects operation on an MFA delete enabled bucket, + /// which attempts to delete the specified versioned objects, you must include an MFA + /// token. If you don't provide an MFA token, the entire request will fail, even if there + /// are non-versioned objects that you are trying to delete. If you provide an invalid + /// token, whether there are versioned object keys in the request or not, the entire Multi-Object + /// Delete request will fail. For information about MFA Delete, see + /// MFA Delete in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public MfaCodes MfaCodes + { + get { return this._mfaCodes; } + set { this._mfaCodes = value; } + } + + // Check to see if MfaCodes property is set + internal bool IsSetMfaCodes() + { + return CustomMfaCodesIsSet(); + } + + /// + /// Gets and sets the property Objects. + /// + /// The object to delete. + /// + /// + /// + /// Directory buckets - For directory buckets, an object that's composed entirely + /// of whitespace characters is not supported by the DeleteObjects API operation. + /// The request will receive a 400 Bad Request error and none of the objects in + /// the request will be deleted. + /// + /// + /// + /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned + /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller + /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous + /// SDK behavior set the AWSConfigs.InitializeCollections static property to true. + /// + public List Objects + { + get { return this._objects; } + set { this._objects = value; } + } + + // Check to see if Objects property is set + internal bool IsSetObjects() + { + return this._objects != null && (this._objects.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property Quiet. + /// + /// Element to enable quiet mode for the request. When you add this element, you must + /// set its value to true. + /// + /// + public bool? Quiet + { + get { return this._quiet; } + set { this._quiet = value; } + } + + // Check to see if Quiet property is set + internal bool IsSetQuiet() + { + return this._quiet.HasValue; + } + + /// + /// Gets and sets the property RequestPayer. + /// + public RequestPayer RequestPayer + { + get { return this._requestPayer; } + set { this._requestPayer = value; } + } + + // Check to see if RequestPayer property is set + internal bool IsSetRequestPayer() + { + return this._requestPayer != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeleteObjectsResponse.cs b/sdk/src/Services/S3/Generated/Model/DeleteObjectsResponse.cs new file mode 100644 index 000000000000..4e0075a6f4a8 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeleteObjectsResponse.cs @@ -0,0 +1,105 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the DeleteObjects operation. + /// + public partial class DeleteObjectsResponse : AmazonWebServiceResponse + { + private List _deletedObjects = AWSConfigs.InitializeCollections ? new List() : null; + private List _deleteErrors = AWSConfigs.InitializeCollections ? new List() : null; + private RequestCharged _requestCharged; + + /// + /// Gets and sets the property DeletedObjects. + /// + /// Container element for a successful delete. It identifies the object that was successfully + /// deleted. + /// + /// + /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned + /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller + /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous + /// SDK behavior set the AWSConfigs.InitializeCollections static property to true. + /// + public List DeletedObjects + { + get { return this._deletedObjects; } + set { this._deletedObjects = value; } + } + + // Check to see if DeletedObjects property is set + internal bool IsSetDeletedObjects() + { + return this._deletedObjects != null && (this._deletedObjects.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property DeleteErrors. + /// + /// Container for a failed delete action that describes the object that Amazon S3 attempted + /// to delete and the error it encountered. + /// + /// + /// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned + /// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller + /// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous + /// SDK behavior set the AWSConfigs.InitializeCollections static property to true. + /// + public List DeleteErrors + { + get { return this._deleteErrors; } + set { this._deleteErrors = value; } + } + + // Check to see if DeleteErrors property is set + internal bool IsSetDeleteErrors() + { + return this._deleteErrors != null && (this._deleteErrors.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property RequestCharged. + /// + public RequestCharged RequestCharged + { + get { return this._requestCharged; } + set { this._requestCharged = value; } + } + + // Check to see if RequestCharged property is set + internal bool IsSetRequestCharged() + { + return this._requestCharged != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/DeletedObject.cs b/sdk/src/Services/S3/Generated/Model/DeletedObject.cs new file mode 100644 index 000000000000..80ae1cbc4f56 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/DeletedObject.cs @@ -0,0 +1,137 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Information about the deleted object. + /// + public partial class DeletedObject + { + private bool? _deleteMarker; + private string _deleteMarkerVersionId; + private string _key; + private string _versionId; + + /// + /// Gets and sets the property DeleteMarker. + /// + /// Indicates whether the specified object version that was permanently deleted was (true) + /// or was not (false) a delete marker before deletion. In a simple DELETE, this header + /// indicates whether (true) or not (false) the current version of the object is a delete + /// marker. To learn more about delete markers, see Working + /// with delete markers. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public bool? DeleteMarker + { + get { return this._deleteMarker; } + set { this._deleteMarker = value; } + } + + // Check to see if DeleteMarker property is set + internal bool IsSetDeleteMarker() + { + return this._deleteMarker.HasValue; + } + + /// + /// Gets and sets the property DeleteMarkerVersionId. + /// + /// The version ID of the delete marker created as a result of the DELETE operation. If + /// you delete a specific object version, the value returned by this header is the version + /// ID of the object version deleted. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string DeleteMarkerVersionId + { + get { return this._deleteMarkerVersionId; } + set { this._deleteMarkerVersionId = value; } + } + + // Check to see if DeleteMarkerVersionId property is set + internal bool IsSetDeleteMarkerVersionId() + { + return this._deleteMarkerVersionId != null; + } + + /// + /// Gets and sets the property Key. + /// + /// The name of the deleted object. + /// + /// + [AWSProperty(Min=1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property VersionId. + /// + /// The version ID of the deleted object. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return this._versionId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ErrorsItemUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteErrorUnmarshaller.cs similarity index 54% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ErrorsItemUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteErrorUnmarshaller.cs index 20efa36e1dce..54f1178608a7 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/ErrorsItemUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteErrorUnmarshaller.cs @@ -12,26 +12,40 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +#pragma warning disable CS0612,CS0618 namespace Amazon.S3.Model.Internal.MarshallTransformations { - /// - /// ErrorsItem Unmarshaller - /// - public class ErrorsItemUnmarshaller : IXmlUnmarshaller + /// + /// Response Unmarshaller for DeleteError Object + /// + public partial class DeleteErrorUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + ///
/// /// - public DeleteError Unmarshall(XmlUnmarshallerContext context) + public DeleteError Unmarshall(XmlUnmarshallerContext context) { - DeleteError errorsItem = new DeleteError(); + DeleteError unmarshalledObject = new DeleteError(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; @@ -44,57 +58,52 @@ public DeleteError Unmarshall(XmlUnmarshallerContext context) { if (context.TestExpression("Code", targetDepth)) { - errorsItem.Code = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { - errorsItem.Key = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Key = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { - errorsItem.Message = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VersionId", targetDepth)) { - errorsItem.VersionId = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.VersionId = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return errorsItem; + return unmarshalledObject; } - } - - - - return errorsItem; + } + return unmarshalledObject; } + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, DeleteError unmarshalledObject, int targetDepth); - private static ErrorsItemUnmarshaller _instance; + private static DeleteErrorUnmarshaller _instance = new DeleteErrorUnmarshaller(); /// - /// Singleton for the unmarshaller - /// - public static ErrorsItemUnmarshaller Instance + /// Gets the singleton. + ///
+ public static DeleteErrorUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new ErrorsItemUnmarshaller(); - } return _instance; } } } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs new file mode 100644 index 000000000000..8e48aa0e0277 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsRequestMarshaller.cs @@ -0,0 +1,160 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// DeleteObjects Request Marshaller + /// + public partial class DeleteObjectsRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((DeleteObjectsRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(DeleteObjectsRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "POST"; + request.AddSubResource("delete"); + + if (publicRequest.IsSetBypassGovernanceRetention()) + { + request.Headers["x-amz-bypass-governance-retention"] = StringUtils.FromBool(publicRequest.BypassGovernanceRetention); + } + + if (publicRequest.IsSetChecksumAlgorithm()) + { + request.Headers["x-amz-sdk-checksum-algorithm"] = publicRequest.ChecksumAlgorithm; + } + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + MfaCodesCustomMarshall(request, publicRequest); + + if (publicRequest.IsSetRequestPayer()) + { + request.Headers["x-amz-request-payer"] = publicRequest.RequestPayer; + } + if (string.IsNullOrEmpty(publicRequest.BucketName)) + throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "DeleteObjectsRequest.BucketName"); + request.ResourcePath = "/"; + var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); + using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + { + xmlWriter.WriteStartElement("Delete", "http://s3.amazonaws.com/doc/2006-03-01/"); + var publicRequestObjects = publicRequest.Objects; + if (publicRequestObjects != null && (publicRequestObjects.Count > 0 || !AWSConfigs.InitializeCollections)) + { + foreach (var publicRequestObjectsValue in publicRequestObjects) + { + if (publicRequestObjectsValue != null) + { + xmlWriter.WriteStartElement("Object"); + if(publicRequestObjectsValue.IsSetETag()) + xmlWriter.WriteElementString("ETag", StringUtils.FromString(publicRequestObjectsValue.ETag)); + if(publicRequestObjectsValue.IsSetKey()) + xmlWriter.WriteElementString("Key", StringUtils.FromString(publicRequestObjectsValue.Key)); + if(publicRequestObjectsValue.IsSetLastModifiedTime()) + xmlWriter.WriteElementString("LastModifiedTime", StringUtils.FromDateTimeToRFC822(publicRequestObjectsValue.LastModifiedTime.Value)); + if(publicRequestObjectsValue.IsSetSize()) + xmlWriter.WriteElementString("Size", StringUtils.FromLong(publicRequestObjectsValue.Size.Value)); + if(publicRequestObjectsValue.IsSetVersionId()) + xmlWriter.WriteElementString("VersionId", StringUtils.FromString(publicRequestObjectsValue.VersionId)); + xmlWriter.WriteEndElement(); + } + } + } + if(publicRequest.IsSetQuiet()) + xmlWriter.WriteElementString("Quiet", StringUtils.FromBool(publicRequest.Quiet.Value)); + + + xmlWriter.WriteEndElement(); + } + PostMarshallCustomization(request, publicRequest); + try + { + string content = stringWriter.ToString(); + request.Content = System.Text.Encoding.UTF8.GetBytes(content); + request.Headers["Content-Type"] = "application/xml"; + ChecksumUtils.SetChecksumData( + request, + publicRequest.ChecksumAlgorithm, + fallbackToMD5: false, + isRequestChecksumRequired: true, + headerName: "x-amz-sdk-checksum-algorithm" + ); + request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2006-03-01"; + } + catch (EncoderFallbackException e) + { + throw new AmazonServiceException("Unable to marshall request to XML", e); + } + return request; + } + private static DeleteObjectsRequestMarshaller _instance = new DeleteObjectsRequestMarshaller(); + + internal static DeleteObjectsRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static DeleteObjectsRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, DeleteObjectsRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, DeleteObjectsRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs similarity index 50% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs index 0e03bfc1162e..9083edadb885 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeleteObjectsResponseUnmarshaller.cs @@ -12,56 +12,58 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ using System; -using System.Net; using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + using Amazon.S3.Model; -using Amazon.S3.Util; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +#pragma warning disable CS0612,CS0618 namespace Amazon.S3.Model.Internal.MarshallTransformations { /// - /// Response Unmarshaller for DeleteObjects operation - /// - public class DeleteObjectsResponseUnmarshaller : S3ReponseUnmarshaller + /// Response Unmarshaller for DeleteObjects operation + /// + public partial class DeleteObjectsResponseUnmarshaller : S3ReponseUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { DeleteObjectsResponse response = new DeleteObjectsResponse(); + UnmarshallResult(context,response); + if (context.ResponseData.IsHeaderPresent("x-amz-request-charged")) + response.RequestCharged = context.ResponseData.GetHeaderValue("x-amz-request-charged"); - while (context.Read()) - { - if (context.IsStartElement) - { - UnmarshallResult(context,response); - continue; - } - } - - + PostUnmarshallCustomization(context, response); return response; - } - - private static void UnmarshallResult(XmlUnmarshallerContext context,DeleteObjectsResponse response) - { - IWebResponseData responseData = context.ResponseData; - if (responseData.IsHeaderPresent(S3Constants.AmzHeaderRequestCharged)) - response.RequestCharged = RequestCharged.FindValue(responseData.GetHeaderValue(S3Constants.AmzHeaderRequestCharged)); + } + private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteObjectsResponse response) + { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - if (context.IsStartOfDocument) - targetDepth += 2; - + targetDepth += 1; + if (context.IsEmptyResponse) + { + return; + } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) @@ -72,8 +74,8 @@ private static void UnmarshallResult(XmlUnmarshallerContext context,DeleteObject { response.DeletedObjects = new List(); } - - response.DeletedObjects.Add(DeletedObjectUnmarshaller.Instance.Unmarshall(context)); + var unmarshaller = DeletedObjectUnmarshaller.Instance; + response.DeletedObjects.Add(unmarshaller.Unmarshall(context)); continue; } if (context.TestExpression("Error", targetDepth)) @@ -82,8 +84,8 @@ private static void UnmarshallResult(XmlUnmarshallerContext context,DeleteObject { response.DeleteErrors = new List(); } - - response.DeleteErrors.Add(ErrorsItemUnmarshaller.Instance.Unmarshall(context)); + var unmarshaller = DeleteErrorUnmarshaller.Instance; + response.DeleteErrors.Add(unmarshaller.Unmarshall(context)); continue; } } @@ -92,26 +94,51 @@ private static void UnmarshallResult(XmlUnmarshallerContext context,DeleteObject return; } } - return; } + + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + /// + /// + public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) + { + S3ErrorResponse errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); + errorResponse.InnerException = innerException; + errorResponse.StatusCode = statusCode; - private static DeleteObjectsResponseUnmarshaller _instance; + var responseBodyBytes = context.GetResponseBodyBytes(); + + using (var streamCopy = new MemoryStream(responseBodyBytes)) + using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) + { + } + return base.ConstructS3Exception(context, errorResponse, innerException, statusCode); + } + + partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, DeleteObjectsResponse response); + + private static DeleteObjectsResponseUnmarshaller _instance = new DeleteObjectsResponseUnmarshaller(); + + internal static DeleteObjectsResponseUnmarshaller GetInstance() + { + return _instance; + } /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static DeleteObjectsResponseUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new DeleteObjectsResponseUnmarshaller(); - } return _instance; } } + } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeletedItemUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeletedObjectUnmarshaller.cs similarity index 55% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeletedItemUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeletedObjectUnmarshaller.cs index 518e2d19cb33..b96ea59a3f65 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/DeletedItemUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/DeletedObjectUnmarshaller.cs @@ -12,26 +12,40 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +#pragma warning disable CS0612,CS0618 namespace Amazon.S3.Model.Internal.MarshallTransformations { - /// - /// DeletedObject Unmarshaller - /// - public class DeletedObjectUnmarshaller : IXmlUnmarshaller + /// + /// Response Unmarshaller for DeletedObject Object + /// + public partial class DeletedObjectUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// - public DeletedObject Unmarshall(XmlUnmarshallerContext context) + public DeletedObject Unmarshall(XmlUnmarshallerContext context) { - DeletedObject deletedItem = new DeletedObject(); + DeletedObject unmarshalledObject = new DeletedObject(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; @@ -44,58 +58,52 @@ public DeletedObject Unmarshall(XmlUnmarshallerContext context) { if (context.TestExpression("DeleteMarker", targetDepth)) { - deletedItem.DeleteMarker = BoolUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = NullableBoolUnmarshaller.Instance; + unmarshalledObject.DeleteMarker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeleteMarkerVersionId", targetDepth)) { - deletedItem.DeleteMarkerVersionId = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.DeleteMarkerVersionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { - deletedItem.Key = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Key = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VersionId", targetDepth)) { - deletedItem.VersionId = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.VersionId = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return deletedItem; + return unmarshalledObject; } - } - - - - return deletedItem; + } + return unmarshalledObject; } + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, DeletedObject unmarshalledObject, int targetDepth); - private static DeletedObjectUnmarshaller _instance; + private static DeletedObjectUnmarshaller _instance = new DeletedObjectUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static DeletedObjectUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new DeletedObjectUnmarshaller(); - } return _instance; } } - } -} - +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/KeyVersion.cs b/sdk/src/Services/S3/Generated/Model/KeyVersion.cs new file mode 100644 index 000000000000..e0636ceee656 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/KeyVersion.cs @@ -0,0 +1,167 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Object Identifier is unique value to identify objects. + /// + public partial class KeyVersion + { + private string _eTag; + private string _key; + private DateTime? _lastModifiedTime; + private long? _size; + private string _versionId; + + /// + /// Gets and sets the property ETag. + /// + /// An entity tag (ETag) is an identifier assigned by a web server to a specific version + /// of a resource found at a URL. This header field makes the request method conditional + /// on ETags. + /// + /// + /// + /// Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique + /// to the object. + /// + /// + /// + public string ETag + { + get { return this._eTag; } + set { this._eTag = value; } + } + + // Check to see if ETag property is set + internal bool IsSetETag() + { + return !String.IsNullOrEmpty(this._eTag); + } + + /// + /// Gets and sets the property Key. + /// + /// Key name of the object. + /// + /// + /// + /// Replacement must be made for object keys containing special characters (such as carriage + /// returns) when using XML requests. For more information, see + /// XML related object key constraints. + /// + /// + /// + [AWSProperty(Required=true, Min=1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property LastModifiedTime. + /// + /// If present, the objects are deleted only if its modification times matches the provided + /// Timestamp. + /// + /// + /// + /// This functionality is only supported for directory buckets. + /// + /// + /// + public DateTime? LastModifiedTime + { + get { return this._lastModifiedTime; } + set { this._lastModifiedTime = value; } + } + + // Check to see if LastModifiedTime property is set + internal bool IsSetLastModifiedTime() + { + return this._lastModifiedTime.HasValue; + } + + /// + /// Gets and sets the property Size. + /// + /// If present, the objects are deleted only if its size matches the provided size in + /// bytes. + /// + /// + /// + /// This functionality is only supported for directory buckets. + /// + /// + /// + public long? Size + { + get { return this._size; } + set { this._size = value; } + } + + // Check to see if Size property is set + internal bool IsSetSize() + { + return this._size.HasValue; + } + + /// + /// Gets and sets the property VersionId. + /// + /// Version ID for the specific version of the object to delete. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return this._versionId != null; + } + + } +} \ No newline at end of file