aws-sdk-imagebuilder 1.110.0

AWS SDK for EC2 Image Builder
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>GetInfrastructureConfiguration response object.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetInfrastructureConfigurationOutput {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The infrastructure configuration object.</p>
    pub infrastructure_configuration: ::std::option::Option<crate::types::InfrastructureConfiguration>,
    _request_id: Option<String>,
}
impl GetInfrastructureConfigurationOutput {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The infrastructure configuration object.</p>
    pub fn infrastructure_configuration(&self) -> ::std::option::Option<&crate::types::InfrastructureConfiguration> {
        self.infrastructure_configuration.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetInfrastructureConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetInfrastructureConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`GetInfrastructureConfigurationOutput`](crate::operation::get_infrastructure_configuration::GetInfrastructureConfigurationOutput).
    pub fn builder() -> crate::operation::get_infrastructure_configuration::builders::GetInfrastructureConfigurationOutputBuilder {
        crate::operation::get_infrastructure_configuration::builders::GetInfrastructureConfigurationOutputBuilder::default()
    }
}

/// A builder for [`GetInfrastructureConfigurationOutput`](crate::operation::get_infrastructure_configuration::GetInfrastructureConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetInfrastructureConfigurationOutputBuilder {
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) infrastructure_configuration: ::std::option::Option<crate::types::InfrastructureConfiguration>,
    _request_id: Option<String>,
}
impl GetInfrastructureConfigurationOutputBuilder {
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The request ID that uniquely identifies this request.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The infrastructure configuration object.</p>
    pub fn infrastructure_configuration(mut self, input: crate::types::InfrastructureConfiguration) -> Self {
        self.infrastructure_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The infrastructure configuration object.</p>
    pub fn set_infrastructure_configuration(mut self, input: ::std::option::Option<crate::types::InfrastructureConfiguration>) -> Self {
        self.infrastructure_configuration = input;
        self
    }
    /// <p>The infrastructure configuration object.</p>
    pub fn get_infrastructure_configuration(&self) -> &::std::option::Option<crate::types::InfrastructureConfiguration> {
        &self.infrastructure_configuration
    }
    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 [`GetInfrastructureConfigurationOutput`](crate::operation::get_infrastructure_configuration::GetInfrastructureConfigurationOutput).
    pub fn build(self) -> crate::operation::get_infrastructure_configuration::GetInfrastructureConfigurationOutput {
        crate::operation::get_infrastructure_configuration::GetInfrastructureConfigurationOutput {
            request_id: self.request_id,
            infrastructure_configuration: self.infrastructure_configuration,
            _request_id: self._request_id,
        }
    }
}