1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the parameters for RegisterInstancesWithLoadBalancer.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RegisterInstancesWithLoadBalancerInput {
    /// <p>The name of the load balancer.</p>
    #[doc(hidden)]
    pub load_balancer_name: std::option::Option<std::string::String>,
    /// <p>The IDs of the instances.</p>
    #[doc(hidden)]
    pub instances: std::option::Option<std::vec::Vec<crate::types::Instance>>,
}
impl RegisterInstancesWithLoadBalancerInput {
    /// <p>The name of the load balancer.</p>
    pub fn load_balancer_name(&self) -> std::option::Option<&str> {
        self.load_balancer_name.as_deref()
    }
    /// <p>The IDs of the instances.</p>
    pub fn instances(&self) -> std::option::Option<&[crate::types::Instance]> {
        self.instances.as_deref()
    }
}
impl RegisterInstancesWithLoadBalancerInput {
    /// Creates a new builder-style object to manufacture [`RegisterInstancesWithLoadBalancerInput`](crate::operation::register_instances_with_load_balancer::RegisterInstancesWithLoadBalancerInput).
    pub fn builder() -> crate::operation::register_instances_with_load_balancer::builders::RegisterInstancesWithLoadBalancerInputBuilder{
        crate::operation::register_instances_with_load_balancer::builders::RegisterInstancesWithLoadBalancerInputBuilder::default()
    }
}

/// A builder for [`RegisterInstancesWithLoadBalancerInput`](crate::operation::register_instances_with_load_balancer::RegisterInstancesWithLoadBalancerInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct RegisterInstancesWithLoadBalancerInputBuilder {
    pub(crate) load_balancer_name: std::option::Option<std::string::String>,
    pub(crate) instances: std::option::Option<std::vec::Vec<crate::types::Instance>>,
}
impl RegisterInstancesWithLoadBalancerInputBuilder {
    /// <p>The name of the load balancer.</p>
    pub fn load_balancer_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.load_balancer_name = Some(input.into());
        self
    }
    /// <p>The name of the load balancer.</p>
    pub fn set_load_balancer_name(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.load_balancer_name = input;
        self
    }
    /// Appends an item to `instances`.
    ///
    /// To override the contents of this collection use [`set_instances`](Self::set_instances).
    ///
    /// <p>The IDs of the instances.</p>
    pub fn instances(mut self, input: crate::types::Instance) -> Self {
        let mut v = self.instances.unwrap_or_default();
        v.push(input);
        self.instances = Some(v);
        self
    }
    /// <p>The IDs of the instances.</p>
    pub fn set_instances(
        mut self,
        input: std::option::Option<std::vec::Vec<crate::types::Instance>>,
    ) -> Self {
        self.instances = input;
        self
    }
    /// Consumes the builder and constructs a [`RegisterInstancesWithLoadBalancerInput`](crate::operation::register_instances_with_load_balancer::RegisterInstancesWithLoadBalancerInput).
    pub fn build(self) -> Result<crate::operation::register_instances_with_load_balancer::RegisterInstancesWithLoadBalancerInput, aws_smithy_http::operation::error::BuildError>{
        Ok(
            crate::operation::register_instances_with_load_balancer::RegisterInstancesWithLoadBalancerInput {
                load_balancer_name: self.load_balancer_name
                ,
                instances: self.instances
                ,
            }
        )
    }
}