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)]
pub struct UpdateModelCardInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to update.</p>
    pub model_card_name: ::std::option::Option<::std::string::String>,
    /// <p>The updated model card content. Content must be in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a> and provided as a string.</p>
    /// <p>When updating model card content, be sure to include the full content and not just updated content.</p>
    pub content: ::std::option::Option<::std::string::String>,
    /// <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p>
    /// <ul>
    /// <li>
    /// <p><code>Draft</code>: The model card is a work in progress.</p></li>
    /// <li>
    /// <p><code>PendingReview</code>: The model card is pending review.</p></li>
    /// <li>
    /// <p><code>Approved</code>: The model card is approved.</p></li>
    /// <li>
    /// <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li>
    /// </ul>
    pub model_card_status: ::std::option::Option<crate::types::ModelCardStatus>,
}
impl UpdateModelCardInput {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to update.</p>
    pub fn model_card_name(&self) -> ::std::option::Option<&str> {
        self.model_card_name.as_deref()
    }
    /// <p>The updated model card content. Content must be in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a> and provided as a string.</p>
    /// <p>When updating model card content, be sure to include the full content and not just updated content.</p>
    pub fn content(&self) -> ::std::option::Option<&str> {
        self.content.as_deref()
    }
    /// <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p>
    /// <ul>
    /// <li>
    /// <p><code>Draft</code>: The model card is a work in progress.</p></li>
    /// <li>
    /// <p><code>PendingReview</code>: The model card is pending review.</p></li>
    /// <li>
    /// <p><code>Approved</code>: The model card is approved.</p></li>
    /// <li>
    /// <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li>
    /// </ul>
    pub fn model_card_status(&self) -> ::std::option::Option<&crate::types::ModelCardStatus> {
        self.model_card_status.as_ref()
    }
}
impl ::std::fmt::Debug for UpdateModelCardInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateModelCardInput");
        formatter.field("model_card_name", &self.model_card_name);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.field("model_card_status", &self.model_card_status);
        formatter.finish()
    }
}
impl UpdateModelCardInput {
    /// Creates a new builder-style object to manufacture [`UpdateModelCardInput`](crate::operation::update_model_card::UpdateModelCardInput).
    pub fn builder() -> crate::operation::update_model_card::builders::UpdateModelCardInputBuilder {
        crate::operation::update_model_card::builders::UpdateModelCardInputBuilder::default()
    }
}

/// A builder for [`UpdateModelCardInput`](crate::operation::update_model_card::UpdateModelCardInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateModelCardInputBuilder {
    pub(crate) model_card_name: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<::std::string::String>,
    pub(crate) model_card_status: ::std::option::Option<crate::types::ModelCardStatus>,
}
impl UpdateModelCardInputBuilder {
    /// <p>The name or Amazon Resource Name (ARN) of the model card to update.</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 update.</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 update.</p>
    pub fn get_model_card_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_card_name
    }
    /// <p>The updated model card content. Content must be in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a> and provided as a string.</p>
    /// <p>When updating model card content, be sure to include the full content and not just updated content.</p>
    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated model card content. Content must be in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a> and provided as a string.</p>
    /// <p>When updating model card content, be sure to include the full content and not just updated content.</p>
    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content = input;
        self
    }
    /// <p>The updated model card content. Content must be in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-cards.html#model-cards-json-schema">model card JSON schema</a> and provided as a string.</p>
    /// <p>When updating model card content, be sure to include the full content and not just updated content.</p>
    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.content
    }
    /// <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p>
    /// <ul>
    /// <li>
    /// <p><code>Draft</code>: The model card is a work in progress.</p></li>
    /// <li>
    /// <p><code>PendingReview</code>: The model card is pending review.</p></li>
    /// <li>
    /// <p><code>Approved</code>: The model card is approved.</p></li>
    /// <li>
    /// <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li>
    /// </ul>
    pub fn model_card_status(mut self, input: crate::types::ModelCardStatus) -> Self {
        self.model_card_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p>
    /// <ul>
    /// <li>
    /// <p><code>Draft</code>: The model card is a work in progress.</p></li>
    /// <li>
    /// <p><code>PendingReview</code>: The model card is pending review.</p></li>
    /// <li>
    /// <p><code>Approved</code>: The model card is approved.</p></li>
    /// <li>
    /// <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li>
    /// </ul>
    pub fn set_model_card_status(mut self, input: ::std::option::Option<crate::types::ModelCardStatus>) -> Self {
        self.model_card_status = input;
        self
    }
    /// <p>The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval.</p>
    /// <ul>
    /// <li>
    /// <p><code>Draft</code>: The model card is a work in progress.</p></li>
    /// <li>
    /// <p><code>PendingReview</code>: The model card is pending review.</p></li>
    /// <li>
    /// <p><code>Approved</code>: The model card is approved.</p></li>
    /// <li>
    /// <p><code>Archived</code>: The model card is archived. No more updates should be made to the model card, but it can still be exported.</p></li>
    /// </ul>
    pub fn get_model_card_status(&self) -> &::std::option::Option<crate::types::ModelCardStatus> {
        &self.model_card_status
    }
    /// Consumes the builder and constructs a [`UpdateModelCardInput`](crate::operation::update_model_card::UpdateModelCardInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_model_card::UpdateModelCardInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_model_card::UpdateModelCardInput {
            model_card_name: self.model_card_name,
            content: self.content,
            model_card_status: self.model_card_status,
        })
    }
}
impl ::std::fmt::Debug for UpdateModelCardInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateModelCardInputBuilder");
        formatter.field("model_card_name", &self.model_card_name);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.field("model_card_status", &self.model_card_status);
        formatter.finish()
    }
}