aws-sdk-sagemaker 1.196.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 CreateInferenceComponentInput {
    /// <p>A unique name to assign to the inference component.</p>
    pub inference_component_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of an existing endpoint where you host the inference component.</p>
    pub endpoint_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of an existing production variant where you host the inference component.</p>
    pub variant_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>A list of key-value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInferenceComponentInput {
    /// <p>A unique name to assign to the inference component.</p>
    pub fn inference_component_name(&self) -> ::std::option::Option<&str> {
        self.inference_component_name.as_deref()
    }
    /// <p>The name of an existing endpoint where you host the inference component.</p>
    pub fn endpoint_name(&self) -> ::std::option::Option<&str> {
        self.endpoint_name.as_deref()
    }
    /// <p>The name of an existing production variant where you host the inference component.</p>
    pub fn variant_name(&self) -> ::std::option::Option<&str> {
        self.variant_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>A list of key-value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateInferenceComponentInput {
    /// Creates a new builder-style object to manufacture [`CreateInferenceComponentInput`](crate::operation::create_inference_component::CreateInferenceComponentInput).
    pub fn builder() -> crate::operation::create_inference_component::builders::CreateInferenceComponentInputBuilder {
        crate::operation::create_inference_component::builders::CreateInferenceComponentInputBuilder::default()
    }
}

/// A builder for [`CreateInferenceComponentInput`](crate::operation::create_inference_component::CreateInferenceComponentInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateInferenceComponentInputBuilder {
    pub(crate) inference_component_name: ::std::option::Option<::std::string::String>,
    pub(crate) endpoint_name: ::std::option::Option<::std::string::String>,
    pub(crate) variant_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) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateInferenceComponentInputBuilder {
    /// <p>A unique name to assign to 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>A unique name to assign to 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>A unique name to assign to the inference component.</p>
    pub fn get_inference_component_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_component_name
    }
    /// <p>The name of an existing endpoint where you host the inference component.</p>
    /// This field is required.
    pub fn endpoint_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of an existing endpoint where you host the inference component.</p>
    pub fn set_endpoint_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint_name = input;
        self
    }
    /// <p>The name of an existing endpoint where you host the inference component.</p>
    pub fn get_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_name
    }
    /// <p>The name of an existing production variant where you host the inference component.</p>
    pub fn variant_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.variant_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of an existing production variant where you host the inference component.</p>
    pub fn set_variant_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.variant_name = input;
        self
    }
    /// <p>The name of an existing production variant where you host the inference component.</p>
    pub fn get_variant_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.variant_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
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of key-value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of key-value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A list of key-value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference</i>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateInferenceComponentInput`](crate::operation::create_inference_component::CreateInferenceComponentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_inference_component::CreateInferenceComponentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_inference_component::CreateInferenceComponentInput {
            inference_component_name: self.inference_component_name,
            endpoint_name: self.endpoint_name,
            variant_name: self.variant_name,
            specification: self.specification,
            runtime_config: self.runtime_config,
            tags: self.tags,
        })
    }
}