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
// 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 BatchCheckLayerAvailabilityInput {
    /// <p>The Amazon Web Services account ID, or registry alias, associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.</p>
    pub registry_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the repository that's associated with the image layers to check.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The digests of the image layers to check.</p>
    pub layer_digests: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchCheckLayerAvailabilityInput {
    /// <p>The Amazon Web Services account ID, or registry alias, associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn registry_id(&self) -> ::std::option::Option<&str> {
        self.registry_id.as_deref()
    }
    /// <p>The name of the repository that's associated with the image layers to check.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The digests of the image layers to check.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.layer_digests.is_none()`.
    pub fn layer_digests(&self) -> &[::std::string::String] {
        self.layer_digests.as_deref().unwrap_or_default()
    }
}
impl BatchCheckLayerAvailabilityInput {
    /// Creates a new builder-style object to manufacture [`BatchCheckLayerAvailabilityInput`](crate::operation::batch_check_layer_availability::BatchCheckLayerAvailabilityInput).
    pub fn builder() -> crate::operation::batch_check_layer_availability::builders::BatchCheckLayerAvailabilityInputBuilder {
        crate::operation::batch_check_layer_availability::builders::BatchCheckLayerAvailabilityInputBuilder::default()
    }
}

/// A builder for [`BatchCheckLayerAvailabilityInput`](crate::operation::batch_check_layer_availability::BatchCheckLayerAvailabilityInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchCheckLayerAvailabilityInputBuilder {
    pub(crate) registry_id: ::std::option::Option<::std::string::String>,
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) layer_digests: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchCheckLayerAvailabilityInputBuilder {
    /// <p>The Amazon Web Services account ID, or registry alias, associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.registry_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID, or registry alias, associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.registry_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID, or registry alias, associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.registry_id
    }
    /// <p>The name of the repository that's associated with the image layers to check.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository that's associated with the image layers to check.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository that's associated with the image layers to check.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// Appends an item to `layer_digests`.
    ///
    /// To override the contents of this collection use [`set_layer_digests`](Self::set_layer_digests).
    ///
    /// <p>The digests of the image layers to check.</p>
    pub fn layer_digests(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.layer_digests.unwrap_or_default();
        v.push(input.into());
        self.layer_digests = ::std::option::Option::Some(v);
        self
    }
    /// <p>The digests of the image layers to check.</p>
    pub fn set_layer_digests(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.layer_digests = input;
        self
    }
    /// <p>The digests of the image layers to check.</p>
    pub fn get_layer_digests(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.layer_digests
    }
    /// Consumes the builder and constructs a [`BatchCheckLayerAvailabilityInput`](crate::operation::batch_check_layer_availability::BatchCheckLayerAvailabilityInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::batch_check_layer_availability::BatchCheckLayerAvailabilityInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::batch_check_layer_availability::BatchCheckLayerAvailabilityInput {
            registry_id: self.registry_id,
            repository_name: self.repository_name,
            layer_digests: self.layer_digests,
        })
    }
}