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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// 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 CreateContainerServiceDeploymentInput {
    /// <p>The name of the container service for which to create the deployment.</p>
    pub service_name: ::std::option::Option<::std::string::String>,
    /// <p>An object that describes the settings of the containers that will be launched on the container service.</p>
    pub containers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Container>>,
    /// <p>An object that describes the settings of the public endpoint for the container service.</p>
    pub public_endpoint: ::std::option::Option<crate::types::EndpointRequest>,
}
impl CreateContainerServiceDeploymentInput {
    /// <p>The name of the container service for which to create the deployment.</p>
    pub fn service_name(&self) -> ::std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>An object that describes the settings of the containers that will be launched on the container service.</p>
    pub fn containers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::Container>> {
        self.containers.as_ref()
    }
    /// <p>An object that describes the settings of the public endpoint for the container service.</p>
    pub fn public_endpoint(&self) -> ::std::option::Option<&crate::types::EndpointRequest> {
        self.public_endpoint.as_ref()
    }
}
impl CreateContainerServiceDeploymentInput {
    /// Creates a new builder-style object to manufacture [`CreateContainerServiceDeploymentInput`](crate::operation::create_container_service_deployment::CreateContainerServiceDeploymentInput).
    pub fn builder() -> crate::operation::create_container_service_deployment::builders::CreateContainerServiceDeploymentInputBuilder {
        crate::operation::create_container_service_deployment::builders::CreateContainerServiceDeploymentInputBuilder::default()
    }
}

/// A builder for [`CreateContainerServiceDeploymentInput`](crate::operation::create_container_service_deployment::CreateContainerServiceDeploymentInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateContainerServiceDeploymentInputBuilder {
    pub(crate) service_name: ::std::option::Option<::std::string::String>,
    pub(crate) containers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Container>>,
    pub(crate) public_endpoint: ::std::option::Option<crate::types::EndpointRequest>,
}
impl CreateContainerServiceDeploymentInputBuilder {
    /// <p>The name of the container service for which to create the deployment.</p>
    /// This field is required.
    pub fn service_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the container service for which to create the deployment.</p>
    pub fn set_service_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_name = input;
        self
    }
    /// <p>The name of the container service for which to create the deployment.</p>
    pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_name
    }
    /// Adds a key-value pair to `containers`.
    ///
    /// To override the contents of this collection use [`set_containers`](Self::set_containers).
    ///
    /// <p>An object that describes the settings of the containers that will be launched on the container service.</p>
    pub fn containers(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::Container) -> Self {
        let mut hash_map = self.containers.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.containers = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>An object that describes the settings of the containers that will be launched on the container service.</p>
    pub fn set_containers(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Container>>,
    ) -> Self {
        self.containers = input;
        self
    }
    /// <p>An object that describes the settings of the containers that will be launched on the container service.</p>
    pub fn get_containers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::Container>> {
        &self.containers
    }
    /// <p>An object that describes the settings of the public endpoint for the container service.</p>
    pub fn public_endpoint(mut self, input: crate::types::EndpointRequest) -> Self {
        self.public_endpoint = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that describes the settings of the public endpoint for the container service.</p>
    pub fn set_public_endpoint(mut self, input: ::std::option::Option<crate::types::EndpointRequest>) -> Self {
        self.public_endpoint = input;
        self
    }
    /// <p>An object that describes the settings of the public endpoint for the container service.</p>
    pub fn get_public_endpoint(&self) -> &::std::option::Option<crate::types::EndpointRequest> {
        &self.public_endpoint
    }
    /// Consumes the builder and constructs a [`CreateContainerServiceDeploymentInput`](crate::operation::create_container_service_deployment::CreateContainerServiceDeploymentInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_container_service_deployment::CreateContainerServiceDeploymentInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::create_container_service_deployment::CreateContainerServiceDeploymentInput {
                service_name: self.service_name,
                containers: self.containers,
                public_endpoint: self.public_endpoint,
            },
        )
    }
}