aws-sdk-sagemaker 1.198.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 DescribeInferenceComponentOutput {
    /// <p>The name of the inference component.</p>
    pub inference_component_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the inference component.</p>
    pub inference_component_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the endpoint that hosts the inference component.</p>
    pub endpoint_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.</p>
    pub endpoint_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the production variant that hosts the inference component.</p>
    pub variant_name: ::std::option::Option<::std::string::String>,
    /// <p>If the inference component status is <code>Failed</code>, the reason for the failure.</p>
    pub failure_reason: ::std::option::Option<::std::string::String>,
    /// <p>Details about the resources that are deployed with this inference component.</p>
    pub specification: ::std::option::Option<crate::types::InferenceComponentSpecificationSummary>,
    /// <p>A list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular <code>Specification</code> parameter is not returned.</p>
    pub specifications: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecificationSummary>>,
    /// <p>Details about the runtime settings for the model that is deployed with the inference component.</p>
    pub runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfigSummary>,
    /// <p>The time when the inference component was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time when the inference component was last updated.</p>
    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The status of the inference component.</p>
    pub inference_component_status: ::std::option::Option<crate::types::InferenceComponentStatus>,
    /// <p>The deployment and rollback settings that you assigned to the inference component.</p>
    pub last_deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
    _request_id: Option<String>,
}
impl DescribeInferenceComponentOutput {
    /// <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>The Amazon Resource Name (ARN) of the inference component.</p>
    pub fn inference_component_arn(&self) -> ::std::option::Option<&str> {
        self.inference_component_arn.as_deref()
    }
    /// <p>The name of the endpoint that hosts the inference component.</p>
    pub fn endpoint_name(&self) -> ::std::option::Option<&str> {
        self.endpoint_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.</p>
    pub fn endpoint_arn(&self) -> ::std::option::Option<&str> {
        self.endpoint_arn.as_deref()
    }
    /// <p>The name of the production variant that hosts the inference component.</p>
    pub fn variant_name(&self) -> ::std::option::Option<&str> {
        self.variant_name.as_deref()
    }
    /// <p>If the inference component status is <code>Failed</code>, the reason for the failure.</p>
    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
        self.failure_reason.as_deref()
    }
    /// <p>Details about the resources that are deployed with this inference component.</p>
    pub fn specification(&self) -> ::std::option::Option<&crate::types::InferenceComponentSpecificationSummary> {
        self.specification.as_ref()
    }
    /// <p>A list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular <code>Specification</code> parameter is not returned.</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 `.specifications.is_none()`.
    pub fn specifications(&self) -> &[crate::types::InferenceComponentSpecificationSummary] {
        self.specifications.as_deref().unwrap_or_default()
    }
    /// <p>Details about the runtime settings for the model that is deployed with the inference component.</p>
    pub fn runtime_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentRuntimeConfigSummary> {
        self.runtime_config.as_ref()
    }
    /// <p>The time when the inference component was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The time when the inference component was last updated.</p>
    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_time.as_ref()
    }
    /// <p>The status of the inference component.</p>
    pub fn inference_component_status(&self) -> ::std::option::Option<&crate::types::InferenceComponentStatus> {
        self.inference_component_status.as_ref()
    }
    /// <p>The deployment and rollback settings that you assigned to the inference component.</p>
    pub fn last_deployment_config(&self) -> ::std::option::Option<&crate::types::InferenceComponentDeploymentConfig> {
        self.last_deployment_config.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeInferenceComponentOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeInferenceComponentOutput {
    /// Creates a new builder-style object to manufacture [`DescribeInferenceComponentOutput`](crate::operation::describe_inference_component::DescribeInferenceComponentOutput).
    pub fn builder() -> crate::operation::describe_inference_component::builders::DescribeInferenceComponentOutputBuilder {
        crate::operation::describe_inference_component::builders::DescribeInferenceComponentOutputBuilder::default()
    }
}

/// A builder for [`DescribeInferenceComponentOutput`](crate::operation::describe_inference_component::DescribeInferenceComponentOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeInferenceComponentOutputBuilder {
    pub(crate) inference_component_name: ::std::option::Option<::std::string::String>,
    pub(crate) inference_component_arn: ::std::option::Option<::std::string::String>,
    pub(crate) endpoint_name: ::std::option::Option<::std::string::String>,
    pub(crate) endpoint_arn: ::std::option::Option<::std::string::String>,
    pub(crate) variant_name: ::std::option::Option<::std::string::String>,
    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
    pub(crate) specification: ::std::option::Option<crate::types::InferenceComponentSpecificationSummary>,
    pub(crate) specifications: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecificationSummary>>,
    pub(crate) runtime_config: ::std::option::Option<crate::types::InferenceComponentRuntimeConfigSummary>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) inference_component_status: ::std::option::Option<crate::types::InferenceComponentStatus>,
    pub(crate) last_deployment_config: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>,
    _request_id: Option<String>,
}
impl DescribeInferenceComponentOutputBuilder {
    /// <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>The Amazon Resource Name (ARN) of the inference component.</p>
    /// This field is required.
    pub fn inference_component_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inference_component_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the inference component.</p>
    pub fn set_inference_component_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inference_component_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the inference component.</p>
    pub fn get_inference_component_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.inference_component_arn
    }
    /// <p>The name of the endpoint that hosts 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 the endpoint that hosts 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 the endpoint that hosts the inference component.</p>
    pub fn get_endpoint_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_name
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.</p>
    /// This field is required.
    pub fn endpoint_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.endpoint_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.</p>
    pub fn set_endpoint_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.endpoint_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the endpoint that hosts the inference component.</p>
    pub fn get_endpoint_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.endpoint_arn
    }
    /// <p>The name of the production variant that hosts 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 the production variant that hosts 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 the production variant that hosts the inference component.</p>
    pub fn get_variant_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.variant_name
    }
    /// <p>If the inference component status is <code>Failed</code>, the reason for the failure.</p>
    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.failure_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the inference component status is <code>Failed</code>, the reason for the failure.</p>
    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.failure_reason = input;
        self
    }
    /// <p>If the inference component status is <code>Failed</code>, the reason for the failure.</p>
    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.failure_reason
    }
    /// <p>Details about the resources that are deployed with this inference component.</p>
    pub fn specification(mut self, input: crate::types::InferenceComponentSpecificationSummary) -> Self {
        self.specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the resources that are deployed with this inference component.</p>
    pub fn set_specification(mut self, input: ::std::option::Option<crate::types::InferenceComponentSpecificationSummary>) -> Self {
        self.specification = input;
        self
    }
    /// <p>Details about the resources that are deployed with this inference component.</p>
    pub fn get_specification(&self) -> &::std::option::Option<crate::types::InferenceComponentSpecificationSummary> {
        &self.specification
    }
    /// Appends an item to `specifications`.
    ///
    /// To override the contents of this collection use [`set_specifications`](Self::set_specifications).
    ///
    /// <p>A list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular <code>Specification</code> parameter is not returned.</p>
    pub fn specifications(mut self, input: crate::types::InferenceComponentSpecificationSummary) -> Self {
        let mut v = self.specifications.unwrap_or_default();
        v.push(input);
        self.specifications = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular <code>Specification</code> parameter is not returned.</p>
    pub fn set_specifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecificationSummary>>) -> Self {
        self.specifications = input;
        self
    }
    /// <p>A list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular <code>Specification</code> parameter is not returned.</p>
    pub fn get_specifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::InferenceComponentSpecificationSummary>> {
        &self.specifications
    }
    /// <p>Details about the runtime settings for the model that is deployed with the inference component.</p>
    pub fn runtime_config(mut self, input: crate::types::InferenceComponentRuntimeConfigSummary) -> Self {
        self.runtime_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the runtime settings for the model that is deployed with the inference component.</p>
    pub fn set_runtime_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentRuntimeConfigSummary>) -> Self {
        self.runtime_config = input;
        self
    }
    /// <p>Details about the runtime settings for the model that is deployed with the inference component.</p>
    pub fn get_runtime_config(&self) -> &::std::option::Option<crate::types::InferenceComponentRuntimeConfigSummary> {
        &self.runtime_config
    }
    /// <p>The time when the inference component 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>The time when the inference component 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>The time when the inference component was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The time when the inference component was last updated.</p>
    /// This field is required.
    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time when the inference component was last updated.</p>
    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_time = input;
        self
    }
    /// <p>The time when the inference component was last updated.</p>
    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_time
    }
    /// <p>The status of the inference component.</p>
    pub fn inference_component_status(mut self, input: crate::types::InferenceComponentStatus) -> Self {
        self.inference_component_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the inference component.</p>
    pub fn set_inference_component_status(mut self, input: ::std::option::Option<crate::types::InferenceComponentStatus>) -> Self {
        self.inference_component_status = input;
        self
    }
    /// <p>The status of the inference component.</p>
    pub fn get_inference_component_status(&self) -> &::std::option::Option<crate::types::InferenceComponentStatus> {
        &self.inference_component_status
    }
    /// <p>The deployment and rollback settings that you assigned to the inference component.</p>
    pub fn last_deployment_config(mut self, input: crate::types::InferenceComponentDeploymentConfig) -> Self {
        self.last_deployment_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The deployment and rollback settings that you assigned to the inference component.</p>
    pub fn set_last_deployment_config(mut self, input: ::std::option::Option<crate::types::InferenceComponentDeploymentConfig>) -> Self {
        self.last_deployment_config = input;
        self
    }
    /// <p>The deployment and rollback settings that you assigned to the inference component.</p>
    pub fn get_last_deployment_config(&self) -> &::std::option::Option<crate::types::InferenceComponentDeploymentConfig> {
        &self.last_deployment_config
    }
    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 [`DescribeInferenceComponentOutput`](crate::operation::describe_inference_component::DescribeInferenceComponentOutput).
    pub fn build(self) -> crate::operation::describe_inference_component::DescribeInferenceComponentOutput {
        crate::operation::describe_inference_component::DescribeInferenceComponentOutput {
            inference_component_name: self.inference_component_name,
            inference_component_arn: self.inference_component_arn,
            endpoint_name: self.endpoint_name,
            endpoint_arn: self.endpoint_arn,
            variant_name: self.variant_name,
            failure_reason: self.failure_reason,
            specification: self.specification,
            specifications: self.specifications,
            runtime_config: self.runtime_config,
            creation_time: self.creation_time,
            last_modified_time: self.last_modified_time,
            inference_component_status: self.inference_component_status,
            last_deployment_config: self.last_deployment_config,
            _request_id: self._request_id,
        }
    }
}