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 MoveContextOutput  {
    #[allow(missing_docs)] // documentation missing in model
    pub id: ::std::string::String,
    /// Represents conditional criteria used for context matching. Keys define dimension names and values specify the criteria that must be met.
    pub value: ::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>,
    /// Configuration overrides that replace default values when context conditions are met. Keys represent configuration keys and values are the override data.
    pub r#override: ::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>,
    #[allow(missing_docs)] // documentation missing in model
    pub override_id: ::std::string::String,
    /// Priority weight used to determine the order of context evaluation. Higher weights take precedence during configuration resolution.
    pub weight: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub description: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub change_reason: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub created_at: ::aws_smithy_types::DateTime,
    #[allow(missing_docs)] // documentation missing in model
    pub created_by: ::std::string::String,
    #[allow(missing_docs)] // documentation missing in model
    pub last_modified_at: ::aws_smithy_types::DateTime,
    #[allow(missing_docs)] // documentation missing in model
    pub last_modified_by: ::std::string::String,
}
impl  MoveContextOutput  {
    #[allow(missing_docs)] // documentation missing in model
    pub fn id(&self) -> &str {
        use std::ops::Deref; self.id.deref()
    }
    /// Represents conditional criteria used for context matching. Keys define dimension names and values specify the criteria that must be met.
    pub fn value(&self) -> &::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document> {
        &self.value
    }
    /// Configuration overrides that replace default values when context conditions are met. Keys represent configuration keys and values are the override data.
    pub fn r#override(&self) -> &::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document> {
        &self.r#override
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn override_id(&self) -> &str {
        use std::ops::Deref; self.override_id.deref()
    }
    /// Priority weight used to determine the order of context evaluation. Higher weights take precedence during configuration resolution.
    pub fn weight(&self) -> &str {
        use std::ops::Deref; self.weight.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn description(&self) -> &str {
        use std::ops::Deref; self.description.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn change_reason(&self) -> &str {
        use std::ops::Deref; self.change_reason.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn created_by(&self) -> &str {
        use std::ops::Deref; self.created_by.deref()
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn last_modified_at(&self) -> &::aws_smithy_types::DateTime {
        &self.last_modified_at
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn last_modified_by(&self) -> &str {
        use std::ops::Deref; self.last_modified_by.deref()
    }
}
impl MoveContextOutput {
    /// Creates a new builder-style object to manufacture [`MoveContextOutput`](crate::operation::move_context::MoveContextOutput).
    pub fn builder() -> crate::operation::move_context::builders::MoveContextOutputBuilder {
        crate::operation::move_context::builders::MoveContextOutputBuilder::default()
    }
}

/// A builder for [`MoveContextOutput`](crate::operation::move_context::MoveContextOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct MoveContextOutputBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) value: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
    pub(crate) r#override: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>,
    pub(crate) override_id: ::std::option::Option<::std::string::String>,
    pub(crate) weight: ::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) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) created_by: ::std::option::Option<::std::string::String>,
    pub(crate) last_modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
}
impl MoveContextOutputBuilder {
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// Adds a key-value pair to `value`.
    ///
    /// To override the contents of this collection use [`set_value`](Self::set_value).
    ///
    /// Represents conditional criteria used for context matching. Keys define dimension names and values specify the criteria that must be met.
    pub fn value(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
        let mut hash_map = self.value.unwrap_or_default();
                        hash_map.insert(k.into(), v);
                        self.value = ::std::option::Option::Some(hash_map);
                        self
    }
    /// Represents conditional criteria used for context matching. Keys define dimension names and values specify the criteria that must be met.
    pub fn set_value(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
        self.value = input; self
    }
    /// Represents conditional criteria used for context matching. Keys define dimension names and values specify the criteria that must be met.
    pub fn get_value(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
        &self.value
    }
    /// Adds a key-value pair to `r#override`.
    ///
    /// To override the contents of this collection use [`set_override`](Self::set_override).
    ///
    /// Configuration overrides that replace default values when context conditions are met. Keys represent configuration keys and values are the override data.
    pub fn r#override(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::aws_smithy_types::Document) -> Self {
        let mut hash_map = self.r#override.unwrap_or_default();
                        hash_map.insert(k.into(), v);
                        self.r#override = ::std::option::Option::Some(hash_map);
                        self
    }
    /// Configuration overrides that replace default values when context conditions are met. Keys represent configuration keys and values are the override data.
    pub fn set_override(mut self, input: ::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>>) -> Self {
        self.r#override = input; self
    }
    /// Configuration overrides that replace default values when context conditions are met. Keys represent configuration keys and values are the override data.
    pub fn get_override(&self) -> &::std::option::Option<::std::collections::HashMap::<::std::string::String, ::aws_smithy_types::Document>> {
        &self.r#override
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn override_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.override_id = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_override_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.override_id = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_override_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.override_id
    }
    /// Priority weight used to determine the order of context evaluation. Higher weights take precedence during configuration resolution.
    /// This field is required.
    pub fn weight(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.weight = ::std::option::Option::Some(input.into());
        self
    }
    /// Priority weight used to determine the order of context evaluation. Higher weights take precedence during configuration resolution.
    pub fn set_weight(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.weight = input; self
    }
    /// Priority weight used to determine the order of context evaluation. Higher weights take precedence during configuration resolution.
    pub fn get_weight(&self) -> &::std::option::Option<::std::string::String> {
        &self.weight
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    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
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.created_by = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.created_by = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.created_by
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn last_modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_at = ::std::option::Option::Some(input);
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_last_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_at = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_last_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_at
    }
    #[allow(missing_docs)] // documentation missing in model
    /// This field is required.
    pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_modified_by = ::std::option::Option::Some(input.into());
        self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_modified_by = input; self
    }
    #[allow(missing_docs)] // documentation missing in model
    pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_modified_by
    }
    /// Consumes the builder and constructs a [`MoveContextOutput`](crate::operation::move_context::MoveContextOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::operation::move_context::builders::MoveContextOutputBuilder::id)
    /// - [`value`](crate::operation::move_context::builders::MoveContextOutputBuilder::value)
    /// - [`r#override`](crate::operation::move_context::builders::MoveContextOutputBuilder::override)
    /// - [`override_id`](crate::operation::move_context::builders::MoveContextOutputBuilder::override_id)
    /// - [`weight`](crate::operation::move_context::builders::MoveContextOutputBuilder::weight)
    /// - [`description`](crate::operation::move_context::builders::MoveContextOutputBuilder::description)
    /// - [`change_reason`](crate::operation::move_context::builders::MoveContextOutputBuilder::change_reason)
    /// - [`created_at`](crate::operation::move_context::builders::MoveContextOutputBuilder::created_at)
    /// - [`created_by`](crate::operation::move_context::builders::MoveContextOutputBuilder::created_by)
    /// - [`last_modified_at`](crate::operation::move_context::builders::MoveContextOutputBuilder::last_modified_at)
    /// - [`last_modified_by`](crate::operation::move_context::builders::MoveContextOutputBuilder::last_modified_by)
    pub fn build(self) -> ::std::result::Result<crate::operation::move_context::MoveContextOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(
            crate::operation::move_context::MoveContextOutput {
                id: self.id
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("id", "id was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                value: self.value
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("value", "value was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                r#override: self.r#override
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("r#override", "r#override was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                override_id: self.override_id
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("override_id", "override_id was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                weight: self.weight
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("weight", "weight was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                description: self.description
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("description", "description was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                change_reason: self.change_reason
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("change_reason", "change_reason was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                created_at: self.created_at
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("created_at", "created_at was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                created_by: self.created_by
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("created_by", "created_by was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                last_modified_at: self.last_modified_at
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_at", "last_modified_at was not specified but it is required when building MoveContextOutput")
                    )?
                ,
                last_modified_by: self.last_modified_by
                    .ok_or_else(||
                        ::aws_smithy_types::error::operation::BuildError::missing_field("last_modified_by", "last_modified_by was not specified but it is required when building MoveContextOutput")
                    )?
                ,
            }
        )
    }
}