aws-sdk-b2bi 1.92.0

AWS SDK for AWS B2B Data Interchange
// 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 UpdatePartnershipOutput {
    /// <p>Returns the unique, system-generated identifier for the profile connected to this partnership.</p>
    pub profile_id: ::std::string::String,
    /// <p>Returns the unique, system-generated identifier for a partnership.</p>
    pub partnership_id: ::std::string::String,
    /// <p>Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
    pub partnership_arn: ::std::string::String,
    /// <p>The name of the partnership, used to identify it.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Returns the email address associated with this trading partner.</p>
    pub email: ::std::option::Option<::std::string::String>,
    /// <p>Returns the phone number associated with the partnership.</p>
    pub phone: ::std::option::Option<::std::string::String>,
    /// <p>Returns one or more capabilities associated with this partnership.</p>
    pub capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Returns the structure that contains the details for the associated capabilities.</p>
    pub capability_options: ::std::option::Option<crate::types::CapabilityOptions>,
    /// <p>Returns the unique, system-generated identifier for a trading partner.</p>
    pub trading_partner_id: ::std::option::Option<::std::string::String>,
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdatePartnershipOutput {
    /// <p>Returns the unique, system-generated identifier for the profile connected to this partnership.</p>
    pub fn profile_id(&self) -> &str {
        use std::ops::Deref;
        self.profile_id.deref()
    }
    /// <p>Returns the unique, system-generated identifier for a partnership.</p>
    pub fn partnership_id(&self) -> &str {
        use std::ops::Deref;
        self.partnership_id.deref()
    }
    /// <p>Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
    pub fn partnership_arn(&self) -> &str {
        use std::ops::Deref;
        self.partnership_arn.deref()
    }
    /// <p>The name of the partnership, used to identify it.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Returns the email address associated with this trading partner.</p>
    pub fn email(&self) -> ::std::option::Option<&str> {
        self.email.as_deref()
    }
    /// <p>Returns the phone number associated with the partnership.</p>
    pub fn phone(&self) -> ::std::option::Option<&str> {
        self.phone.as_deref()
    }
    /// <p>Returns one or more capabilities associated with this partnership.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.capabilities.is_none()`.
    pub fn capabilities(&self) -> &[::std::string::String] {
        self.capabilities.as_deref().unwrap_or_default()
    }
    /// <p>Returns the structure that contains the details for the associated capabilities.</p>
    pub fn capability_options(&self) -> ::std::option::Option<&crate::types::CapabilityOptions> {
        self.capability_options.as_ref()
    }
    /// <p>Returns the unique, system-generated identifier for a trading partner.</p>
    pub fn trading_partner_id(&self) -> ::std::option::Option<&str> {
        self.trading_partner_id.as_deref()
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.modified_at.as_ref()
    }
}
impl ::std::fmt::Debug for UpdatePartnershipOutput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdatePartnershipOutput");
        formatter.field("profile_id", &self.profile_id);
        formatter.field("partnership_id", &self.partnership_id);
        formatter.field("partnership_arn", &self.partnership_arn);
        formatter.field("name", &self.name);
        formatter.field("email", &"*** Sensitive Data Redacted ***");
        formatter.field("phone", &"*** Sensitive Data Redacted ***");
        formatter.field("capabilities", &self.capabilities);
        formatter.field("capability_options", &self.capability_options);
        formatter.field("trading_partner_id", &self.trading_partner_id);
        formatter.field("created_at", &self.created_at);
        formatter.field("modified_at", &self.modified_at);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}
impl ::aws_types::request_id::RequestId for UpdatePartnershipOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdatePartnershipOutput {
    /// Creates a new builder-style object to manufacture [`UpdatePartnershipOutput`](crate::operation::update_partnership::UpdatePartnershipOutput).
    pub fn builder() -> crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder {
        crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::default()
    }
}

