aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
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 CreateIntegrationConnectionOutput {
    /// <p>The ID of the integration connection.</p>
    pub connection_id: ::std::string::String,
    /// <p>The name of the integration.</p>
    pub integration_name: ::std::string::String,
    _request_id: Option<String>,
}
impl CreateIntegrationConnectionOutput {
    /// <p>The ID of the integration connection.</p>
    pub fn connection_id(&self) -> &str {
        use std::ops::Deref;
        self.connection_id.deref()
    }
    /// <p>The name of the integration.</p>
    pub fn integration_name(&self) -> &str {
        use std::ops::Deref;
        self.integration_name.deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateIntegrationConnectionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateIntegrationConnectionOutput {
    /// Creates a new builder-style object to manufacture [`CreateIntegrationConnectionOutput`](crate::operation::create_integration_connection::CreateIntegrationConnectionOutput).
    pub fn builder() -> crate::operation::create_integration_connection::builders::CreateIntegrationConnectionOutputBuilder {
        crate::operation::create_integration_connection::builders::CreateIntegrationConnectionOutputBuilder::default()
    }
}

/// A builder for [`CreateIntegrationConnectionOutput`](crate::operation::create_integration_connection::CreateIntegrationConnectionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateIntegrationConnectionOutputBuilder {
    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateIntegrationConnectionOutputBuilder {
    /// <p>The ID of the integration connection.</p>
    /// This field is required.
    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the integration connection.</p>
    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_id = input;
        self
    }
    /// <p>The ID of the integration connection.</p>
    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_id
    }
    /// <p>The name of the integration.</p>
    /// This field is required.
    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the integration.</p>
    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_name = input;
        self
    }
    /// <p>The name of the integration.</p>
    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_name
    }
    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 [`CreateIntegrationConnectionOutput`](crate::operation::create_integration_connection::CreateIntegrationConnectionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`connection_id`](crate::operation::create_integration_connection::builders::CreateIntegrationConnectionOutputBuilder::connection_id)
    /// - [`integration_name`](crate::operation::create_integration_connection::builders::CreateIntegrationConnectionOutputBuilder::integration_name)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_integration_connection::CreateIntegrationConnectionOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_integration_connection::CreateIntegrationConnectionOutput {
            connection_id: self.connection_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "connection_id",
                    "connection_id was not specified but it is required when building CreateIntegrationConnectionOutput",
                )
            })?,
            integration_name: self.integration_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_name",
                    "integration_name was not specified but it is required when building CreateIntegrationConnectionOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}