// 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 GetObjectAnnotationInput {
/// <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 retrieve.</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. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.</p>
pub expected_bucket_owner: ::std::option::Option<::std::string::String>,
/// <p>Set to <code>ENABLED</code> to validate the checksum of the annotation payload on retrieval.</p>
pub checksum_mode: ::std::option::Option<crate::types::ChecksumMode>,
}
impl GetObjectAnnotationInput {
/// <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 retrieve.</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. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.</p>
pub fn expected_bucket_owner(&self) -> ::std::option::Option<&str> {
self.expected_bucket_owner.as_deref()
}
/// <p>Set to <code>ENABLED</code> to validate the checksum of the annotation payload on retrieval.</p>
pub fn checksum_mode(&self) -> ::std::option::Option<&crate::types::ChecksumMode> {
self.checksum_mode.as_ref()
}
}
impl GetObjectAnnotationInput {
/// Creates a new builder-style object to manufacture [`GetObjectAnnotationInput`](crate::operation::get_object_annotation::GetObjectAnnotationInput).
pub fn builder() -> crate::operation::get_object_annotation::builders::GetObjectAnnotationInputBuilder {
crate::operation::get_object_annotation::builders::GetObjectAnnotationInputBuilder::default()
}
}
/// A builder for [`GetObjectAnnotationInput`](crate::operation::get_object_annotation::GetObjectAnnotationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetObjectAnnotationInputBuilder {
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) checksum_mode: ::std::option::Option<crate::types::ChecksumMode>,
}
impl GetObjectAnnotationInputBuilder {
/// <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 retrieve.</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 retrieve.</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 retrieve.</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. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.</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. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.</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. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.</p>
pub fn get_expected_bucket_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.expected_bucket_owner
}
/// <p>Set to <code>ENABLED</code> to validate the checksum of the annotation payload on retrieval.</p>
pub fn checksum_mode(mut self, input: crate::types::ChecksumMode) -> Self {
self.checksum_mode = ::std::option::Option::Some(input);
self
}
/// <p>Set to <code>ENABLED</code> to validate the checksum of the annotation payload on retrieval.</p>
pub fn set_checksum_mode(mut self, input: ::std::option::Option<crate::types::ChecksumMode>) -> Self {
self.checksum_mode = input;
self
}
/// <p>Set to <code>ENABLED</code> to validate the checksum of the annotation payload on retrieval.</p>
pub fn get_checksum_mode(&self) -> &::std::option::Option<crate::types::ChecksumMode> {
&self.checksum_mode
}
/// Consumes the builder and constructs a [`GetObjectAnnotationInput`](crate::operation::get_object_annotation::GetObjectAnnotationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_object_annotation::GetObjectAnnotationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_object_annotation::GetObjectAnnotationInput {
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,
checksum_mode: self.checksum_mode,
})
}
}