// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::list_object_annotations::_list_object_annotations_input::ListObjectAnnotationsInputBuilder;
pub use crate::operation::list_object_annotations::_list_object_annotations_output::ListObjectAnnotationsOutputBuilder;
impl crate::operation::list_object_annotations::builders::ListObjectAnnotationsInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::list_object_annotations::ListObjectAnnotationsOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_object_annotations::ListObjectAnnotationsError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.list_object_annotations();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `ListObjectAnnotations`.
///
/// <p>Lists the annotations attached to an Amazon S3 object. Results are paginated, with a maximum of 1,000 annotations per object. Use the <code>AnnotationPrefix</code> parameter to filter the results by name prefix.</p>
/// <p>To use this operation, you must have the <code>s3:ListObjectAnnotations</code> permission.</p><note>
/// <p>Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon S3 File Gateway, Amazon FSx, S3 on Outposts, and S3 Express One Zone (directory buckets).</p>
/// </note>
/// <p>The following operations are related to <code>ListObjectAnnotations</code>:</p>
/// <ul>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAnnotation.html">PutObjectAnnotation</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAnnotation.html">GetObjectAnnotation</a></p></li>
/// <li>
/// <p><a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectAnnotation.html">DeleteObjectAnnotation</a></p></li>
/// </ul>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct ListObjectAnnotationsFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::list_object_annotations::builders::ListObjectAnnotationsInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::list_object_annotations::ListObjectAnnotationsOutput,
crate::operation::list_object_annotations::ListObjectAnnotationsError,
> for ListObjectAnnotationsFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::list_object_annotations::ListObjectAnnotationsOutput,
crate::operation::list_object_annotations::ListObjectAnnotationsError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl ListObjectAnnotationsFluentBuilder {
/// Creates a new `ListObjectAnnotationsFluentBuilder`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the ListObjectAnnotations as a reference.
pub fn as_input(&self) -> &crate::operation::list_object_annotations::builders::ListObjectAnnotationsInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::list_object_annotations::ListObjectAnnotationsOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::list_object_annotations::ListObjectAnnotationsError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self
.inner
.build()
.map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::list_object_annotations::ListObjectAnnotations::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::list_object_annotations::ListObjectAnnotations::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being sent.
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::list_object_annotations::ListObjectAnnotationsOutput,
crate::operation::list_object_annotations::ListObjectAnnotationsError,
Self,
> {
crate::client::customize::CustomizableOperation::new(self)
}
pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
self.set_config_override(::std::option::Option::Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// Create a paginator for this request
///
/// Paginators are used by calling [`send().await`](crate::operation::list_object_annotations::paginator::ListObjectAnnotationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
pub fn into_paginator(self) -> crate::operation::list_object_annotations::paginator::ListObjectAnnotationsPaginator {
crate::operation::list_object_annotations::paginator::ListObjectAnnotationsPaginator::new(self.handle, self.inner)
}
/// <p>The name of the bucket that contains the object.</p>
pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.bucket(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.inner = self.inner.set_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.inner.get_bucket()
}
/// <p>The object key.</p>
pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.key(input.into());
self
}
/// <p>The object key.</p>
pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_key(input);
self
}
/// <p>The object key.</p>
pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_key()
}
/// <p>The version ID of the object.</p>
pub fn version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.version_id(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.inner = self.inner.set_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.inner.get_version_id()
}
/// <p>The maximum number of annotations to return in the response. Maximum is 1,000.</p>
pub fn max_annotation_results(mut self, input: i32) -> Self {
self.inner = self.inner.max_annotation_results(input);
self
}
/// <p>The maximum number of annotations to return in the response. Maximum is 1,000.</p>
pub fn set_max_annotation_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.inner = self.inner.set_max_annotation_results(input);
self
}
/// <p>The maximum number of annotations to return in the response. Maximum is 1,000.</p>
pub fn get_max_annotation_results(&self) -> &::std::option::Option<i32> {
self.inner.get_max_annotation_results()
}
/// <p>Filter results to annotations whose name begins with the specified prefix.</p>
pub fn annotation_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.annotation_prefix(input.into());
self
}
/// <p>Filter results to annotations whose name begins with the specified prefix.</p>
pub fn set_annotation_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_annotation_prefix(input);
self
}
/// <p>Filter results to annotations whose name begins with the specified prefix.</p>
pub fn get_annotation_prefix(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_annotation_prefix()
}
/// <p>Continuation token returned by a previous request to retrieve the next page.</p>
pub fn continuation_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.continuation_token(input.into());
self
}
/// <p>Continuation token returned by a previous request to retrieve the next page.</p>
pub fn set_continuation_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_continuation_token(input);
self
}
/// <p>Continuation token returned by a previous request to retrieve the next page.</p>
pub fn get_continuation_token(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_continuation_token()
}
/// <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.inner = self.inner.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 set_request_payer(mut self, input: ::std::option::Option<crate::types::RequestPayer>) -> Self {
self.inner = self.inner.set_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.inner.get_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.inner = self.inner.expected_bucket_owner(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.inner = self.inner.set_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.inner.get_expected_bucket_owner()
}
}