private static void UnmarshallResult(XmlUnmarshallerContext context, PutObjectResponseECS response)
        {
            IWebResponseData responseData = context.ResponseData;

            if (responseData.IsHeaderPresent("x-amz-expiration"))
            {
                response.Expiration = ParseExpirationHeader(responseData.GetHeaderValue("x-amz-expiration"));
            }
            if (responseData.IsHeaderPresent("x-amz-server-side-encryption"))
            {
                response.ServerSideEncryptionMethod = ECSTransforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption"));
            }
            if (responseData.IsHeaderPresent("ETag"))
            {
                response.ETag = ECSTransforms.ToString(responseData.GetHeaderValue("ETag"));
            }
            if (responseData.IsHeaderPresent("x-amz-version-id"))
            {
                response.VersionId = ECSTransforms.ToString(responseData.GetHeaderValue("x-amz-version-id"));
            }
            if (responseData.IsHeaderPresent(COMMON.XAmzServerSideEncryptionAwsKmsKeyIdHeader))
            {
                response.ServerSideEncryptionKeyManagementServiceKeyId = ECSTransforms.ToString(responseData.GetHeaderValue(COMMON.XAmzServerSideEncryptionAwsKmsKeyIdHeader));
            }
            if (responseData.IsHeaderPresent(COMMON.EMC_APPEND_OFFSET))
            {
                response.AppendOffset = Convert.ToInt64(ECSTransforms.ToString(responseData.GetHeaderValue(COMMON.EMC_APPEND_OFFSET)));
            }

            return;
        }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            PutObjectResponseECS response = new PutObjectResponseECS();

            UnmarshallResult(context, response);


            return(response);
        }
        /// <summary>
        /// Appends the provided data to the end of the object.
        /// </summary>
        /// <param name="bucketName">Container for the necessary parameters to execute the PutObject service method.</param>
        /// <returns>The response from the PutObject service method, as returned by ECS.</returns>
        public long AppendObject(string bucketName, string keyName, string contentBody)
        {
            var marshaller   = new PutObjectRequestMarshallerECS();
            var unmarshaller = PutObjectResponseUnmarshallerECS.Instance;

            PutObjectRequestECS request = new PutObjectRequestECS()
            {
                BucketName  = bucketName,
                Key         = keyName,
                ContentBody = contentBody,
                Range       = Range.fromOffset(-1)
            };

            PutObjectResponseECS response = Invoke <PutObjectRequestECS, PutObjectResponseECS>(request, marshaller, unmarshaller);

            return(response.AppendOffset);
        }