aws-sdk-b2bi 1.19.0

AWS SDK for AWS B2B Data Interchange
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)]
pub struct UpdateProfileInput {
    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
    pub profile_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the profile, used to identify it.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the email address associated with this customer profile.</p>
    pub email: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the phone number associated with the profile.</p>
    pub phone: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the name for the business associated with this profile.</p>
    pub business_name: ::std::option::Option<::std::string::String>,
}
impl UpdateProfileInput {
    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
    pub fn profile_id(&self) -> ::std::option::Option<&str> {
        self.profile_id.as_deref()
    }
    /// <p>The name of the profile, used to identify it.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Specifies the email address associated with this customer profile.</p>
    pub fn email(&self) -> ::std::option::Option<&str> {
        self.email.as_deref()
    }
    /// <p>Specifies the phone number associated with the profile.</p>
    pub fn phone(&self) -> ::std::option::Option<&str> {
        self.phone.as_deref()
    }
    /// <p>Specifies the name for the business associated with this profile.</p>
    pub fn business_name(&self) -> ::std::option::Option<&str> {
        self.business_name.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateProfileInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateProfileInput");
        formatter.field("profile_id", &self.profile_id);
        formatter.field("name", &self.name);
        formatter.field("email", &"*** Sensitive Data Redacted ***");
        formatter.field("phone", &"*** Sensitive Data Redacted ***");
        formatter.field("business_name", &self.business_name);
        formatter.finish()
    }
}
impl UpdateProfileInput {
    /// Creates a new builder-style object to manufacture [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileInputBuilder {
        crate::operation::update_profile::builders::UpdateProfileInputBuilder::default()
    }
}

/// A builder for [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct UpdateProfileInputBuilder {
    pub(crate) profile_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) email: ::std::option::Option<::std::string::String>,
    pub(crate) phone: ::std::option::Option<::std::string::String>,
    pub(crate) business_name: ::std::option::Option<::std::string::String>,
}
impl UpdateProfileInputBuilder {
    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
    /// This field is required.
    pub fn profile_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_id = input;
        self
    }
    /// <p>Specifies the unique, system-generated identifier for the profile.</p>
    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_id
    }
    /// <p>The name of the profile, used to identify it.</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 profile, used to identify it.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the profile, used to identify it.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Specifies the email address associated with this customer profile.</p>
    pub fn email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the email address associated with this customer profile.</p>
    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email = input;
        self
    }
    /// <p>Specifies the email address associated with this customer profile.</p>
    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.email
    }
    /// <p>Specifies the phone number associated with the profile.</p>
    pub fn phone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.phone = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the phone number associated with the profile.</p>
    pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.phone = input;
        self
    }
    /// <p>Specifies the phone number associated with the profile.</p>
    pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
        &self.phone
    }
    /// <p>Specifies the name for the business associated with this profile.</p>
    pub fn business_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.business_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies the name for the business associated with this profile.</p>
    pub fn set_business_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.business_name = input;
        self
    }
    /// <p>Specifies the name for the business associated with this profile.</p>
    pub fn get_business_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.business_name
    }
    /// Consumes the builder and constructs a [`UpdateProfileInput`](crate::operation::update_profile::UpdateProfileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_profile::UpdateProfileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileInput {
            profile_id: self.profile_id,
            name: self.name,
            email: self.email,
            phone: self.phone,
            business_name: self.business_name,
        })
    }
}
impl ::std::fmt::Debug for UpdateProfileInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateProfileInputBuilder");
        formatter.field("profile_id", &self.profile_id);
        formatter.field("name", &self.name);
        formatter.field("email", &"*** Sensitive Data Redacted ***");
        formatter.field("phone", &"*** Sensitive Data Redacted ***");
        formatter.field("business_name", &self.business_name);
        formatter.finish()
    }
}