aws_sdk_elastictranscoder/operation/create_preset/
builders.rs1pub use crate::operation::create_preset::_create_preset_output::CreatePresetOutputBuilder;
3
4pub use crate::operation::create_preset::_create_preset_input::CreatePresetInputBuilder;
5
6impl crate::operation::create_preset::builders::CreatePresetInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_preset::CreatePresetOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_preset::CreatePresetError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_preset();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct CreatePresetFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::create_preset::builders::CreatePresetInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::create_preset::CreatePresetOutput,
38 crate::operation::create_preset::CreatePresetError,
39 > for CreatePresetFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::create_preset::CreatePresetOutput,
47 crate::operation::create_preset::CreatePresetError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl CreatePresetFluentBuilder {
54 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 pub fn as_input(&self) -> &crate::operation::create_preset::builders::CreatePresetInputBuilder {
64 &self.inner
65 }
66 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::create_preset::CreatePresetOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::create_preset::CreatePresetError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::create_preset::CreatePreset::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::create_preset::CreatePreset::orchestrate(&runtime_plugins, input).await
93 }
94
95 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::create_preset::CreatePresetOutput,
100 crate::operation::create_preset::CreatePresetError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.inner = self.inner.name(input.into());
117 self
118 }
119 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.inner = self.inner.set_name(input);
122 self
123 }
124 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126 self.inner.get_name()
127 }
128 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.inner = self.inner.description(input.into());
131 self
132 }
133 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.inner = self.inner.set_description(input);
136 self
137 }
138 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140 self.inner.get_description()
141 }
142 pub fn container(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.inner = self.inner.container(input.into());
145 self
146 }
147 pub fn set_container(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.inner = self.inner.set_container(input);
150 self
151 }
152 pub fn get_container(&self) -> &::std::option::Option<::std::string::String> {
154 self.inner.get_container()
155 }
156 pub fn video(mut self, input: crate::types::VideoParameters) -> Self {
158 self.inner = self.inner.video(input);
159 self
160 }
161 pub fn set_video(mut self, input: ::std::option::Option<crate::types::VideoParameters>) -> Self {
163 self.inner = self.inner.set_video(input);
164 self
165 }
166 pub fn get_video(&self) -> &::std::option::Option<crate::types::VideoParameters> {
168 self.inner.get_video()
169 }
170 pub fn audio(mut self, input: crate::types::AudioParameters) -> Self {
172 self.inner = self.inner.audio(input);
173 self
174 }
175 pub fn set_audio(mut self, input: ::std::option::Option<crate::types::AudioParameters>) -> Self {
177 self.inner = self.inner.set_audio(input);
178 self
179 }
180 pub fn get_audio(&self) -> &::std::option::Option<crate::types::AudioParameters> {
182 self.inner.get_audio()
183 }
184 pub fn thumbnails(mut self, input: crate::types::Thumbnails) -> Self {
186 self.inner = self.inner.thumbnails(input);
187 self
188 }
189 pub fn set_thumbnails(mut self, input: ::std::option::Option<crate::types::Thumbnails>) -> Self {
191 self.inner = self.inner.set_thumbnails(input);
192 self
193 }
194 pub fn get_thumbnails(&self) -> &::std::option::Option<crate::types::Thumbnails> {
196 self.inner.get_thumbnails()
197 }
198}