aws_sdk_cloudhsm/operation/create_hsm/
builders.rs1pub use crate::operation::create_hsm::_create_hsm_output::CreateHsmOutputBuilder;
3
4pub use crate::operation::create_hsm::_create_hsm_input::CreateHsmInputBuilder;
5
6impl crate::operation::create_hsm::builders::CreateHsmInputBuilder {
7 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_hsm::CreateHsmOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_hsm::CreateHsmError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_hsm();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23#[deprecated(note = "This API is deprecated.")]
32#[derive(::std::clone::Clone, ::std::fmt::Debug)]
33pub struct CreateHsmFluentBuilder {
34 handle: ::std::sync::Arc<crate::client::Handle>,
35 inner: crate::operation::create_hsm::builders::CreateHsmInputBuilder,
36 config_override: ::std::option::Option<crate::config::Builder>,
37}
38impl crate::client::customize::internal::CustomizableSend<crate::operation::create_hsm::CreateHsmOutput, crate::operation::create_hsm::CreateHsmError>
39 for CreateHsmFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<crate::operation::create_hsm::CreateHsmOutput, crate::operation::create_hsm::CreateHsmError>,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateHsmFluentBuilder {
51 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 pub fn as_input(&self) -> &crate::operation::create_hsm::builders::CreateHsmInputBuilder {
61 &self.inner
62 }
63 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::create_hsm::CreateHsmOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_hsm::CreateHsmError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::create_hsm::CreateHsm::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_hsm::CreateHsm::orchestrate(&runtime_plugins, input).await
90 }
91
92 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::create_hsm::CreateHsmOutput,
97 crate::operation::create_hsm::CreateHsmError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 pub fn subnet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.subnet_id(input.into());
114 self
115 }
116 pub fn set_subnet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_subnet_id(input);
119 self
120 }
121 pub fn get_subnet_id(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_subnet_id()
124 }
125 pub fn ssh_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.ssh_key(input.into());
128 self
129 }
130 pub fn set_ssh_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_ssh_key(input);
133 self
134 }
135 pub fn get_ssh_key(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_ssh_key()
138 }
139 pub fn eni_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.inner = self.inner.eni_ip(input.into());
143 self
144 }
145 pub fn set_eni_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148 self.inner = self.inner.set_eni_ip(input);
149 self
150 }
151 pub fn get_eni_ip(&self) -> &::std::option::Option<::std::string::String> {
154 self.inner.get_eni_ip()
155 }
156 pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.inner = self.inner.iam_role_arn(input.into());
159 self
160 }
161 pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.inner = self.inner.set_iam_role_arn(input);
164 self
165 }
166 pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
168 self.inner.get_iam_role_arn()
169 }
170 pub fn external_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172 self.inner = self.inner.external_id(input.into());
173 self
174 }
175 pub fn set_external_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
177 self.inner = self.inner.set_external_id(input);
178 self
179 }
180 pub fn get_external_id(&self) -> &::std::option::Option<::std::string::String> {
182 self.inner.get_external_id()
183 }
184 pub fn subscription_type(mut self, input: crate::types::SubscriptionType) -> Self {
192 self.inner = self.inner.subscription_type(input);
193 self
194 }
195 pub fn set_subscription_type(mut self, input: ::std::option::Option<crate::types::SubscriptionType>) -> Self {
203 self.inner = self.inner.set_subscription_type(input);
204 self
205 }
206 pub fn get_subscription_type(&self) -> &::std::option::Option<crate::types::SubscriptionType> {
214 self.inner.get_subscription_type()
215 }
216 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
218 self.inner = self.inner.client_token(input.into());
219 self
220 }
221 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.inner = self.inner.set_client_token(input);
224 self
225 }
226 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
228 self.inner.get_client_token()
229 }
230 pub fn syslog_ip(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232 self.inner = self.inner.syslog_ip(input.into());
233 self
234 }
235 pub fn set_syslog_ip(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.inner = self.inner.set_syslog_ip(input);
238 self
239 }
240 pub fn get_syslog_ip(&self) -> &::std::option::Option<::std::string::String> {
242 self.inner.get_syslog_ip()
243 }
244}