pub use crate::operation::invoke_agent_runtime_command::_invoke_agent_runtime_command_input::InvokeAgentRuntimeCommandInputBuilder;
pub use crate::operation::invoke_agent_runtime_command::_invoke_agent_runtime_command_output::InvokeAgentRuntimeCommandOutputBuilder;
impl crate::operation::invoke_agent_runtime_command::builders::InvokeAgentRuntimeCommandInputBuilder {
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.invoke_agent_runtime_command();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct InvokeAgentRuntimeCommandFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::invoke_agent_runtime_command::builders::InvokeAgentRuntimeCommandInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandOutput,
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
> for InvokeAgentRuntimeCommandFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandOutput,
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl InvokeAgentRuntimeCommandFluentBuilder {
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,
}
}
pub fn as_input(&self) -> &crate::operation::invoke_agent_runtime_command::builders::InvokeAgentRuntimeCommandInputBuilder {
&self.inner
}
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
::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::invoke_agent_runtime_command::InvokeAgentRuntimeCommand::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
let mut output = crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommand::orchestrate(&runtime_plugins, input).await?;
fn response_error(
err: impl ::std::convert::Into<::aws_smithy_runtime_api::box_error::BoxError>,
) -> ::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
> {
::aws_smithy_runtime_api::client::result::SdkError::response_error(
err,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse::new(
::aws_smithy_runtime_api::http::StatusCode::try_from(200).expect("valid successful code"),
::aws_smithy_types::body::SdkBody::empty(),
),
)
}
let message = output.stream.try_recv_initial_response().await.map_err(response_error)?;
match message {
::std::option::Option::Some(_message) => ::std::result::Result::Ok(output),
::std::option::Option::None => ::std::result::Result::Ok(output),
}
}
pub fn customize(
self,
) -> crate::client::customize::CustomizableOperation<
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandOutput,
crate::operation::invoke_agent_runtime_command::InvokeAgentRuntimeCommandError,
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
}
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.content_type(input.into());
self
}
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_content_type(input);
self
}
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_content_type()
}
pub fn accept(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.accept(input.into());
self
}
pub fn set_accept(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_accept(input);
self
}
pub fn get_accept(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_accept()
}
pub fn runtime_session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.runtime_session_id(input.into());
self
}
pub fn set_runtime_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_runtime_session_id(input);
self
}
pub fn get_runtime_session_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_runtime_session_id()
}
pub fn trace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.trace_id(input.into());
self
}
pub fn set_trace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_trace_id(input);
self
}
pub fn get_trace_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_trace_id()
}
pub fn trace_parent(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.trace_parent(input.into());
self
}
pub fn set_trace_parent(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_trace_parent(input);
self
}
pub fn get_trace_parent(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_trace_parent()
}
pub fn trace_state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.trace_state(input.into());
self
}
pub fn set_trace_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_trace_state(input);
self
}
pub fn get_trace_state(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_trace_state()
}
pub fn baggage(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.baggage(input.into());
self
}
pub fn set_baggage(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_baggage(input);
self
}
pub fn get_baggage(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_baggage()
}
pub fn agent_runtime_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.agent_runtime_arn(input.into());
self
}
pub fn set_agent_runtime_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_agent_runtime_arn(input);
self
}
pub fn get_agent_runtime_arn(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_agent_runtime_arn()
}
pub fn qualifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.qualifier(input.into());
self
}
pub fn set_qualifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_qualifier(input);
self
}
pub fn get_qualifier(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_qualifier()
}
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.account_id(input.into());
self
}
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_account_id(input);
self
}
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_account_id()
}
pub fn body(mut self, input: crate::types::InvokeAgentRuntimeCommandRequestBody) -> Self {
self.inner = self.inner.body(input);
self
}
pub fn set_body(mut self, input: ::std::option::Option<crate::types::InvokeAgentRuntimeCommandRequestBody>) -> Self {
self.inner = self.inner.set_body(input);
self
}
pub fn get_body(&self) -> &::std::option::Option<crate::types::InvokeAgentRuntimeCommandRequestBody> {
self.inner.get_body()
}
}