aws_sdk_mediastoredata/operation/get_object/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_object::_get_object_output::GetObjectOutputBuilder;
3
4pub use crate::operation::get_object::_get_object_input::GetObjectInputBuilder;
5
6impl crate::operation::get_object::builders::GetObjectInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::get_object::GetObjectOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_object::GetObjectError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_object();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetObject`.
24///
25/// <p>Downloads the object at the specified path. If the object’s upload availability is set to <code>streaming</code>, AWS Elemental MediaStore downloads the object even if it’s still uploading the object.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetObjectFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::get_object::builders::GetObjectInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>
33 for GetObjectFluentBuilder
34{
35 fn send(
36 self,
37 config_override: crate::config::Builder,
38 ) -> crate::client::customize::internal::BoxFuture<
39 crate::client::customize::internal::SendResult<crate::operation::get_object::GetObjectOutput, crate::operation::get_object::GetObjectError>,
40 > {
41 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42 }
43}
44impl GetObjectFluentBuilder {
45 /// Creates a new `GetObjectFluentBuilder`.
46 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47 Self {
48 handle,
49 inner: ::std::default::Default::default(),
50 config_override: ::std::option::Option::None,
51 }
52 }
53 /// Access the GetObject as a reference.
54 pub fn as_input(&self) -> &crate::operation::get_object::builders::GetObjectInputBuilder {
55 &self.inner
56 }
57 /// Sends the request and returns the response.
58 ///
59 /// If an error occurs, an `SdkError` will be returned with additional details that
60 /// can be matched against.
61 ///
62 /// By default, any retryable failures will be retried twice. Retry behavior
63 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
64 /// set when configuring the client.
65 pub async fn send(
66 self,
67 ) -> ::std::result::Result<
68 crate::operation::get_object::GetObjectOutput,
69 ::aws_smithy_runtime_api::client::result::SdkError<
70 crate::operation::get_object::GetObjectError,
71 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72 >,
73 > {
74 let input = self
75 .inner
76 .build()
77 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78 let runtime_plugins = crate::operation::get_object::GetObject::operation_runtime_plugins(
79 self.handle.runtime_plugins.clone(),
80 &self.handle.conf,
81 self.config_override,
82 );
83 crate::operation::get_object::GetObject::orchestrate(&runtime_plugins, input).await
84 }
85
86 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
87 pub fn customize(
88 self,
89 ) -> crate::client::customize::CustomizableOperation<
90 crate::operation::get_object::GetObjectOutput,
91 crate::operation::get_object::GetObjectError,
92 Self,
93 > {
94 crate::client::customize::CustomizableOperation::new(self)
95 }
96 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
97 self.set_config_override(::std::option::Option::Some(config_override.into()));
98 self
99 }
100
101 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
102 self.config_override = config_override;
103 self
104 }
105 /// <p>The path (including the file name) where the object is stored in the container. Format: <folder name>
106 /// /
107 /// <folder name>
108 /// /
109 /// <file name></file>
110 /// </folder>
111 /// </folder></p>
112 /// <p>For example, to upload the file <code>mlaw.avi</code> to the folder path <code>premium\canada</code> in the container <code>movies</code>, enter the path <code>premium/canada/mlaw.avi</code>.</p>
113 /// <p>Do not include the container name in this path.</p>
114 /// <p>If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing <code>premium/usa</code> subfolder. If you specify <code>premium/canada</code>, the service creates a <code>canada</code> subfolder in the <code>premium</code> folder. You then have two subfolders, <code>usa</code> and <code>canada</code>, in the <code>premium</code> folder.</p>
115 /// <p>There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore.</p>
116 /// <p>For more information about folders and how they exist in a container, see the <a href="http://docs.aws.amazon.com/mediastore/latest/ug/">AWS Elemental MediaStore User Guide</a>.</p>
117 /// <p>The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.</p>
118 pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.inner = self.inner.path(input.into());
120 self
121 }
122 /// <p>The path (including the file name) where the object is stored in the container. Format: <folder name>
123 /// /
124 /// <folder name>
125 /// /
126 /// <file name></file>
127 /// </folder>
128 /// </folder></p>
129 /// <p>For example, to upload the file <code>mlaw.avi</code> to the folder path <code>premium\canada</code> in the container <code>movies</code>, enter the path <code>premium/canada/mlaw.avi</code>.</p>
130 /// <p>Do not include the container name in this path.</p>
131 /// <p>If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing <code>premium/usa</code> subfolder. If you specify <code>premium/canada</code>, the service creates a <code>canada</code> subfolder in the <code>premium</code> folder. You then have two subfolders, <code>usa</code> and <code>canada</code>, in the <code>premium</code> folder.</p>
132 /// <p>There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore.</p>
133 /// <p>For more information about folders and how they exist in a container, see the <a href="http://docs.aws.amazon.com/mediastore/latest/ug/">AWS Elemental MediaStore User Guide</a>.</p>
134 /// <p>The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.</p>
135 pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.inner = self.inner.set_path(input);
137 self
138 }
139 /// <p>The path (including the file name) where the object is stored in the container. Format: <folder name>
140 /// /
141 /// <folder name>
142 /// /
143 /// <file name></file>
144 /// </folder>
145 /// </folder></p>
146 /// <p>For example, to upload the file <code>mlaw.avi</code> to the folder path <code>premium\canada</code> in the container <code>movies</code>, enter the path <code>premium/canada/mlaw.avi</code>.</p>
147 /// <p>Do not include the container name in this path.</p>
148 /// <p>If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing <code>premium/usa</code> subfolder. If you specify <code>premium/canada</code>, the service creates a <code>canada</code> subfolder in the <code>premium</code> folder. You then have two subfolders, <code>usa</code> and <code>canada</code>, in the <code>premium</code> folder.</p>
149 /// <p>There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore.</p>
150 /// <p>For more information about folders and how they exist in a container, see the <a href="http://docs.aws.amazon.com/mediastore/latest/ug/">AWS Elemental MediaStore User Guide</a>.</p>
151 /// <p>The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.</p>
152 pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
153 self.inner.get_path()
154 }
155 /// <p>The range bytes of an object to retrieve. For more information about the <code>Range</code> header, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>. AWS Elemental MediaStore ignores this header for partially uploaded objects that have streaming upload availability.</p>
156 pub fn range(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157 self.inner = self.inner.range(input.into());
158 self
159 }
160 /// <p>The range bytes of an object to retrieve. For more information about the <code>Range</code> header, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>. AWS Elemental MediaStore ignores this header for partially uploaded objects that have streaming upload availability.</p>
161 pub fn set_range(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162 self.inner = self.inner.set_range(input);
163 self
164 }
165 /// <p>The range bytes of an object to retrieve. For more information about the <code>Range</code> header, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35</a>. AWS Elemental MediaStore ignores this header for partially uploaded objects that have streaming upload availability.</p>
166 pub fn get_range(&self) -> &::std::option::Option<::std::string::String> {
167 self.inner.get_range()
168 }
169}