// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::delete_ontology_induction::_delete_ontology_induction_input::DeleteOntologyInductionInputBuilder;
pub use crate::operation::delete_ontology_induction::_delete_ontology_induction_output::DeleteOntologyInductionOutputBuilder;
impl crate::operation::delete_ontology_induction::builders::DeleteOntologyInductionInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::delete_ontology_induction::DeleteOntologyInductionOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_ontology_induction::DeleteOntologyInductionError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.delete_ontology_induction();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `DeleteOntologyInduction`.
///
/// <p>Deletes an ontology induction. You can delete a <code>FAILED</code> or <code>CANCELLED</code> induction, or one whose ontology is <code>PUBLISHED</code> or was deleted after it was published. While the induction is <code>INDUCING</code>, or while its ontology is still a <code>DRAFT</code>, the request fails with <code>ConflictException</code>. To stop a running induction, call CancelOntologyInduction first. To delete a draft ontology and its induction together, call DeleteOntology. Deleting an induction doesn't change its published ontology.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DeleteOntologyInductionFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::delete_ontology_induction::builders::DeleteOntologyInductionInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::delete_ontology_induction::DeleteOntologyInductionOutput,
crate::operation::delete_ontology_induction::DeleteOntologyInductionError,
> for DeleteOntologyInductionFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::delete_ontology_induction::DeleteOntologyInductionOutput,
crate::operation::delete_ontology_induction::DeleteOntologyInductionError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl DeleteOntologyInductionFluentBuilder {
/// Creates a new `DeleteOntologyInductionFluentBuilder`.
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 DeleteOntologyInduction as a reference.
pub fn as_input(&self) -> &crate::operation::delete_ontology_induction::builders::DeleteOntologyInductionInputBuilder {
&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::delete_ontology_induction::DeleteOntologyInductionOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::delete_ontology_induction::DeleteOntologyInductionError,
::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::delete_ontology_induction::DeleteOntologyInduction::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::delete_ontology_induction::DeleteOntologyInduction::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::delete_ontology_induction::DeleteOntologyInductionOutput,
crate::operation::delete_ontology_induction::DeleteOntologyInductionError,
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
}
/// <p>The ID or Amazon Resource Name (ARN) of the ontology induction to delete.</p>
pub fn ontology_induction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.ontology_induction_id(input.into());
self
}
/// <p>The ID or Amazon Resource Name (ARN) of the ontology induction to delete.</p>
pub fn set_ontology_induction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_ontology_induction_id(input);
self
}
/// <p>The ID or Amazon Resource Name (ARN) of the ontology induction to delete.</p>
pub fn get_ontology_induction_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_ontology_induction_id()
}
}