aws-sdk-wickr 1.12.0

AWS SDK for AWS Wickr Admin API
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 UpdateGuestUserInput {
    /// <p>The ID of the Wickr network where the guest user's status will be updated.</p>
    pub network_id: ::std::option::Option<::std::string::String>,
    /// <p>The username hash (unique identifier) of the guest user to update.</p>
    pub username_hash: ::std::option::Option<::std::string::String>,
    /// <p>Set to true to block the guest user or false to unblock them.</p>
    pub block: ::std::option::Option<bool>,
}
impl UpdateGuestUserInput {
    /// <p>The ID of the Wickr network where the guest user's status will be updated.</p>
    pub fn network_id(&self) -> ::std::option::Option<&str> {
        self.network_id.as_deref()
    }
    /// <p>The username hash (unique identifier) of the guest user to update.</p>
    pub fn username_hash(&self) -> ::std::option::Option<&str> {
        self.username_hash.as_deref()
    }
    /// <p>Set to true to block the guest user or false to unblock them.</p>
    pub fn block(&self) -> ::std::option::Option<bool> {
        self.block
    }
}
impl UpdateGuestUserInput {
    /// Creates a new builder-style object to manufacture [`UpdateGuestUserInput`](crate::operation::update_guest_user::UpdateGuestUserInput).
    pub fn builder() -> crate::operation::update_guest_user::builders::UpdateGuestUserInputBuilder {
        crate::operation::update_guest_user::builders::UpdateGuestUserInputBuilder::default()
    }
}

/// A builder for [`UpdateGuestUserInput`](crate::operation::update_guest_user::UpdateGuestUserInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateGuestUserInputBuilder {
    pub(crate) network_id: ::std::option::Option<::std::string::String>,
    pub(crate) username_hash: ::std::option::Option<::std::string::String>,
    pub(crate) block: ::std::option::Option<bool>,
}
impl UpdateGuestUserInputBuilder {
    /// <p>The ID of the Wickr network where the guest user's status will be updated.</p>
    /// This field is required.
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Wickr network where the guest user's status will be updated.</p>
    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_id = input;
        self
    }
    /// <p>The ID of the Wickr network where the guest user's status will be updated.</p>
    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_id
    }
    /// <p>The username hash (unique identifier) of the guest user to update.</p>
    /// This field is required.
    pub fn username_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.username_hash = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The username hash (unique identifier) of the guest user to update.</p>
    pub fn set_username_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.username_hash = input;
        self
    }
    /// <p>The username hash (unique identifier) of the guest user to update.</p>
    pub fn get_username_hash(&self) -> &::std::option::Option<::std::string::String> {
        &self.username_hash
    }
    /// <p>Set to true to block the guest user or false to unblock them.</p>
    /// This field is required.
    pub fn block(mut self, input: bool) -> Self {
        self.block = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set to true to block the guest user or false to unblock them.</p>
    pub fn set_block(mut self, input: ::std::option::Option<bool>) -> Self {
        self.block = input;
        self
    }
    /// <p>Set to true to block the guest user or false to unblock them.</p>
    pub fn get_block(&self) -> &::std::option::Option<bool> {
        &self.block
    }
    /// Consumes the builder and constructs a [`UpdateGuestUserInput`](crate::operation::update_guest_user::UpdateGuestUserInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_guest_user::UpdateGuestUserInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_guest_user::UpdateGuestUserInput {
            network_id: self.network_id,
            username_hash: self.username_hash,
            block: self.block,
        })
    }
}