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 DescribeModelOutput {
    /// <p>Name of the SageMaker model.</p>
    pub model_name: ::std::option::Option<::std::string::String>,
    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
    pub primary_container: ::std::option::Option<crate::types::ContainerDefinition>,
    /// <p>The containers in the inference pipeline.</p>
    pub containers: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>,
    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
    pub inference_execution_config: ::std::option::Option<crate::types::InferenceExecutionConfig>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
    pub execution_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
    /// <p>A timestamp that shows when the model was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Resource Name (ARN) of the model.</p>
    pub model_arn: ::std::option::Option<::std::string::String>,
    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
    pub enable_network_isolation: ::std::option::Option<bool>,
    /// <p>A set of recommended deployment configurations for the model.</p>
    pub deployment_recommendation: ::std::option::Option<crate::types::DeploymentRecommendation>,
    _request_id: Option<String>,
}
impl DescribeModelOutput {
    /// <p>Name of the SageMaker model.</p>
    pub fn model_name(&self) -> ::std::option::Option<&str> {
        self.model_name.as_deref()
    }
    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
    pub fn primary_container(&self) -> ::std::option::Option<&crate::types::ContainerDefinition> {
        self.primary_container.as_ref()
    }
    /// <p>The containers in the inference pipeline.</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 `.containers.is_none()`.
    pub fn containers(&self) -> &[crate::types::ContainerDefinition] {
        self.containers.as_deref().unwrap_or_default()
    }
    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
    pub fn inference_execution_config(&self) -> ::std::option::Option<&crate::types::InferenceExecutionConfig> {
        self.inference_execution_config.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
    pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
        self.execution_role_arn.as_deref()
    }
    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
        self.vpc_config.as_ref()
    }
    /// <p>A timestamp that shows when the model was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the model.</p>
    pub fn model_arn(&self) -> ::std::option::Option<&str> {
        self.model_arn.as_deref()
    }
    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
    pub fn enable_network_isolation(&self) -> ::std::option::Option<bool> {
        self.enable_network_isolation
    }
    /// <p>A set of recommended deployment configurations for the model.</p>
    pub fn deployment_recommendation(&self) -> ::std::option::Option<&crate::types::DeploymentRecommendation> {
        self.deployment_recommendation.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeModelOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeModelOutput {
    /// Creates a new builder-style object to manufacture [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
    pub fn builder() -> crate::operation::describe_model::builders::DescribeModelOutputBuilder {
        crate::operation::describe_model::builders::DescribeModelOutputBuilder::default()
    }
}

/// A builder for [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeModelOutputBuilder {
    pub(crate) model_name: ::std::option::Option<::std::string::String>,
    pub(crate) primary_container: ::std::option::Option<crate::types::ContainerDefinition>,
    pub(crate) containers: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>,
    pub(crate) inference_execution_config: ::std::option::Option<crate::types::InferenceExecutionConfig>,
    pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) enable_network_isolation: ::std::option::Option<bool>,
    pub(crate) deployment_recommendation: ::std::option::Option<crate::types::DeploymentRecommendation>,
    _request_id: Option<String>,
}
impl DescribeModelOutputBuilder {
    /// <p>Name of the SageMaker model.</p>
    /// This field is required.
    pub fn model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of the SageMaker model.</p>
    pub fn set_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_name = input;
        self
    }
    /// <p>Name of the SageMaker model.</p>
    pub fn get_model_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_name
    }
    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
    pub fn primary_container(mut self, input: crate::types::ContainerDefinition) -> Self {
        self.primary_container = ::std::option::Option::Some(input);
        self
    }
    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
    pub fn set_primary_container(mut self, input: ::std::option::Option<crate::types::ContainerDefinition>) -> Self {
        self.primary_container = input;
        self
    }
    /// <p>The location of the primary inference code, associated artifacts, and custom environment map that the inference code uses when it is deployed in production.</p>
    pub fn get_primary_container(&self) -> &::std::option::Option<crate::types::ContainerDefinition> {
        &self.primary_container
    }
    /// Appends an item to `containers`.
    ///
    /// To override the contents of this collection use [`set_containers`](Self::set_containers).
    ///
    /// <p>The containers in the inference pipeline.</p>
    pub fn containers(mut self, input: crate::types::ContainerDefinition) -> Self {
        let mut v = self.containers.unwrap_or_default();
        v.push(input);
        self.containers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The containers in the inference pipeline.</p>
    pub fn set_containers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>>) -> Self {
        self.containers = input;
        self
    }
    /// <p>The containers in the inference pipeline.</p>
    pub fn get_containers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContainerDefinition>> {
        &self.containers
    }
    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
    pub fn inference_execution_config(mut self, input: crate::types::InferenceExecutionConfig) -> Self {
        self.inference_execution_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
    pub fn set_inference_execution_config(mut self, input: ::std::option::Option<crate::types::InferenceExecutionConfig>) -> Self {
        self.inference_execution_config = input;
        self
    }
    /// <p>Specifies details of how containers in a multi-container endpoint are called.</p>
    pub fn get_inference_execution_config(&self) -> &::std::option::Option<crate::types::InferenceExecutionConfig> {
        &self.inference_execution_config
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specified for the model.</p>
    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_role_arn
    }
    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
        self.vpc_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
        self.vpc_config = input;
        self
    }
    /// <p>A <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_VpcConfig.html">VpcConfig</a> object that specifies the VPC that this model has access to. For more information, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/host-vpc.html">Protect Endpoints by Using an Amazon Virtual Private Cloud</a></p>
    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
        &self.vpc_config
    }
    /// <p>A timestamp that shows when the model was created.</p>
    /// This field is required.
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>A timestamp that shows when the model was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>A timestamp that shows when the model was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The Amazon Resource Name (ARN) of the model.</p>
    /// This field is required.
    pub fn model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the model.</p>
    pub fn set_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the model.</p>
    pub fn get_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_arn
    }
    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
    pub fn enable_network_isolation(mut self, input: bool) -> Self {
        self.enable_network_isolation = ::std::option::Option::Some(input);
        self
    }
    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
    pub fn set_enable_network_isolation(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_network_isolation = input;
        self
    }
    /// <p>If <code>True</code>, no inbound or outbound network calls can be made to or from the model container.</p>
    pub fn get_enable_network_isolation(&self) -> &::std::option::Option<bool> {
        &self.enable_network_isolation
    }
    /// <p>A set of recommended deployment configurations for the model.</p>
    pub fn deployment_recommendation(mut self, input: crate::types::DeploymentRecommendation) -> Self {
        self.deployment_recommendation = ::std::option::Option::Some(input);
        self
    }
    /// <p>A set of recommended deployment configurations for the model.</p>
    pub fn set_deployment_recommendation(mut self, input: ::std::option::Option<crate::types::DeploymentRecommendation>) -> Self {
        self.deployment_recommendation = input;
        self
    }
    /// <p>A set of recommended deployment configurations for the model.</p>
    pub fn get_deployment_recommendation(&self) -> &::std::option::Option<crate::types::DeploymentRecommendation> {
        &self.deployment_recommendation
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeModelOutput`](crate::operation::describe_model::DescribeModelOutput).
    pub fn build(self) -> crate::operation::describe_model::DescribeModelOutput {
        crate::operation::describe_model::DescribeModelOutput {
            model_name: self.model_name,
            primary_container: self.primary_container,
            containers: self.containers,
            inference_execution_config: self.inference_execution_config,
            execution_role_arn: self.execution_role_arn,
            vpc_config: self.vpc_config,
            creation_time: self.creation_time,
            model_arn: self.model_arn,
            enable_network_isolation: self.enable_network_isolation,
            deployment_recommendation: self.deployment_recommendation,
            _request_id: self._request_id,
        }
    }
}