aws-sdk-s3 1.139.0

AWS SDK for Amazon Simple Storage Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteObjectAnnotationInput {
    /// <p>The name of the bucket that contains the object.</p>
    pub bucket: ::std::option::Option<::std::string::String>,
    /// <p>The object key.</p>
    pub key: ::std::option::Option<::std::string::String>,
    /// <p>The name of the annotation to delete. Annotation names are UTF-8 encoded and cannot start with <code>aws</code> or <code>s3</code> (case-insensitive).</p>
    /// <p>Length Constraints: Minimum length of 1. Maximum length of 512 bytes.</p>
    pub annotation_name: ::std::option::Option<::std::string::String>,
    /// <p>The version ID of the object.</p>
    pub version_id: ::std::option::Option<::std::string::String>,
    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
    /// <p>This functionality is not supported for directory buckets.</p>
    /// </note>
    pub request_payer: ::std::option::Option<crate::types::RequestPayer>,
    /// <p>The account ID of the expected bucket owner.</p>
    pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
    /// <p>If specified, the operation only succeeds if the object's ETag matches the provided value.</p>
    pub object_if_match: ::std::option::Option<::std::string::String>,
}
impl DeleteObjectAnnotationInput {
    /// <p>The name of the bucket that contains the object.</p>
    pub fn bucket(&self) -> ::std::option::Option<&str> {
        self.bucket.as_deref()
    }
    /// <p>The object key.</p>
    pub fn key(&self) -> ::std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>The name of the annotation to delete. Annotation names are UTF-8 encoded and cannot start with <code>aws</code> or <code>s3</code> (case-insensitive).</p>
    /// <p>Length Constraints: Minimum length of 1. Maximum length of 512 bytes.</p>
    pub fn annotation_name(&self) -> ::std::option::Option<&str> {
        self.annotation_name.as_deref()
    }
    /// <p>The version ID of the object.</p>
    pub fn version_id(&self) -> ::std::option::Option<&str> {
        self.version_id.as_deref()
    }
    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
    /// <p>This functionality is not supported for directory buckets.</p>
    /// </note>
    pub fn request_payer(&self) -> ::std::option::Option<&crate::types::RequestPayer> {
        self.request_payer.as_ref()
    }
    /// <p>The account ID of the expected bucket owner.</p>
    pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
        self.expected_bucket_owner.as_deref()
    }
    /// <p>If specified, the operation only succeeds if the object's ETag matches the provided value.</p>
    pub fn object_if_match(&self) -> ::std::option::Option<&str> {
        self.object_if_match.as_deref()
    }
}
impl DeleteObjectAnnotationInput {
    /// Creates a new builder-style object to manufacture [`DeleteObjectAnnotationInput`](crate::operation::delete_object_annotation::DeleteObjectAnnotationInput).
    pub fn builder() -> crate::operation::delete_object_annotation::builders::DeleteObjectAnnotationInputBuilder {
        crate::operation::delete_object_annotation::builders::DeleteObjectAnnotationInputBuilder::default()
    }
}

/// A builder for [`DeleteObjectAnnotationInput`](crate::operation::delete_object_annotation::DeleteObjectAnnotationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteObjectAnnotationInputBuilder {
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
    pub(crate) key: ::std::option::Option<::std::string::String>,
    pub(crate) annotation_name: ::std::option::Option<::std::string::String>,
    pub(crate) version_id: ::std::option::Option<::std::string::String>,
    pub(crate) request_payer: ::std::option::Option<crate::types::RequestPayer>,
    pub(crate) expected_bucket_owner: ::std::option::Option<::std::string::String>,
    pub(crate) object_if_match: ::std::option::Option<::std::string::String>,
}
impl DeleteObjectAnnotationInputBuilder {
    /// <p>The name of the bucket that contains the object.</p>
    /// This field is required.
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the bucket that contains the object.</p>
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket = input;
        self
    }
    /// <p>The name of the bucket that contains the object.</p>
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket
    }
    /// <p>The object key.</p>
    /// This field is required.
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The object key.</p>
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key = input;
        self
    }
    /// <p>The object key.</p>
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.key
    }
    /// <p>The name of the annotation to delete. Annotation names are UTF-8 encoded and cannot start with <code>aws</code> or <code>s3</code> (case-insensitive).</p>
    /// <p>Length Constraints: Minimum length of 1. Maximum length of 512 bytes.</p>
    /// This field is required.
    pub fn annotation_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.annotation_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the annotation to delete. Annotation names are UTF-8 encoded and cannot start with <code>aws</code> or <code>s3</code> (case-insensitive).</p>
    /// <p>Length Constraints: Minimum length of 1. Maximum length of 512 bytes.</p>
    pub fn set_annotation_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.annotation_name = input;
        self
    }
    /// <p>The name of the annotation to delete. Annotation names are UTF-8 encoded and cannot start with <code>aws</code> or <code>s3</code> (case-insensitive).</p>
    /// <p>Length Constraints: Minimum length of 1. Maximum length of 512 bytes.</p>
    pub fn get_annotation_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.annotation_name
    }
    /// <p>The version ID of the object.</p>
    pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version ID of the object.</p>
    pub fn set_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_id = input;
        self
    }
    /// <p>The version ID of the object.</p>
    pub fn get_version_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_id
    }
    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
    /// <p>This functionality is not supported for directory buckets.</p>
    /// </note>
    pub fn request_payer(mut self, input: crate::types::RequestPayer) -> Self {
        self.request_payer = ::std::option::Option::Some(input);
        self
    }
    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
    /// <p>This functionality is not supported for directory buckets.</p>
    /// </note>
    pub fn set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
        self.request_payer = input;
        self
    }
    /// <p>Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html">Downloading Objects in Requester Pays Buckets</a> in the <i>Amazon S3 User Guide</i>.</p><note>
    /// <p>This functionality is not supported for directory buckets.</p>
    /// </note>
    pub fn get_request_payer(&self) -> &::std::option::Option<crate::types::RequestPayer> {
        &self.request_payer
    }
    /// <p>The account ID of the expected bucket owner.</p>
    pub fn expected_bucket_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.expected_bucket_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The account ID of the expected bucket owner.</p>
    pub fn set_expected_bucket_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.expected_bucket_owner = input;
        self
    }
    /// <p>The account ID of the expected bucket owner.</p>
    pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.expected_bucket_owner
    }
    /// <p>If specified, the operation only succeeds if the object's ETag matches the provided value.</p>
    pub fn object_if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.object_if_match = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If specified, the operation only succeeds if the object's ETag matches the provided value.</p>
    pub fn set_object_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.object_if_match = input;
        self
    }
    /// <p>If specified, the operation only succeeds if the object's ETag matches the provided value.</p>
    pub fn get_object_if_match(&self) -> &::std::option::Option<::std::string::String> {
        &self.object_if_match
    }
    /// Consumes the builder and constructs a [`DeleteObjectAnnotationInput`](crate::operation::delete_object_annotation::DeleteObjectAnnotationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::delete_object_annotation::DeleteObjectAnnotationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::delete_object_annotation::DeleteObjectAnnotationInput {
            bucket: self.bucket,
            key: self.key,
            annotation_name: self.annotation_name,
            version_id: self.version_id,
            request_payer: self.request_payer,
            expected_bucket_owner: self.expected_bucket_owner,
            object_if_match: self.object_if_match,
        })
    }
}