aws_sdk_codestarconnections/operation/update_host/
_update_host_input.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 UpdateHostInput {
6    /// <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
7    pub host_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The URL or endpoint of the host to be updated.</p>
9    pub provider_endpoint: ::std::option::Option<::std::string::String>,
10    /// <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
11    pub vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
12}
13impl UpdateHostInput {
14    /// <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
15    pub fn host_arn(&self) -> ::std::option::Option<&str> {
16        self.host_arn.as_deref()
17    }
18    /// <p>The URL or endpoint of the host to be updated.</p>
19    pub fn provider_endpoint(&self) -> ::std::option::Option<&str> {
20        self.provider_endpoint.as_deref()
21    }
22    /// <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
23    pub fn vpc_configuration(&self) -> ::std::option::Option<&crate::types::VpcConfiguration> {
24        self.vpc_configuration.as_ref()
25    }
26}
27impl UpdateHostInput {
28    /// Creates a new builder-style object to manufacture [`UpdateHostInput`](crate::operation::update_host::UpdateHostInput).
29    pub fn builder() -> crate::operation::update_host::builders::UpdateHostInputBuilder {
30        crate::operation::update_host::builders::UpdateHostInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateHostInput`](crate::operation::update_host::UpdateHostInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateHostInputBuilder {
38    pub(crate) host_arn: ::std::option::Option<::std::string::String>,
39    pub(crate) provider_endpoint: ::std::option::Option<::std::string::String>,
40    pub(crate) vpc_configuration: ::std::option::Option<crate::types::VpcConfiguration>,
41}
42impl UpdateHostInputBuilder {
43    /// <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
44    /// This field is required.
45    pub fn host_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.host_arn = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
50    pub fn set_host_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.host_arn = input;
52        self
53    }
54    /// <p>The Amazon Resource Name (ARN) of the host to be updated.</p>
55    pub fn get_host_arn(&self) -> &::std::option::Option<::std::string::String> {
56        &self.host_arn
57    }
58    /// <p>The URL or endpoint of the host to be updated.</p>
59    pub fn provider_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.provider_endpoint = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The URL or endpoint of the host to be updated.</p>
64    pub fn set_provider_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.provider_endpoint = input;
66        self
67    }
68    /// <p>The URL or endpoint of the host to be updated.</p>
69    pub fn get_provider_endpoint(&self) -> &::std::option::Option<::std::string::String> {
70        &self.provider_endpoint
71    }
72    /// <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
73    pub fn vpc_configuration(mut self, input: crate::types::VpcConfiguration) -> Self {
74        self.vpc_configuration = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
78    pub fn set_vpc_configuration(mut self, input: ::std::option::Option<crate::types::VpcConfiguration>) -> Self {
79        self.vpc_configuration = input;
80        self
81    }
82    /// <p>The VPC configuration of the host to be updated. A VPC must be configured and the infrastructure to be represented by the host must already be connected to the VPC.</p>
83    pub fn get_vpc_configuration(&self) -> &::std::option::Option<crate::types::VpcConfiguration> {
84        &self.vpc_configuration
85    }
86    /// Consumes the builder and constructs a [`UpdateHostInput`](crate::operation::update_host::UpdateHostInput).
87    pub fn build(self) -> ::std::result::Result<crate::operation::update_host::UpdateHostInput, ::aws_smithy_types::error::operation::BuildError> {
88        ::std::result::Result::Ok(crate::operation::update_host::UpdateHostInput {
89            host_arn: self.host_arn,
90            provider_endpoint: self.provider_endpoint,
91            vpc_configuration: self.vpc_configuration,
92        })
93    }
94}