aws-sdk-sagemaker 1.209.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 DescribeModelPackageInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model package to describe.</p>
    /// <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
    pub model_package_name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p>
    /// <ul>
    /// <li>
    /// <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li>
    /// <li>
    /// <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li>
    /// </ul>
    /// <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p>
    pub included_data: ::std::option::Option<crate::types::IncludedData>,
}
impl DescribeModelPackageInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model package to describe.</p>
    /// <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
    pub fn model_package_name(&self) -> ::std::option::Option<&str> {
        self.model_package_name.as_deref()
    }
    /// <p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p>
    /// <ul>
    /// <li>
    /// <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li>
    /// <li>
    /// <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li>
    /// </ul>
    /// <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p>
    pub fn included_data(&self) -> ::std::option::Option<&crate::types::IncludedData> {
        self.included_data.as_ref()
    }
}
impl DescribeModelPackageInput {
    /// Creates a new builder-style object to manufacture [`DescribeModelPackageInput`](crate::operation::describe_model_package::DescribeModelPackageInput).
    pub fn builder() -> crate::operation::describe_model_package::builders::DescribeModelPackageInputBuilder {
        crate::operation::describe_model_package::builders::DescribeModelPackageInputBuilder::default()
    }
}

/// A builder for [`DescribeModelPackageInput`](crate::operation::describe_model_package::DescribeModelPackageInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeModelPackageInputBuilder {
    pub(crate) model_package_name: ::std::option::Option<::std::string::String>,
    pub(crate) included_data: ::std::option::Option<crate::types::IncludedData>,
}
impl DescribeModelPackageInputBuilder {
    /// <p>The name or Amazon Resource Name (ARN) of the model package to describe.</p>
    /// <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
    /// This field is required.
    pub fn model_package_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_package_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the model package to describe.</p>
    /// <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
    pub fn set_model_package_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_package_name = input;
        self
    }
    /// <p>The name or Amazon Resource Name (ARN) of the model package to describe.</p>
    /// <p>When you specify a name, the name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
    pub fn get_model_package_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_package_name
    }
    /// <p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p>
    /// <ul>
    /// <li>
    /// <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li>
    /// <li>
    /// <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li>
    /// </ul>
    /// <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p>
    pub fn included_data(mut self, input: crate::types::IncludedData) -> Self {
        self.included_data = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p>
    /// <ul>
    /// <li>
    /// <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li>
    /// <li>
    /// <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li>
    /// </ul>
    /// <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p>
    pub fn set_included_data(mut self, input: ::std::option::Option<crate::types::IncludedData>) -> Self {
        self.included_data = input;
        self
    }
    /// <p>Specifies the level of model package data to include in the response. Use this parameter to call <code>DescribeModelPackage</code> on a model package that has an associated model card without requiring <code>kms:Decrypt</code> permission on the customer-managed KMS key associated with the embedded model card.</p>
    /// <ul>
    /// <li>
    /// <p><code>AllData</code>: Returns the full model package response, including the unredacted <code>ModelCard.ModelCardContent</code>. This option requires <code>kms:Decrypt</code> permission on the customer-managed key, if one is associated with the embedded model card. This is the default.</p></li>
    /// <li>
    /// <p><code>MetadataOnly</code>: Returns the full model package response, but with the embedded <code>ModelCard.ModelCardContent</code> sanitized to include only a small set of unencrypted metadata fields. This option does not require <code>kms:Decrypt</code> permission. All other top-level response fields, including <code>InferenceSpecification</code>, <code>ModelMetrics</code>, <code>DriftCheckBaselines</code>, and <code>SecurityConfig</code>, are returned unchanged. For the list of fields preserved within <code>ModelCardContent</code>, see <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeModelPackage.html#sagemaker-DescribeModelPackage-response-ModelCard">ModelCard</a>.</p></li>
    /// </ul>
    /// <p>If you don't specify a value, SageMaker returns <code>AllData</code>.</p>
    pub fn get_included_data(&self) -> &::std::option::Option<crate::types::IncludedData> {
        &self.included_data
    }
    /// Consumes the builder and constructs a [`DescribeModelPackageInput`](crate::operation::describe_model_package::DescribeModelPackageInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_model_package::DescribeModelPackageInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_model_package::DescribeModelPackageInput {
            model_package_name: self.model_package_name,
            included_data: self.included_data,
        })
    }
}