aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
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 UpdateThingGroupInput {
    /// <p>The thing group to update.</p>
    pub thing_group_name: ::std::option::Option<::std::string::String>,
    /// <p>The thing group properties.</p>
    pub thing_group_properties: ::std::option::Option<crate::types::ThingGroupProperties>,
    /// <p>The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.</p>
    pub expected_version: ::std::option::Option<i64>,
}
impl UpdateThingGroupInput {
    /// <p>The thing group to update.</p>
    pub fn thing_group_name(&self) -> ::std::option::Option<&str> {
        self.thing_group_name.as_deref()
    }
    /// <p>The thing group properties.</p>
    pub fn thing_group_properties(&self) -> ::std::option::Option<&crate::types::ThingGroupProperties> {
        self.thing_group_properties.as_ref()
    }
    /// <p>The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.</p>
    pub fn expected_version(&self) -> ::std::option::Option<i64> {
        self.expected_version
    }
}
impl UpdateThingGroupInput {
    /// Creates a new builder-style object to manufacture [`UpdateThingGroupInput`](crate::operation::update_thing_group::UpdateThingGroupInput).
    pub fn builder() -> crate::operation::update_thing_group::builders::UpdateThingGroupInputBuilder {
        crate::operation::update_thing_group::builders::UpdateThingGroupInputBuilder::default()
    }
}

/// A builder for [`UpdateThingGroupInput`](crate::operation::update_thing_group::UpdateThingGroupInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateThingGroupInputBuilder {
    pub(crate) thing_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) thing_group_properties: ::std::option::Option<crate::types::ThingGroupProperties>,
    pub(crate) expected_version: ::std::option::Option<i64>,
}
impl UpdateThingGroupInputBuilder {
    /// <p>The thing group to update.</p>
    /// This field is required.
    pub fn thing_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.thing_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The thing group to update.</p>
    pub fn set_thing_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.thing_group_name = input;
        self
    }
    /// <p>The thing group to update.</p>
    pub fn get_thing_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.thing_group_name
    }
    /// <p>The thing group properties.</p>
    /// This field is required.
    pub fn thing_group_properties(mut self, input: crate::types::ThingGroupProperties) -> Self {
        self.thing_group_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>The thing group properties.</p>
    pub fn set_thing_group_properties(mut self, input: ::std::option::Option<crate::types::ThingGroupProperties>) -> Self {
        self.thing_group_properties = input;
        self
    }
    /// <p>The thing group properties.</p>
    pub fn get_thing_group_properties(&self) -> &::std::option::Option<crate::types::ThingGroupProperties> {
        &self.thing_group_properties
    }
    /// <p>The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.</p>
    pub fn expected_version(mut self, input: i64) -> Self {
        self.expected_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.</p>
    pub fn set_expected_version(mut self, input: ::std::option::Option<i64>) -> Self {
        self.expected_version = input;
        self
    }
    /// <p>The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.</p>
    pub fn get_expected_version(&self) -> &::std::option::Option<i64> {
        &self.expected_version
    }
    /// Consumes the builder and constructs a [`UpdateThingGroupInput`](crate::operation::update_thing_group::UpdateThingGroupInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_thing_group::UpdateThingGroupInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_thing_group::UpdateThingGroupInput {
            thing_group_name: self.thing_group_name,
            thing_group_properties: self.thing_group_properties,
            expected_version: self.expected_version,
        })
    }
}