aws-sdk-rtbfabric 1.24.0

AWS SDK for RTBFabric
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 CreateRequesterGatewayOutput {
    /// <p>The unique identifier of the gateway.</p>
    pub gateway_id: ::std::string::String,
    /// <p>The domain name of the requester gateway.</p>
    pub domain_name: ::std::string::String,
    /// <p>The status of the request.</p>
    pub status: crate::types::RequesterGatewayStatus,
    _request_id: Option<String>,
}
impl CreateRequesterGatewayOutput {
    /// <p>The unique identifier of the gateway.</p>
    pub fn gateway_id(&self) -> &str {
        use std::ops::Deref;
        self.gateway_id.deref()
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn domain_name(&self) -> &str {
        use std::ops::Deref;
        self.domain_name.deref()
    }
    /// <p>The status of the request.</p>
    pub fn status(&self) -> &crate::types::RequesterGatewayStatus {
        &self.status
    }
}
impl ::aws_types::request_id::RequestId for CreateRequesterGatewayOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateRequesterGatewayOutput {
    /// Creates a new builder-style object to manufacture [`CreateRequesterGatewayOutput`](crate::operation::create_requester_gateway::CreateRequesterGatewayOutput).
    pub fn builder() -> crate::operation::create_requester_gateway::builders::CreateRequesterGatewayOutputBuilder {
        crate::operation::create_requester_gateway::builders::CreateRequesterGatewayOutputBuilder::default()
    }
}

/// A builder for [`CreateRequesterGatewayOutput`](crate::operation::create_requester_gateway::CreateRequesterGatewayOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRequesterGatewayOutputBuilder {
    pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::RequesterGatewayStatus>,
    _request_id: Option<String>,
}
impl CreateRequesterGatewayOutputBuilder {
    /// <p>The unique identifier of the gateway.</p>
    /// This field is required.
    pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_id = input;
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_id
    }
    /// <p>The domain name of the requester gateway.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The domain name of the requester gateway.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The status of the request.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::RequesterGatewayStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RequesterGatewayStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RequesterGatewayStatus> {
        &self.status
    }
    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 [`CreateRequesterGatewayOutput`](crate::operation::create_requester_gateway::CreateRequesterGatewayOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`gateway_id`](crate::operation::create_requester_gateway::builders::CreateRequesterGatewayOutputBuilder::gateway_id)
    /// - [`domain_name`](crate::operation::create_requester_gateway::builders::CreateRequesterGatewayOutputBuilder::domain_name)
    /// - [`status`](crate::operation::create_requester_gateway::builders::CreateRequesterGatewayOutputBuilder::status)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_requester_gateway::CreateRequesterGatewayOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_requester_gateway::CreateRequesterGatewayOutput {
            gateway_id: self.gateway_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "gateway_id",
                    "gateway_id was not specified but it is required when building CreateRequesterGatewayOutput",
                )
            })?,
            domain_name: self.domain_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "domain_name",
                    "domain_name was not specified but it is required when building CreateRequesterGatewayOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building CreateRequesterGatewayOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}