// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_project::_update_project_input::UpdateProjectInputBuilder;
pub use crate::operation::update_project::_update_project_output::UpdateProjectOutputBuilder;
impl crate::operation::update_project::builders::UpdateProjectInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::update_project::UpdateProjectOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_project::UpdateProjectError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.update_project();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `UpdateProject`.
///
/// <p>Updates a machine learning (ML) project that is created from a template that sets up an ML pipeline from training to deploying an approved model.</p><note>
/// <p>You must not update a project that is in use. If you update the <code>ServiceCatalogProvisioningUpdateDetails</code> of a project that is active or being created, or updated, you may lose resources already created by the project.</p>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateProjectFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::update_project::builders::UpdateProjectInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::update_project::UpdateProjectOutput,
crate::operation::update_project::UpdateProjectError,
> for UpdateProjectFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::update_project::UpdateProjectOutput,
crate::operation::update_project::UpdateProjectError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl UpdateProjectFluentBuilder {
/// Creates a new `UpdateProjectFluentBuilder`.
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 UpdateProject as a reference.
pub fn as_input(&self) -> &crate::operation::update_project::builders::UpdateProjectInputBuilder {
&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::update_project::UpdateProjectOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::update_project::UpdateProjectError,
::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::update_project::UpdateProject::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::update_project::UpdateProject::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::update_project::UpdateProjectOutput,
crate::operation::update_project::UpdateProjectError,
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 name of the project.</p>
pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.project_name(input.into());
self
}
/// <p>The name of the project.</p>
pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_project_name(input);
self
}
/// <p>The name of the project.</p>
pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_project_name()
}
/// <p>The description for the project.</p>
pub fn project_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.project_description(input.into());
self
}
/// <p>The description for the project.</p>
pub fn set_project_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_project_description(input);
self
}
/// <p>The description for the project.</p>
pub fn get_project_description(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_project_description()
}
/// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
pub fn service_catalog_provisioning_update_details(mut self, input: crate::types::ServiceCatalogProvisioningUpdateDetails) -> Self {
self.inner = self.inner.service_catalog_provisioning_update_details(input);
self
}
/// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
pub fn set_service_catalog_provisioning_update_details(
mut self,
input: ::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails>,
) -> Self {
self.inner = self.inner.set_service_catalog_provisioning_update_details(input);
self
}
/// <p>The product ID and provisioning artifact ID to provision a service catalog. The provisioning artifact ID will default to the latest provisioning artifact ID of the product, if you don't provide the provisioning artifact ID. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/introduction.html">What is Amazon Web Services Service Catalog</a>.</p>
pub fn get_service_catalog_provisioning_update_details(&self) -> &::std::option::Option<crate::types::ServiceCatalogProvisioningUpdateDetails> {
self.inner.get_service_catalog_provisioning_update_details()
}
///
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a>. In addition, the project must have tag update constraints set in order to include this parameter in the request. For more information, see <a href="https://docs.aws.amazon.com/servicecatalog/latest/adminguide/constraints-resourceupdate.html">Amazon Web Services Service Catalog Tag Update Constraints</a>.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
self.inner.get_tags()
}
///
/// Appends an item to `TemplateProvidersToUpdate`.
///
/// To override the contents of this collection use [`set_template_providers_to_update`](Self::set_template_providers_to_update).
///
/// <p>The template providers to update in the project.</p>
pub fn template_providers_to_update(mut self, input: crate::types::UpdateTemplateProvider) -> Self {
self.inner = self.inner.template_providers_to_update(input);
self
}
/// <p>The template providers to update in the project.</p>
pub fn set_template_providers_to_update(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>>) -> Self {
self.inner = self.inner.set_template_providers_to_update(input);
self
}
/// <p>The template providers to update in the project.</p>
pub fn get_template_providers_to_update(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UpdateTemplateProvider>> {
self.inner.get_template_providers_to_update()
}
}