aws-sdk-sagemaker 1.193.0

AWS SDK for Amazon SageMaker Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateInferenceComponentInput {
    /// <p>The name of the inference component.</p>
    pub inference_component_name: ::std::option::Option<::std::string::String>,
    /// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
    pub specification: ::std::option::Option<crate::types::InferenceComponentSpecification>,
    /// <p>Runtime settings for a model that is deployed with an inference component.</p>
    pub runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>,
    /// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
    pub deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
}
impl UpdateInferenceComponentInput {
    /// <p>The name of the inference component.</p>
    pub fn inference_component_name(&self) -> ::std::option::Option<&str> {
        self.inference_component_name.as_deref()
    }
    /// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
    pub fn specification(&self) -> ::std::option::Option<&crate::types::InferenceComponentSpecification> {
        self.specification.as_ref()
    }
    /// <p>Runtime settings for a model that is deployed with an inference component.</p>
    pub fn runtime_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentRuntimeConfig> {
        self.runtime_config.as_ref()
    }
    /// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
    pub fn deployment_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentDeploymentConfig> {
        self.deployment_config.as_ref()
    }
}
impl UpdateInferenceComponentInput {
    /// Creates a new builder-style object to manufacture [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
    pub fn builder() -> crate::operation::update_inference_component::builders::UpdateInferenceComponentInputBuilder {
        crate::operation::update_inference_component::builders::UpdateInferenceComponentInputBuilder::default()
    }
}

/// A builder for [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateInferenceComponentInputBuilder {
    pub(crate) inference_component_name: ::std::option::Option<::std::string::String>,
    pub(crate) specification: ::std::option::Option<crate::types::InferenceComponentSpecification>,
    pub(crate) runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>,
    pub(crate) deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
}
impl UpdateInferenceComponentInputBuilder {
    /// <p>The name of the inference component.</p>
    /// This field is required.
    pub fn inference_component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inference_component_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the inference component.</p>
    pub fn set_inference_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inference_component_name = input;
        self
    }
    /// <p>The name of the inference component.</p>
    pub fn get_inference_component_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_component_name
    }
    /// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
    pub fn specification(mut self, input: crate::types::InferenceComponentSpecification) -> Self {
        self.specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
    pub fn set_specification(mut self, input: ::std::option::Option<crate::types::InferenceComponentSpecification>) -> Self {
        self.specification = input;
        self
    }
    /// <p>Details about the resources to deploy with this inference component, including the model, container, and compute resources.</p>
    pub fn get_specification(&self) -> &::std::option::Option<crate::types::InferenceComponentSpecification> {
        &self.specification
    }
    /// <p>Runtime settings for a model that is deployed with an inference component.</p>
    pub fn runtime_config(mut self, input: crate::types::InferenceComponentRuntimeConfig) -> Self {
        self.runtime_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Runtime settings for a model that is deployed with an inference component.</p>
    pub fn set_runtime_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentRuntimeConfig>) -> Self {
        self.runtime_config = input;
        self
    }
    /// <p>Runtime settings for a model that is deployed with an inference component.</p>
    pub fn get_runtime_config(&self) -> &::std::option::Option<crate::types::InferenceComponentRuntimeConfig> {
        &self.runtime_config
    }
    /// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
    pub fn deployment_config(mut self, input: crate::types::InferenceComponentDeploymentConfig) -> Self {
        self.deployment_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
    pub fn set_deployment_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>) -> Self {
        self.deployment_config = input;
        self
    }
    /// <p>The deployment configuration for the inference component. The configuration contains the desired deployment strategy and rollback settings.</p>
    pub fn get_deployment_config(&self) -> &::std::option::Option<crate::types::InferenceComponentDeploymentConfig> {
        &self.deployment_config
    }
    /// Consumes the builder and constructs a [`UpdateInferenceComponentInput`](crate::operation::update_inference_component::UpdateInferenceComponentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_inference_component::UpdateInferenceComponentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_inference_component::UpdateInferenceComponentInput {
            inference_component_name: self.inference_component_name,
            specification: self.specification,
            runtime_config: self.runtime_config,
            deployment_config: self.deployment_config,
        })
    }
}