superposition_sdk 0.100.2

Rust SDK to work with Superposition
// 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 UpdateDimensionInput  {
    #[allow(missing_docs)] // documentation missing in model
    pub workspace_id: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub org_id: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub dimension: ::std::option::Option<::std::string::String>,
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub schema: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
    #[allow(missing_docs)] // documentation missing in model
    pub position: ::std::option::Option<i32>,
    /// To unset the function name, pass "null" string.
    pub value_validation_function_name: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub description: ::std::option::Option<::std::string::String>,
    #[allow(missing_docs)] // documentation missing in model
    pub change_reason: ::std::option::Option<::std::string::String>,
    /// To unset the function name, pass "null" string.
    pub value_compute_function_name: ::std::option::Option<::std::string::String>,
}
impl  UpdateDimensionInput  {
    #[allow(missing_docs)] // documentation missing in model
    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
        self.workspace_id.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn org_id(&self) -> ::std::option::Option<&str> {
        self.org_id.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn dimension(&self) -> ::std::option::Option<&str> {
        self.dimension.as_deref()
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn schema(&self) -> ::std::option::Option<&::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
        self.schema.as_ref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn position(&self) -> ::std::option::Option<i32> {
        self.position
    }
    /// To unset the function name, pass "null" string.
    pub fn value_validation_function_name(&self) -> ::std::option::Option<&str> {
        self.value_validation_function_name.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn change_reason(&self) -> ::std::option::Option<&str> {
        self.change_reason.as_deref()
    }
    /// To unset the function name, pass "null" string.
    pub fn value_compute_function_name(&self) -> ::std::option::Option<&str> {
        self.value_compute_function_name.as_deref()
    }
}
impl UpdateDimensionInput {
    /// Creates a new builder-style object to manufacture [`UpdateDimensionInput`](crate::operation::update_dimension::UpdateDimensionInput).
    pub fn builder() -> crate::operation::update_dimension::builders::UpdateDimensionInputBuilder {
        crate::operation::update_dimension::builders::UpdateDimensionInputBuilder::default()
    }
}

/// A builder for [`UpdateDimensionInput`](crate::operation::update_dimension::UpdateDimensionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDimensionInputBuilder {
    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
    pub(crate) org_id: ::std::option::Option<::std::string::String>,
    pub(crate) dimension: ::std::option::Option<::std::string::String>,
    pub(crate) schema: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
    pub(crate) position: ::std::option::Option<i32>,
    pub(crate) value_validation_function_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) change_reason: ::std::option::Option<::std::string::String>,
    pub(crate) value_compute_function_name: ::std::option::Option<::std::string::String>,
}
impl UpdateDimensionInputBuilder {
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.workspace_id = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.workspace_id = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.workspace_id
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn org_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.org_id = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_org_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.org_id = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_org_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.org_id
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn dimension(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dimension = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_dimension(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dimension = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_dimension(&self) -> &::std::option::Option<::std::string::String> {
        &self.dimension
    }
    /// Adds a key-value pair to `schema`.
    ///
    /// To override the contents of this collection use [`set_schema`](Self::set_schema).
    ///
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn schema(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
        let mut hash_map = self.schema.unwrap_or_default();
                        hash_map.insert(k.into(), v);
                        self.schema = ::std::option::Option::Some(hash_map);
                        self
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn set_schema(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
        self.schema = input; self
    }
    /// Generic key-value object structure used for flexible data representation throughout the API.
    pub fn get_schema(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
        &self.schema
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn position(mut self, input: i32) -> Self {
        self.position = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_position(mut self, input: ::std::option::Option<i32>) -> Self {
        self.position = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_position(&self) -> &::std::option::Option<i32> {
        &self.position
    }
    /// To unset the function name, pass "null" string.
    pub fn value_validation_function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value_validation_function_name = ::std::option::Option::Some(input.into());
        self
    }
    /// To unset the function name, pass "null" string.
    pub fn set_value_validation_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value_validation_function_name = input; self
    }
    /// To unset the function name, pass "null" string.
    pub fn get_value_validation_function_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.value_validation_function_name
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn change_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.change_reason = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_change_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.change_reason = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_change_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.change_reason
    }
    /// To unset the function name, pass "null" string.
    pub fn value_compute_function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.value_compute_function_name = ::std::option::Option::Some(input.into());
        self
    }
    /// To unset the function name, pass "null" string.
    pub fn set_value_compute_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.value_compute_function_name = input; self
    }
    /// To unset the function name, pass "null" string.
    pub fn get_value_compute_function_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.value_compute_function_name
    }
    /// Consumes the builder and constructs a [`UpdateDimensionInput`](crate::operation::update_dimension::UpdateDimensionInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_dimension::UpdateDimensionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(
            crate::operation::update_dimension::UpdateDimensionInput {
                workspace_id: self.workspace_id
                ,
                org_id: self.org_id
                ,
                dimension: self.dimension
                ,
                schema: self.schema
                ,
                position: self.position
                ,
                value_validation_function_name: self.value_validation_function_name
                ,
                description: self.description
                ,
                change_reason: self.change_reason
                ,
                value_compute_function_name: self.value_compute_function_name
                ,
            }
        )
    }
}