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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// 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 RegisterContainerImageInput {
    /// <p>The name of the container service for which to register a container image.</p>
    pub service_name: ::std::option::Option<::std::string::String>,
    /// <p>The label for the container image when it's registered to the container service.</p>
    /// <p>Use a descriptive label that you can use to track the different versions of your registered container images.</p>
    /// <p>Use the <code>GetContainerImages</code> action to return the container images registered to a Lightsail container service. The label is the <code>
    /// <imagelabel></imagelabel></code> portion of the following image name example:</p>
    /// <ul>
    /// <li> <p> <code>:container-service-1.
    /// <imagelabel>
    /// .1
    /// </imagelabel></code> </p> </li>
    /// </ul>
    /// <p>If the name of your container service is <code>mycontainerservice</code>, and the label that you specify is <code>mystaticwebsite</code>, then the name of the registered container image will be <code>:mycontainerservice.mystaticwebsite.1</code>.</p>
    /// <p>The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be <code>2</code>. If you push and register another container image, the version number will be <code>3</code>, and so on.</p>
    pub label: ::std::option::Option<::std::string::String>,
    /// <p>The digest of the container image to be registered.</p>
    pub digest: ::std::option::Option<::std::string::String>,
}
impl RegisterContainerImageInput {
    /// <p>The name of the container service for which to register a container image.</p>
    pub fn service_name(&self) -> ::std::option::Option<&str> {
        self.service_name.as_deref()
    }
    /// <p>The label for the container image when it's registered to the container service.</p>
    /// <p>Use a descriptive label that you can use to track the different versions of your registered container images.</p>
    /// <p>Use the <code>GetContainerImages</code> action to return the container images registered to a Lightsail container service. The label is the <code>
    /// <imagelabel></imagelabel></code> portion of the following image name example:</p>
    /// <ul>
    /// <li> <p> <code>:container-service-1.
    /// <imagelabel>
    /// .1
    /// </imagelabel></code> </p> </li>
    /// </ul>
    /// <p>If the name of your container service is <code>mycontainerservice</code>, and the label that you specify is <code>mystaticwebsite</code>, then the name of the registered container image will be <code>:mycontainerservice.mystaticwebsite.1</code>.</p>
    /// <p>The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be <code>2</code>. If you push and register another container image, the version number will be <code>3</code>, and so on.</p>
    pub fn label(&self) -> ::std::option::Option<&str> {
        self.label.as_deref()
    }
    /// <p>The digest of the container image to be registered.</p>
    pub fn digest(&self) -> ::std::option::Option<&str> {
        self.digest.as_deref()
    }
}
impl RegisterContainerImageInput {
    /// Creates a new builder-style object to manufacture [`RegisterContainerImageInput`](crate::operation::register_container_image::RegisterContainerImageInput).
    pub fn builder() -> crate::operation::register_container_image::builders::RegisterContainerImageInputBuilder {
        crate::operation::register_container_image::builders::RegisterContainerImageInputBuilder::default()
    }
}

/// A builder for [`RegisterContainerImageInput`](crate::operation::register_container_image::RegisterContainerImageInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RegisterContainerImageInputBuilder {
    pub(crate) service_name: ::std::option::Option<::std::string::String>,
    pub(crate) label: ::std::option::Option<::std::string::String>,
    pub(crate) digest: ::std::option::Option<::std::string::String>,
}
impl RegisterContainerImageInputBuilder {
    /// <p>The name of the container service for which to register a container image.</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 register a container image.</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 register a container image.</p>
    pub fn get_service_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_name
    }
    /// <p>The label for the container image when it's registered to the container service.</p>
    /// <p>Use a descriptive label that you can use to track the different versions of your registered container images.</p>
    /// <p>Use the <code>GetContainerImages</code> action to return the container images registered to a Lightsail container service. The label is the <code>
    /// <imagelabel></imagelabel></code> portion of the following image name example:</p>
    /// <ul>
    /// <li> <p> <code>:container-service-1.
    /// <imagelabel>
    /// .1
    /// </imagelabel></code> </p> </li>
    /// </ul>
    /// <p>If the name of your container service is <code>mycontainerservice</code>, and the label that you specify is <code>mystaticwebsite</code>, then the name of the registered container image will be <code>:mycontainerservice.mystaticwebsite.1</code>.</p>
    /// <p>The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be <code>2</code>. If you push and register another container image, the version number will be <code>3</code>, and so on.</p>
    /// This field is required.
    pub fn label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The label for the container image when it's registered to the container service.</p>
    /// <p>Use a descriptive label that you can use to track the different versions of your registered container images.</p>
    /// <p>Use the <code>GetContainerImages</code> action to return the container images registered to a Lightsail container service. The label is the <code>
    /// <imagelabel></imagelabel></code> portion of the following image name example:</p>
    /// <ul>
    /// <li> <p> <code>:container-service-1.
    /// <imagelabel>
    /// .1
    /// </imagelabel></code> </p> </li>
    /// </ul>
    /// <p>If the name of your container service is <code>mycontainerservice</code>, and the label that you specify is <code>mystaticwebsite</code>, then the name of the registered container image will be <code>:mycontainerservice.mystaticwebsite.1</code>.</p>
    /// <p>The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be <code>2</code>. If you push and register another container image, the version number will be <code>3</code>, and so on.</p>
    pub fn set_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.label = input;
        self
    }
    /// <p>The label for the container image when it's registered to the container service.</p>
    /// <p>Use a descriptive label that you can use to track the different versions of your registered container images.</p>
    /// <p>Use the <code>GetContainerImages</code> action to return the container images registered to a Lightsail container service. The label is the <code>
    /// <imagelabel></imagelabel></code> portion of the following image name example:</p>
    /// <ul>
    /// <li> <p> <code>:container-service-1.
    /// <imagelabel>
    /// .1
    /// </imagelabel></code> </p> </li>
    /// </ul>
    /// <p>If the name of your container service is <code>mycontainerservice</code>, and the label that you specify is <code>mystaticwebsite</code>, then the name of the registered container image will be <code>:mycontainerservice.mystaticwebsite.1</code>.</p>
    /// <p>The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be <code>2</code>. If you push and register another container image, the version number will be <code>3</code>, and so on.</p>
    pub fn get_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.label
    }
    /// <p>The digest of the container image to be registered.</p>
    /// This field is required.
    pub fn digest(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.digest = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The digest of the container image to be registered.</p>
    pub fn set_digest(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.digest = input;
        self
    }
    /// <p>The digest of the container image to be registered.</p>
    pub fn get_digest(&self) -> &::std::option::Option<::std::string::String> {
        &self.digest
    }
    /// Consumes the builder and constructs a [`RegisterContainerImageInput`](crate::operation::register_container_image::RegisterContainerImageInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::register_container_image::RegisterContainerImageInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::register_container_image::RegisterContainerImageInput {
            service_name: self.service_name,
            label: self.label,
            digest: self.digest,
        })
    }
}