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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that represents an Amazon ECR image layer.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Layer {
    /// <p>The <code>sha256</code> digest of the image layer.</p>
    pub layer_digest: ::std::option::Option<::std::string::String>,
    /// <p>The availability status of the image layer.</p>
    pub layer_availability: ::std::option::Option<crate::types::LayerAvailability>,
    /// <p>The size, in bytes, of the image layer.</p>
    pub layer_size: ::std::option::Option<i64>,
    /// <p>The media type of the layer, such as <code>application/vnd.docker.image.rootfs.diff.tar.gzip</code> or <code>application/vnd.oci.image.layer.v1.tar+gzip</code>.</p>
    pub media_type: ::std::option::Option<::std::string::String>,
}
impl Layer {
    /// <p>The <code>sha256</code> digest of the image layer.</p>
    pub fn layer_digest(&self) -> ::std::option::Option<&str> {
        self.layer_digest.as_deref()
    }
    /// <p>The availability status of the image layer.</p>
    pub fn layer_availability(&self) -> ::std::option::Option<&crate::types::LayerAvailability> {
        self.layer_availability.as_ref()
    }
    /// <p>The size, in bytes, of the image layer.</p>
    pub fn layer_size(&self) -> ::std::option::Option<i64> {
        self.layer_size
    }
    /// <p>The media type of the layer, such as <code>application/vnd.docker.image.rootfs.diff.tar.gzip</code> or <code>application/vnd.oci.image.layer.v1.tar+gzip</code>.</p>
    pub fn media_type(&self) -> ::std::option::Option<&str> {
        self.media_type.as_deref()
    }
}
impl Layer {
    /// Creates a new builder-style object to manufacture [`Layer`](crate::types::Layer).
    pub fn builder() -> crate::types::builders::LayerBuilder {
        crate::types::builders::LayerBuilder::default()
    }
}

/// A builder for [`Layer`](crate::types::Layer).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct LayerBuilder {
    pub(crate) layer_digest: ::std::option::Option<::std::string::String>,
    pub(crate) layer_availability: ::std::option::Option<crate::types::LayerAvailability>,
    pub(crate) layer_size: ::std::option::Option<i64>,
    pub(crate) media_type: ::std::option::Option<::std::string::String>,
}
impl LayerBuilder {
    /// <p>The <code>sha256</code> digest of the image layer.</p>
    pub fn layer_digest(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.layer_digest = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>sha256</code> digest of the image layer.</p>
    pub fn set_layer_digest(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.layer_digest = input;
        self
    }
    /// <p>The <code>sha256</code> digest of the image layer.</p>
    pub fn get_layer_digest(&self) -> &::std::option::Option<::std::string::String> {
        &self.layer_digest
    }
    /// <p>The availability status of the image layer.</p>
    pub fn layer_availability(mut self, input: crate::types::LayerAvailability) -> Self {
        self.layer_availability = ::std::option::Option::Some(input);
        self
    }
    /// <p>The availability status of the image layer.</p>
    pub fn set_layer_availability(mut self, input: ::std::option::Option<crate::types::LayerAvailability>) -> Self {
        self.layer_availability = input;
        self
    }
    /// <p>The availability status of the image layer.</p>
    pub fn get_layer_availability(&self) -> &::std::option::Option<crate::types::LayerAvailability> {
        &self.layer_availability
    }
    /// <p>The size, in bytes, of the image layer.</p>
    pub fn layer_size(mut self, input: i64) -> Self {
        self.layer_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size, in bytes, of the image layer.</p>
    pub fn set_layer_size(mut self, input: ::std::option::Option<i64>) -> Self {
        self.layer_size = input;
        self
    }
    /// <p>The size, in bytes, of the image layer.</p>
    pub fn get_layer_size(&self) -> &::std::option::Option<i64> {
        &self.layer_size
    }
    /// <p>The media type of the layer, such as <code>application/vnd.docker.image.rootfs.diff.tar.gzip</code> or <code>application/vnd.oci.image.layer.v1.tar+gzip</code>.</p>
    pub fn media_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.media_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The media type of the layer, such as <code>application/vnd.docker.image.rootfs.diff.tar.gzip</code> or <code>application/vnd.oci.image.layer.v1.tar+gzip</code>.</p>
    pub fn set_media_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.media_type = input;
        self
    }
    /// <p>The media type of the layer, such as <code>application/vnd.docker.image.rootfs.diff.tar.gzip</code> or <code>application/vnd.oci.image.layer.v1.tar+gzip</code>.</p>
    pub fn get_media_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.media_type
    }
    /// Consumes the builder and constructs a [`Layer`](crate::types::Layer).
    pub fn build(self) -> crate::types::Layer {
        crate::types::Layer {
            layer_digest: self.layer_digest,
            layer_availability: self.layer_availability,
            layer_size: self.layer_size,
            media_type: self.media_type,
        }
    }
}