aws-sdk-personalize 1.104.0

AWS SDK for Amazon Personalize
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 UpdateDatasetInput {
    /// <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
    pub dataset_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
    pub schema_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateDatasetInput {
    /// <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
    pub fn dataset_arn(&self) -> ::std::option::Option<&str> {
        self.dataset_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
    pub fn schema_arn(&self) -> ::std::option::Option<&str> {
        self.schema_arn.as_deref()
    }
}
impl UpdateDatasetInput {
    /// Creates a new builder-style object to manufacture [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
    pub fn builder() -> crate::operation::update_dataset::builders::UpdateDatasetInputBuilder {
        crate::operation::update_dataset::builders::UpdateDatasetInputBuilder::default()
    }
}

/// A builder for [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDatasetInputBuilder {
    pub(crate) dataset_arn: ::std::option::Option<::std::string::String>,
    pub(crate) schema_arn: ::std::option::Option<::std::string::String>,
}
impl UpdateDatasetInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
    /// This field is required.
    pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dataset_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
    pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dataset_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the dataset that you want to update.</p>
    pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.dataset_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
    /// This field is required.
    pub fn schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.schema_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
    pub fn set_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.schema_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the new schema you want use.</p>
    pub fn get_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.schema_arn
    }
    /// Consumes the builder and constructs a [`UpdateDatasetInput`](crate::operation::update_dataset::UpdateDatasetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_dataset::UpdateDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_dataset::UpdateDatasetInput {
            dataset_arn: self.dataset_arn,
            schema_arn: self.schema_arn,
        })
    }
}