aws-sdk-datazone 1.137.0

AWS SDK for Amazon DataZone
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 UpdateNotebookInput {
    /// <p>The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.</p>
    pub domain_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the notebook to update.</p>
    pub identifier: ::std::option::Option<::std::string::String>,
    /// <p>The updated description of the notebook.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The updated status of the notebook.</p>
    pub status: ::std::option::Option<crate::types::NotebookStatus>,
    /// <p>The updated name of the notebook.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The updated ordered list of cells in the notebook.</p>
    pub cell_order: ::std::option::Option<::std::vec::Vec<crate::types::CellInformation>>,
    /// <p>The updated metadata for the notebook, specified as key-value pairs.</p>
    pub metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The updated sensitive parameters for the notebook, specified as key-value pairs.</p>
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The updated environment configuration for the notebook.</p>
    pub environment_configuration: ::std::option::Option<crate::types::EnvironmentConfig>,
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateNotebookInput {
    /// <p>The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.</p>
    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
        self.domain_identifier.as_deref()
    }
    /// <p>The identifier of the notebook to update.</p>
    pub fn identifier(&self) -> ::std::option::Option<&str> {
        self.identifier.as_deref()
    }
    /// <p>The updated description of the notebook.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The updated status of the notebook.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::NotebookStatus> {
        self.status.as_ref()
    }
    /// <p>The updated name of the notebook.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The updated ordered list of cells in the notebook.</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 `.cell_order.is_none()`.
    pub fn cell_order(&self) -> &[crate::types::CellInformation] {
        self.cell_order.as_deref().unwrap_or_default()
    }
    /// <p>The updated metadata for the notebook, specified as key-value pairs.</p>
    pub fn metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.metadata.as_ref()
    }
    /// <p>The updated sensitive parameters for the notebook, specified as key-value pairs.</p>
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.parameters.as_ref()
    }
    /// <p>The updated environment configuration for the notebook.</p>
    pub fn environment_configuration(&self) -> ::std::option::Option<&crate::types::EnvironmentConfig> {
        self.environment_configuration.as_ref()
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateNotebookInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateNotebookInput");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("cell_order", &self.cell_order);
        formatter.field("metadata", &"*** Sensitive Data Redacted ***");
        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("environment_configuration", &self.environment_configuration);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}
impl UpdateNotebookInput {
    /// Creates a new builder-style object to manufacture [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
    pub fn builder() -> crate::operation::update_notebook::builders::UpdateNotebookInputBuilder {
        crate::operation::update_notebook::builders::UpdateNotebookInputBuilder::default()
    }
}

/// A builder for [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateNotebookInputBuilder {
    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) identifier: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::NotebookStatus>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) cell_order: ::std::option::Option<::std::vec::Vec<crate::types::CellInformation>>,
    pub(crate) metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) environment_configuration: ::std::option::Option<crate::types::EnvironmentConfig>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateNotebookInputBuilder {
    /// <p>The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.</p>
    /// This field is required.
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_identifier = input;
        self
    }
    /// <p>The identifier of the Amazon SageMaker Unified Studio domain in which the notebook exists.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_identifier
    }
    /// <p>The identifier of the notebook to update.</p>
    /// This field is required.
    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the notebook to update.</p>
    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.identifier = input;
        self
    }
    /// <p>The identifier of the notebook to update.</p>
    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.identifier
    }
    /// <p>The updated description of the notebook.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated description of the notebook.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The updated description of the notebook.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The updated status of the notebook.</p>
    pub fn status(mut self, input: crate::types::NotebookStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated status of the notebook.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::NotebookStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The updated status of the notebook.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::NotebookStatus> {
        &self.status
    }
    /// <p>The updated name of the notebook.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The updated name of the notebook.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The updated name of the notebook.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// Appends an item to `cell_order`.
    ///
    /// To override the contents of this collection use [`set_cell_order`](Self::set_cell_order).
    ///
    /// <p>The updated ordered list of cells in the notebook.</p>
    pub fn cell_order(mut self, input: crate::types::CellInformation) -> Self {
        let mut v = self.cell_order.unwrap_or_default();
        v.push(input);
        self.cell_order = ::std::option::Option::Some(v);
        self
    }
    /// <p>The updated ordered list of cells in the notebook.</p>
    pub fn set_cell_order(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CellInformation>>) -> Self {
        self.cell_order = input;
        self
    }
    /// <p>The updated ordered list of cells in the notebook.</p>
    pub fn get_cell_order(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CellInformation>> {
        &self.cell_order
    }
    /// Adds a key-value pair to `metadata`.
    ///
    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
    ///
    /// <p>The updated metadata for the notebook, specified as key-value pairs.</p>
    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.metadata.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.metadata = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The updated metadata for the notebook, specified as key-value pairs.</p>
    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.metadata = input;
        self
    }
    /// <p>The updated metadata for the notebook, specified as key-value pairs.</p>
    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.metadata
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>The updated sensitive parameters for the notebook, specified as key-value pairs.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The updated sensitive parameters for the notebook, specified as key-value pairs.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.parameters = input;
        self
    }
    /// <p>The updated sensitive parameters for the notebook, specified as key-value pairs.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.parameters
    }
    /// <p>The updated environment configuration for the notebook.</p>
    pub fn environment_configuration(mut self, input: crate::types::EnvironmentConfig) -> Self {
        self.environment_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated environment configuration for the notebook.</p>
    pub fn set_environment_configuration(mut self, input: ::std::option::Option<crate::types::EnvironmentConfig>) -> Self {
        self.environment_configuration = input;
        self
    }
    /// <p>The updated environment configuration for the notebook.</p>
    pub fn get_environment_configuration(&self) -> &::std::option::Option<crate::types::EnvironmentConfig> {
        &self.environment_configuration
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`UpdateNotebookInput`](crate::operation::update_notebook::UpdateNotebookInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_notebook::UpdateNotebookInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_notebook::UpdateNotebookInput {
            domain_identifier: self.domain_identifier,
            identifier: self.identifier,
            description: self.description,
            status: self.status,
            name: self.name,
            cell_order: self.cell_order,
            metadata: self.metadata,
            parameters: self.parameters,
            environment_configuration: self.environment_configuration,
            client_token: self.client_token,
        })
    }
}
impl ::std::fmt::Debug for UpdateNotebookInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateNotebookInputBuilder");
        formatter.field("domain_identifier", &self.domain_identifier);
        formatter.field("identifier", &self.identifier);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("cell_order", &self.cell_order);
        formatter.field("metadata", &"*** Sensitive Data Redacted ***");
        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("environment_configuration", &self.environment_configuration);
        formatter.field("client_token", &self.client_token);
        formatter.finish()
    }
}