aws_sdk_ssoadmin/operation/describe_instance/
_describe_instance_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeInstanceOutput {
6    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
7    pub instance_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The identifier of the identity store that is connected to the instance of IAM Identity Center.</p>
9    pub identity_store_id: ::std::option::Option<::std::string::String>,
10    /// <p>The identifier of the Amazon Web Services account for which the instance was created.</p>
11    pub owner_account_id: ::std::option::Option<::std::string::String>,
12    /// <p>Specifies the instance name.</p>
13    pub name: ::std::option::Option<::std::string::String>,
14    /// <p>The date the instance was created.</p>
15    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>The status of the instance.</p>
17    pub status: ::std::option::Option<crate::types::InstanceStatus>,
18    _request_id: Option<String>,
19}
20impl DescribeInstanceOutput {
21    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
22    pub fn instance_arn(&self) -> ::std::option::Option<&str> {
23        self.instance_arn.as_deref()
24    }
25    /// <p>The identifier of the identity store that is connected to the instance of IAM Identity Center.</p>
26    pub fn identity_store_id(&self) -> ::std::option::Option<&str> {
27        self.identity_store_id.as_deref()
28    }
29    /// <p>The identifier of the Amazon Web Services account for which the instance was created.</p>
30    pub fn owner_account_id(&self) -> ::std::option::Option<&str> {
31        self.owner_account_id.as_deref()
32    }
33    /// <p>Specifies the instance name.</p>
34    pub fn name(&self) -> ::std::option::Option<&str> {
35        self.name.as_deref()
36    }
37    /// <p>The date the instance was created.</p>
38    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
39        self.created_date.as_ref()
40    }
41    /// <p>The status of the instance.</p>
42    pub fn status(&self) -> ::std::option::Option<&crate::types::InstanceStatus> {
43        self.status.as_ref()
44    }
45}
46impl ::aws_types::request_id::RequestId for DescribeInstanceOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl DescribeInstanceOutput {
52    /// Creates a new builder-style object to manufacture [`DescribeInstanceOutput`](crate::operation::describe_instance::DescribeInstanceOutput).
53    pub fn builder() -> crate::operation::describe_instance::builders::DescribeInstanceOutputBuilder {
54        crate::operation::describe_instance::builders::DescribeInstanceOutputBuilder::default()
55    }
56}
57
58/// A builder for [`DescribeInstanceOutput`](crate::operation::describe_instance::DescribeInstanceOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct DescribeInstanceOutputBuilder {
62    pub(crate) instance_arn: ::std::option::Option<::std::string::String>,
63    pub(crate) identity_store_id: ::std::option::Option<::std::string::String>,
64    pub(crate) owner_account_id: ::std::option::Option<::std::string::String>,
65    pub(crate) name: ::std::option::Option<::std::string::String>,
66    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
67    pub(crate) status: ::std::option::Option<crate::types::InstanceStatus>,
68    _request_id: Option<String>,
69}
70impl DescribeInstanceOutputBuilder {
71    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
72    pub fn instance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.instance_arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
77    pub fn set_instance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.instance_arn = input;
79        self
80    }
81    /// <p>The ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see <a href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a> in the <i>Amazon Web Services General Reference</i>.</p>
82    pub fn get_instance_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.instance_arn
84    }
85    /// <p>The identifier of the identity store that is connected to the instance of IAM Identity Center.</p>
86    pub fn identity_store_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.identity_store_id = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The identifier of the identity store that is connected to the instance of IAM Identity Center.</p>
91    pub fn set_identity_store_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.identity_store_id = input;
93        self
94    }
95    /// <p>The identifier of the identity store that is connected to the instance of IAM Identity Center.</p>
96    pub fn get_identity_store_id(&self) -> &::std::option::Option<::std::string::String> {
97        &self.identity_store_id
98    }
99    /// <p>The identifier of the Amazon Web Services account for which the instance was created.</p>
100    pub fn owner_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.owner_account_id = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The identifier of the Amazon Web Services account for which the instance was created.</p>
105    pub fn set_owner_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.owner_account_id = input;
107        self
108    }
109    /// <p>The identifier of the Amazon Web Services account for which the instance was created.</p>
110    pub fn get_owner_account_id(&self) -> &::std::option::Option<::std::string::String> {
111        &self.owner_account_id
112    }
113    /// <p>Specifies the instance name.</p>
114    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.name = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>Specifies the instance name.</p>
119    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.name = input;
121        self
122    }
123    /// <p>Specifies the instance name.</p>
124    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
125        &self.name
126    }
127    /// <p>The date the instance was created.</p>
128    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
129        self.created_date = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The date the instance was created.</p>
133    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
134        self.created_date = input;
135        self
136    }
137    /// <p>The date the instance was created.</p>
138    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
139        &self.created_date
140    }
141    /// <p>The status of the instance.</p>
142    pub fn status(mut self, input: crate::types::InstanceStatus) -> Self {
143        self.status = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>The status of the instance.</p>
147    pub fn set_status(mut self, input: ::std::option::Option<crate::types::InstanceStatus>) -> Self {
148        self.status = input;
149        self
150    }
151    /// <p>The status of the instance.</p>
152    pub fn get_status(&self) -> &::std::option::Option<crate::types::InstanceStatus> {
153        &self.status
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`DescribeInstanceOutput`](crate::operation::describe_instance::DescribeInstanceOutput).
165    pub fn build(self) -> crate::operation::describe_instance::DescribeInstanceOutput {
166        crate::operation::describe_instance::DescribeInstanceOutput {
167            instance_arn: self.instance_arn,
168            identity_store_id: self.identity_store_id,
169            owner_account_id: self.owner_account_id,
170            name: self.name,
171            created_date: self.created_date,
172            status: self.status,
173            _request_id: self._request_id,
174        }
175    }
176}