aws-sdk-glue 1.147.0

AWS SDK for AWS Glue
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 UpdateCatalogInput {
    /// <p>The ID of the catalog.</p>
    pub catalog_id: ::std::option::Option<::std::string::String>,
    /// <p>A <code>CatalogInput</code> object specifying the new properties of an existing catalog.</p>
    pub catalog_input: ::std::option::Option<crate::types::CatalogInput>,
}
impl UpdateCatalogInput {
    /// <p>The ID of the catalog.</p>
    pub fn catalog_id(&self) -> ::std::option::Option<&str> {
        self.catalog_id.as_deref()
    }
    /// <p>A <code>CatalogInput</code> object specifying the new properties of an existing catalog.</p>
    pub fn catalog_input(&self) -> ::std::option::Option<&crate::types::CatalogInput> {
        self.catalog_input.as_ref()
    }
}
impl UpdateCatalogInput {
    /// Creates a new builder-style object to manufacture [`UpdateCatalogInput`](crate::operation::update_catalog::UpdateCatalogInput).
    pub fn builder() -> crate::operation::update_catalog::builders::UpdateCatalogInputBuilder {
        crate::operation::update_catalog::builders::UpdateCatalogInputBuilder::default()
    }
}

/// A builder for [`UpdateCatalogInput`](crate::operation::update_catalog::UpdateCatalogInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateCatalogInputBuilder {
    pub(crate) catalog_id: ::std::option::Option<::std::string::String>,
    pub(crate) catalog_input: ::std::option::Option<crate::types::CatalogInput>,
}
impl UpdateCatalogInputBuilder {
    /// <p>The ID of the catalog.</p>
    /// This field is required.
    pub fn catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.catalog_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the catalog.</p>
    pub fn set_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.catalog_id = input;
        self
    }
    /// <p>The ID of the catalog.</p>
    pub fn get_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.catalog_id
    }
    /// <p>A <code>CatalogInput</code> object specifying the new properties of an existing catalog.</p>
    /// This field is required.
    pub fn catalog_input(mut self, input: crate::types::CatalogInput) -> Self {
        self.catalog_input = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>CatalogInput</code> object specifying the new properties of an existing catalog.</p>
    pub fn set_catalog_input(mut self, input: ::std::option::Option<crate::types::CatalogInput>) -> Self {
        self.catalog_input = input;
        self
    }
    /// <p>A <code>CatalogInput</code> object specifying the new properties of an existing catalog.</p>
    pub fn get_catalog_input(&self) -> &::std::option::Option<crate::types::CatalogInput> {
        &self.catalog_input
    }
    /// Consumes the builder and constructs a [`UpdateCatalogInput`](crate::operation::update_catalog::UpdateCatalogInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_catalog::UpdateCatalogInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_catalog::UpdateCatalogInput {
            catalog_id: self.catalog_id,
            catalog_input: self.catalog_input,
        })
    }
}