/// A builder for [`UpdatePartnershipOutput`](crate::operation::update_partnership::UpdatePartnershipOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdatePartnershipOutputBuilder {
    pub(crate) profile_id: ::std::option::Option<::std::string::String>,
    pub(crate) partnership_id: ::std::option::Option<::std::string::String>,
    pub(crate) partnership_arn: ::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) capabilities: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) capability_options: ::std::option::Option<crate::types::CapabilityOptions>,
    pub(crate) trading_partner_id: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl UpdatePartnershipOutputBuilder {
    /// <p>Returns the unique, system-generated identifier for the profile connected to this partnership.</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>Returns the unique, system-generated identifier for the profile connected to this partnership.</p>
    pub fn set_profile_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_id = input;
        self
    }
    /// <p>Returns the unique, system-generated identifier for the profile connected to this partnership.</p>
    pub fn get_profile_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_id
    }
    /// <p>Returns the unique, system-generated identifier for a partnership.</p>
    /// This field is required.
    pub fn partnership_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.partnership_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns the unique, system-generated identifier for a partnership.</p>
    pub fn set_partnership_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.partnership_id = input;
        self
    }
    /// <p>Returns the unique, system-generated identifier for a partnership.</p>
    pub fn get_partnership_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.partnership_id
    }
    /// <p>Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
    /// This field is required.
    pub fn partnership_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.partnership_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
    pub fn set_partnership_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.partnership_arn = input;
        self
    }
    /// <p>Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.</p>
    pub fn get_partnership_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.partnership_arn
    }
    /// <p>The name of the partnership, 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 partnership, 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 partnership, used to identify it.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Returns the email address associated with this trading partner.</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>Returns the email address associated with this trading partner.</p>
    pub fn set_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.email = input;
        self
    }
    /// <p>Returns the email address associated with this trading partner.</p>
    pub fn get_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.email
    }
    /// <p>Returns the phone number associated with the partnership.</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>Returns the phone number associated with the partnership.</p>
    pub fn set_phone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.phone = input;
        self
    }
    /// <p>Returns the phone number associated with the partnership.</p>
    pub fn get_phone(&self) -> &::std::option::Option<::std::string::String> {
        &self.phone
    }
    /// Appends an item to `capabilities`.
    ///
    /// To override the contents of this collection use [`set_capabilities`](Self::set_capabilities).
    ///
    /// <p>Returns one or more capabilities associated with this partnership.</p>
    pub fn capabilities(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.capabilities.unwrap_or_default();
        v.push(input.into());
        self.capabilities = ::std::option::Option::Some(v);
        self
    }
    /// <p>Returns one or more capabilities associated with this partnership.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>Returns one or more capabilities associated with this partnership.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.capabilities
    }
    /// <p>Returns the structure that contains the details for the associated capabilities.</p>
    pub fn capability_options(mut self, input: crate::types::CapabilityOptions) -> Self {
        self.capability_options = ::std::option::Option::Some(input);
        self
    }
    /// <p>Returns the structure that contains the details for the associated capabilities.</p>
    pub fn set_capability_options(mut self, input: ::std::option::Option<crate::types::CapabilityOptions>) -> Self {
        self.capability_options = input;
        self
    }
    /// <p>Returns the structure that contains the details for the associated capabilities.</p>
    pub fn get_capability_options(&self) -> &::std::option::Option<crate::types::CapabilityOptions> {
        &self.capability_options
    }
    /// <p>Returns the unique, system-generated identifier for a trading partner.</p>
    pub fn trading_partner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.trading_partner_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns the unique, system-generated identifier for a trading partner.</p>
    pub fn set_trading_partner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.trading_partner_id = input;
        self
    }
    /// <p>Returns the unique, system-generated identifier for a trading partner.</p>
    pub fn get_trading_partner_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.trading_partner_id
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    /// 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
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.modified_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.modified_at = input;
        self
    }
    /// <p>Returns a timestamp that identifies the most recent date and time that the partnership was modified.</p>
    pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.modified_at
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`UpdatePartnershipOutput`](crate::operation::update_partnership::UpdatePartnershipOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`profile_id`](crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::profile_id)
    /// - [`partnership_id`](crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::partnership_id)
    /// - [`partnership_arn`](crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::partnership_arn)
    /// - [`created_at`](crate::operation::update_partnership::builders::UpdatePartnershipOutputBuilder::created_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_partnership::UpdatePartnershipOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_partnership::UpdatePartnershipOutput {
            profile_id: self.profile_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "profile_id",
                    "profile_id was not specified but it is required when building UpdatePartnershipOutput",
                )
            })?,
            partnership_id: self.partnership_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "partnership_id",
                    "partnership_id was not specified but it is required when building UpdatePartnershipOutput",
                )
            })?,
            partnership_arn: self.partnership_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "partnership_arn",
                    "partnership_arn was not specified but it is required when building UpdatePartnershipOutput",
                )
            })?,
            name: self.name,
            email: self.email,
            phone: self.phone,
            capabilities: self.capabilities,
            capability_options: self.capability_options,
            trading_partner_id: self.trading_partner_id,
            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 UpdatePartnershipOutput",
                )
            })?,
            modified_at: self.modified_at,
            _request_id: self._request_id,
        })
    }
}
impl ::std::fmt::Debug for UpdatePartnershipOutputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdatePartnershipOutputBuilder");
        formatter.field("profile_id", &self.profile_id);
        formatter.field("partnership_id", &self.partnership_id);
        formatter.field("partnership_arn", &self.partnership_arn);
        formatter.field("name", &self.name);
        formatter.field("email", &"*** Sensitive Data Redacted ***");
        formatter.field("phone", &"*** Sensitive Data Redacted ***");
        formatter.field("capabilities", &self.capabilities);
        formatter.field("capability_options", &self.capability_options);
        formatter.field("trading_partner_id", &self.trading_partner_id);
        formatter.field("created_at", &self.created_at);
        formatter.field("modified_at", &self.modified_at);
        formatter.field("_request_id", &self._request_id);
        formatter.finish()
    }
}