aws_sdk_codestarconnections/operation/get_host/
_get_host_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 GetHostOutput {
6    /// <p>The name of the requested host.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The status of the requested host.</p>
9    pub status: ::std::option::Option<::std::string::String>,
10    /// <p>The provider type of the requested host, such as GitHub Enterprise Server.</p>
11    pub provider_type: ::std::option::Option<crate::types::ProviderType>,
12    /// <p>The endpoint of the infrastructure represented by the requested host.</p>
13    pub provider_endpoint: ::std::option::Option<::std::string::String>,
14    /// <p>The VPC configuration of the requested host.</p>
15    pub vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
16    _request_id: Option<String>,
17}
18impl GetHostOutput {
19    /// <p>The name of the requested host.</p>
20    pub fn name(&self) -> ::std::option::Option<&str> {
21        self.name.as_deref()
22    }
23    /// <p>The status of the requested host.</p>
24    pub fn status(&self) -> ::std::option::Option<&str> {
25        self.status.as_deref()
26    }
27    /// <p>The provider type of the requested host, such as GitHub Enterprise Server.</p>
28    pub fn provider_type(&self) -> ::std::option::Option<&crate::types::ProviderType> {
29        self.provider_type.as_ref()
30    }
31    /// <p>The endpoint of the infrastructure represented by the requested host.</p>
32    pub fn provider_endpoint(&self) -> ::std::option::Option<&str> {
33        self.provider_endpoint.as_deref()
34    }
35    /// <p>The VPC configuration of the requested host.</p>
36    pub fn vpc_configuration(&self) -> ::std::option::Option<&crate::types::VpcConfiguration> {
37        self.vpc_configuration.as_ref()
38    }
39}
40impl ::aws_types::request_id::RequestId for GetHostOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl GetHostOutput {
46    /// Creates a new builder-style object to manufacture [`GetHostOutput`](crate::operation::get_host::GetHostOutput).
47    pub fn builder() -> crate::operation::get_host::builders::GetHostOutputBuilder {
48        crate::operation::get_host::builders::GetHostOutputBuilder::default()
49    }
50}
51
52/// A builder for [`GetHostOutput`](crate::operation::get_host::GetHostOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct GetHostOutputBuilder {
56    pub(crate) name: ::std::option::Option<::std::string::String>,
57    pub(crate) status: ::std::option::Option<::std::string::String>,
58    pub(crate) provider_type: ::std::option::Option<crate::types::ProviderType>,
59    pub(crate) provider_endpoint: ::std::option::Option<::std::string::String>,
60    pub(crate) vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
61    _request_id: Option<String>,
62}
63impl GetHostOutputBuilder {
64    /// <p>The name of the requested host.</p>
65    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.name = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>The name of the requested host.</p>
70    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.name = input;
72        self
73    }
74    /// <p>The name of the requested host.</p>
75    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
76        &self.name
77    }
78    /// <p>The status of the requested host.</p>
79    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.status = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The status of the requested host.</p>
84    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.status = input;
86        self
87    }
88    /// <p>The status of the requested host.</p>
89    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
90        &self.status
91    }
92    /// <p>The provider type of the requested host, such as GitHub Enterprise Server.</p>
93    pub fn provider_type(mut self, input: crate::types::ProviderType) -> Self {
94        self.provider_type = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The provider type of the requested host, such as GitHub Enterprise Server.</p>
98    pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ProviderType>) -> Self {
99        self.provider_type = input;
100        self
101    }
102    /// <p>The provider type of the requested host, such as GitHub Enterprise Server.</p>
103    pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ProviderType> {
104        &self.provider_type
105    }
106    /// <p>The endpoint of the infrastructure represented by the requested host.</p>
107    pub fn provider_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108        self.provider_endpoint = ::std::option::Option::Some(input.into());
109        self
110    }
111    /// <p>The endpoint of the infrastructure represented by the requested host.</p>
112    pub fn set_provider_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113        self.provider_endpoint = input;
114        self
115    }
116    /// <p>The endpoint of the infrastructure represented by the requested host.</p>
117    pub fn get_provider_endpoint(&self) -> &::std::option::Option<::std::string::String> {
118        &self.provider_endpoint
119    }
120    /// <p>The VPC configuration of the requested host.</p>
121    pub fn vpc_configuration(mut self, input: crate::types::VpcConfiguration) -> Self {
122        self.vpc_configuration = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The VPC configuration of the requested host.</p>
126    pub fn set_vpc_configuration(mut self, input: ::std::option::Option<crate::types::VpcConfiguration>) -> Self {
127        self.vpc_configuration = input;
128        self
129    }
130    /// <p>The VPC configuration of the requested host.</p>
131    pub fn get_vpc_configuration(&self) -> &::std::option::Option<crate::types::VpcConfiguration> {
132        &self.vpc_configuration
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`GetHostOutput`](crate::operation::get_host::GetHostOutput).
144    pub fn build(self) -> crate::operation::get_host::GetHostOutput {
145        crate::operation::get_host::GetHostOutput {
146            name: self.name,
147            status: self.status,
148            provider_type: self.provider_type,
149            provider_endpoint: self.provider_endpoint,
150            vpc_configuration: self.vpc_configuration,
151            _request_id: self._request_id,
152        }
153    }
154}