aws-sdk-sagemaker 1.189.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 DescribeModelCardInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to describe.</p>
    pub model_card_name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p>
    pub model_card_version: ::std::option::Option<i32>,
}
impl DescribeModelCardInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to describe.</p>
    pub fn model_card_name(&self) -> ::std::option::Option<&str> {
        self.model_card_name.as_deref()
    }
    /// <p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p>
    pub fn model_card_version(&self) -> ::std::option::Option<i32> {
        self.model_card_version
    }
}
impl DescribeModelCardInput {
    /// Creates a new builder-style object to manufacture [`DescribeModelCardInput`](crate::operation::describe_model_card::DescribeModelCardInput).
    pub fn builder() -> crate::operation::describe_model_card::builders::DescribeModelCardInputBuilder {
        crate::operation::describe_model_card::builders::DescribeModelCardInputBuilder::default()
    }
}

/// A builder for [`DescribeModelCardInput`](crate::operation::describe_model_card::DescribeModelCardInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeModelCardInputBuilder {
    pub(crate) model_card_name: ::std::option::Option<::std::string::String>,
    pub(crate) model_card_version: ::std::option::Option<i32>,
}
impl DescribeModelCardInputBuilder {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to describe.</p>
    /// This field is required.
    pub fn model_card_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_card_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the model card to describe.</p>
    pub fn set_model_card_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_card_name = input;
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the model card to describe.</p>
    pub fn get_model_card_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_card_name
    }
    /// <p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p>
    pub fn model_card_version(mut self, input: i32) -> Self {
        self.model_card_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p>
    pub fn set_model_card_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.model_card_version = input;
        self
    }
    /// <p>The version of the model card to describe. If a version is not provided, then the latest version of the model card is described.</p>
    pub fn get_model_card_version(&self) -> &::std::option::Option<i32> {
        &self.model_card_version
    }
    /// Consumes the builder and constructs a [`DescribeModelCardInput`](crate::operation::describe_model_card::DescribeModelCardInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_model_card::DescribeModelCardInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_model_card::DescribeModelCardInput {
            model_card_name: self.model_card_name,
            model_card_version: self.model_card_version,
        })
    }
}