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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// This file is @generated by prost-build.
/// Layer holds metadata specific to a layer of a Docker image.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Layer {
    /// Required. The recovered Dockerfile directive used to construct this layer.
    #[prost(enumeration = "layer::Directive", tag = "1")]
    pub directive: i32,
    /// The recovered arguments to the Dockerfile directive.
    #[prost(string, tag = "2")]
    pub arguments: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Layer`.
pub mod layer {
    /// Instructions from Dockerfile.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Directive {
        /// Default value for unsupported/missing directive.
        Unspecified = 0,
        /// <https://docs.docker.com/engine/reference/builder/>
        Maintainer = 1,
        /// <https://docs.docker.com/engine/reference/builder/>
        Run = 2,
        /// <https://docs.docker.com/engine/reference/builder/>
        Cmd = 3,
        /// <https://docs.docker.com/engine/reference/builder/>
        Label = 4,
        /// <https://docs.docker.com/engine/reference/builder/>
        Expose = 5,
        /// <https://docs.docker.com/engine/reference/builder/>
        Env = 6,
        /// <https://docs.docker.com/engine/reference/builder/>
        Add = 7,
        /// <https://docs.docker.com/engine/reference/builder/>
        Copy = 8,
        /// <https://docs.docker.com/engine/reference/builder/>
        Entrypoint = 9,
        /// <https://docs.docker.com/engine/reference/builder/>
        Volume = 10,
        /// <https://docs.docker.com/engine/reference/builder/>
        User = 11,
        /// <https://docs.docker.com/engine/reference/builder/>
        Workdir = 12,
        /// <https://docs.docker.com/engine/reference/builder/>
        Arg = 13,
        /// <https://docs.docker.com/engine/reference/builder/>
        Onbuild = 14,
        /// <https://docs.docker.com/engine/reference/builder/>
        Stopsignal = 15,
        /// <https://docs.docker.com/engine/reference/builder/>
        Healthcheck = 16,
        /// <https://docs.docker.com/engine/reference/builder/>
        Shell = 17,
    }
    impl Directive {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Directive::Unspecified => "DIRECTIVE_UNSPECIFIED",
                Directive::Maintainer => "MAINTAINER",
                Directive::Run => "RUN",
                Directive::Cmd => "CMD",
                Directive::Label => "LABEL",
                Directive::Expose => "EXPOSE",
                Directive::Env => "ENV",
                Directive::Add => "ADD",
                Directive::Copy => "COPY",
                Directive::Entrypoint => "ENTRYPOINT",
                Directive::Volume => "VOLUME",
                Directive::User => "USER",
                Directive::Workdir => "WORKDIR",
                Directive::Arg => "ARG",
                Directive::Onbuild => "ONBUILD",
                Directive::Stopsignal => "STOPSIGNAL",
                Directive::Healthcheck => "HEALTHCHECK",
                Directive::Shell => "SHELL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "DIRECTIVE_UNSPECIFIED" => Some(Self::Unspecified),
                "MAINTAINER" => Some(Self::Maintainer),
                "RUN" => Some(Self::Run),
                "CMD" => Some(Self::Cmd),
                "LABEL" => Some(Self::Label),
                "EXPOSE" => Some(Self::Expose),
                "ENV" => Some(Self::Env),
                "ADD" => Some(Self::Add),
                "COPY" => Some(Self::Copy),
                "ENTRYPOINT" => Some(Self::Entrypoint),
                "VOLUME" => Some(Self::Volume),
                "USER" => Some(Self::User),
                "WORKDIR" => Some(Self::Workdir),
                "ARG" => Some(Self::Arg),
                "ONBUILD" => Some(Self::Onbuild),
                "STOPSIGNAL" => Some(Self::Stopsignal),
                "HEALTHCHECK" => Some(Self::Healthcheck),
                "SHELL" => Some(Self::Shell),
                _ => None,
            }
        }
    }
}
/// A set of properties that uniquely identify a given Docker image.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Fingerprint {
    /// Required. The layer ID of the final layer in the Docker image's v1
    /// representation.
    #[prost(string, tag = "1")]
    pub v1_name: ::prost::alloc::string::String,
    /// Required. The ordered list of v2 blobs that represent a given image.
    #[prost(string, repeated, tag = "2")]
    pub v2_blob: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Output only. The name of the image's v2 blobs computed via:
    ///    \[bottom\] := v2_blob\[bottom\]
    ///    \[N\] := sha256(v2_blob\[N\] + " " + v2_name\[N+1\])
    /// Only the name of the final blob is kept.
    #[prost(string, tag = "3")]
    pub v2_name: ::prost::alloc::string::String,
}
/// Basis describes the base image portion (Note) of the DockerImage
/// relationship. Linked occurrences are derived from this or an
/// equivalent image via:
///    FROM <Basis.resource_url>
/// Or an equivalent reference, e.g. a tag of the resource_url.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Basis {
    /// Required. Immutable. The resource_url for the resource representing the
    /// basis of associated occurrence images.
    #[prost(string, tag = "1")]
    pub resource_url: ::prost::alloc::string::String,
    /// Required. Immutable. The fingerprint of the base image.
    #[prost(message, optional, tag = "2")]
    pub fingerprint: ::core::option::Option<Fingerprint>,
}
/// Details of an image occurrence.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Details {
    /// Required. Immutable. The child image derived from the base image.
    #[prost(message, optional, tag = "1")]
    pub derived_image: ::core::option::Option<Derived>,
}
/// Derived describes the derived image portion (Occurrence) of the DockerImage
/// relationship. This image would be produced from a Dockerfile with FROM
/// <DockerImage.Basis in attached Note>.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Derived {
    /// Required. The fingerprint of the derived image.
    #[prost(message, optional, tag = "1")]
    pub fingerprint: ::core::option::Option<Fingerprint>,
    /// Output only. The number of layers by which this image differs from the
    /// associated image basis.
    #[prost(int32, tag = "2")]
    pub distance: i32,
    /// This contains layer-specific metadata, if populated it has length
    /// "distance" and is ordered with \[distance\] being the layer immediately
    /// following the base image and \[1\] being the final layer.
    #[prost(message, repeated, tag = "3")]
    pub layer_info: ::prost::alloc::vec::Vec<Layer>,
    /// Output only. This contains the base image URL for the derived image
    /// occurrence.
    #[prost(string, tag = "4")]
    pub base_resource_url: ::prost::alloc::string::String,
}