aws-sdk-workmail 0.28.0

AWS SDK for Amazon WorkMail
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 UpdateResourceInput {
    /// <p>The identifier associated with the organization for which the resource is updated.</p>
    #[doc(hidden)]
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the resource to be updated.</p>
    #[doc(hidden)]
    pub resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the resource to be updated.</p>
    #[doc(hidden)]
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The resource's booking options to be updated.</p>
    #[doc(hidden)]
    pub booking_options: ::std::option::Option<crate::types::BookingOptions>,
}
impl UpdateResourceInput {
    /// <p>The identifier associated with the organization for which the resource is updated.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The identifier of the resource to be updated.</p>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The name of the resource to be updated.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The resource's booking options to be updated.</p>
    pub fn booking_options(&self) -> ::std::option::Option<&crate::types::BookingOptions> {
        self.booking_options.as_ref()
    }
}
impl UpdateResourceInput {
    /// Creates a new builder-style object to manufacture [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
    pub fn builder() -> crate::operation::update_resource::builders::UpdateResourceInputBuilder {
        crate::operation::update_resource::builders::UpdateResourceInputBuilder::default()
    }
}

/// A builder for [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
#[non_exhaustive]
#[derive(
    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct UpdateResourceInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) booking_options: ::std::option::Option<crate::types::BookingOptions>,
}
impl UpdateResourceInputBuilder {
    /// <p>The identifier associated with the organization for which the resource is updated.</p>
    pub fn organization_id(
        mut self,
        input: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier associated with the organization for which the resource is updated.</p>
    pub fn set_organization_id(
        mut self,
        input: ::std::option::Option<::std::string::String>,
    ) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The identifier of the resource to be updated.</p>
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the resource to be updated.</p>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>The name of the resource to be updated.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the resource to be updated.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The resource's booking options to be updated.</p>
    pub fn booking_options(mut self, input: crate::types::BookingOptions) -> Self {
        self.booking_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>The resource's booking options to be updated.</p>
    pub fn set_booking_options(
        mut self,
        input: ::std::option::Option<crate::types::BookingOptions>,
    ) -> Self {
        self.booking_options = input;
        self
    }
    /// Consumes the builder and constructs a [`UpdateResourceInput`](crate::operation::update_resource::UpdateResourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_resource::UpdateResourceInput,
        ::aws_smithy_http::operation::error::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_resource::UpdateResourceInput {
            organization_id: self.organization_id,
            resource_id: self.resource_id,
            name: self.name,
            booking_options: self.booking_options,
        })
    }
}