aws-sdk-servicediscovery 1.98.0

AWS SDK for AWS Cloud Map
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 GetInstanceOutput {
    /// <p>The ID of the Amazon Web Services account that created the namespace that contains the service that the instance is associated with. If this isn't your account ID, it's the ID of the account that shared the namespace with your account.</p>
    pub resource_owner: ::std::option::Option<::std::string::String>,
    /// <p>A complex type that contains information about a specified instance.</p>
    pub instance: ::std::option::Option<crate::types::Instance>,
    _request_id: Option<String>,
}
impl GetInstanceOutput {
    /// <p>The ID of the Amazon Web Services account that created the namespace that contains the service that the instance is associated with. If this isn't your account ID, it's the ID of the account that shared the namespace with your account.</p>
    pub fn resource_owner(&self) -> ::std::option::Option<&str> {
        self.resource_owner.as_deref()
    }
    /// <p>A complex type that contains information about a specified instance.</p>
    pub fn instance(&self) -> ::std::option::Option<&crate::types::Instance> {
        self.instance.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetInstanceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetInstanceOutput {
    /// Creates a new builder-style object to manufacture [`GetInstanceOutput`](crate::operation::get_instance::GetInstanceOutput).
    pub fn builder() -> crate::operation::get_instance::builders::GetInstanceOutputBuilder {
        crate::operation::get_instance::builders::GetInstanceOutputBuilder::default()
    }
}

/// A builder for [`GetInstanceOutput`](crate::operation::get_instance::GetInstanceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetInstanceOutputBuilder {
    pub(crate) resource_owner: ::std::option::Option<::std::string::String>,
    pub(crate) instance: ::std::option::Option<crate::types::Instance>,
    _request_id: Option<String>,
}
impl GetInstanceOutputBuilder {
    /// <p>The ID of the Amazon Web Services account that created the namespace that contains the service that the instance is associated with. If this isn't your account ID, it's the ID of the account that shared the namespace with your account.</p>
    pub fn resource_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Amazon Web Services account that created the namespace that contains the service that the instance is associated with. If this isn't your account ID, it's the ID of the account that shared the namespace with your account.</p>
    pub fn set_resource_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_owner = input;
        self
    }
    /// <p>The ID of the Amazon Web Services account that created the namespace that contains the service that the instance is associated with. If this isn't your account ID, it's the ID of the account that shared the namespace with your account.</p>
    pub fn get_resource_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_owner
    }
    /// <p>A complex type that contains information about a specified instance.</p>
    pub fn instance(mut self, input: crate::types::Instance) -> Self {
        self.instance = ::std::option::Option::Some(input);
        self
    }
    /// <p>A complex type that contains information about a specified instance.</p>
    pub fn set_instance(mut self, input: ::std::option::Option<crate::types::Instance>) -> Self {
        self.instance = input;
        self
    }
    /// <p>A complex type that contains information about a specified instance.</p>
    pub fn get_instance(&self) -> &::std::option::Option<crate::types::Instance> {
        &self.instance
    }
    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 [`GetInstanceOutput`](crate::operation::get_instance::GetInstanceOutput).
    pub fn build(self) -> crate::operation::get_instance::GetInstanceOutput {
        crate::operation::get_instance::GetInstanceOutput {
            resource_owner: self.resource_owner,
            instance: self.instance,
            _request_id: self._request_id,
        }
    }
}