Fork of daniellemaywood.uk/gleam — Wasm codegen work
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: 2026 The Gleam contributors
3
4// This file is @generated by prost-build.
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Package {
7 /// All releases of the package
8 #[prost(message, repeated, tag = "1")]
9 pub releases: ::prost::alloc::vec::Vec<Release>,
10 /// Name of package
11 #[prost(string, required, tag = "2")]
12 pub name: ::prost::alloc::string::String,
13 /// Name of repository
14 #[prost(string, required, tag = "3")]
15 pub repository: ::prost::alloc::string::String,
16}
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct Release {
19 /// Release version
20 #[prost(string, required, tag = "1")]
21 pub version: ::prost::alloc::string::String,
22 /// sha256 checksum of "inner" package tarball
23 /// deprecated in favor of outer_checksum
24 #[prost(bytes = "vec", required, tag = "2")]
25 pub inner_checksum: ::prost::alloc::vec::Vec<u8>,
26 /// All dependencies of the release
27 #[prost(message, repeated, tag = "3")]
28 pub dependencies: ::prost::alloc::vec::Vec<Dependency>,
29 /// If set the release is retired, a retired release should only be
30 /// resolved if it has already been locked in a project
31 #[prost(message, optional, tag = "4")]
32 pub retired: ::core::option::Option<RetirementStatus>,
33 /// sha256 checksum of outer package tarball
34 /// required when encoding but optional when decoding
35 #[prost(bytes = "vec", optional, tag = "5")]
36 pub outer_checksum: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
37}
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct RetirementStatus {
40 #[prost(enumeration = "RetirementReason", required, tag = "1")]
41 pub reason: i32,
42 #[prost(string, optional, tag = "2")]
43 pub message: ::core::option::Option<::prost::alloc::string::String>,
44}
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct Dependency {
47 /// Package name of dependency
48 #[prost(string, required, tag = "1")]
49 pub package: ::prost::alloc::string::String,
50 /// Version requirement of dependency
51 #[prost(string, required, tag = "2")]
52 pub requirement: ::prost::alloc::string::String,
53 /// If set and true the package is optional (see dependency resolution)
54 #[prost(bool, optional, tag = "3")]
55 pub optional: ::core::option::Option<bool>,
56 /// If set is the OTP application name of the dependency, if not set the
57 /// application name is the same as the package name
58 #[prost(string, optional, tag = "4")]
59 pub app: ::core::option::Option<::prost::alloc::string::String>,
60 /// If set, the repository where the dependency is located
61 #[prost(string, optional, tag = "5")]
62 pub repository: ::core::option::Option<::prost::alloc::string::String>,
63}
64#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
65#[repr(i32)]
66pub enum RetirementReason {
67 RetiredOther = 0,
68 RetiredInvalid = 1,
69 RetiredSecurity = 2,
70 RetiredDeprecated = 3,
71 RetiredRenamed = 4,
72}
73impl RetirementReason {
74 /// String value of the enum field names used in the ProtoBuf definition.
75 ///
76 /// The values are not transformed in any way and thus are considered stable
77 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
78 pub fn as_str_name(&self) -> &'static str {
79 match self {
80 Self::RetiredOther => "RETIRED_OTHER",
81 Self::RetiredInvalid => "RETIRED_INVALID",
82 Self::RetiredSecurity => "RETIRED_SECURITY",
83 Self::RetiredDeprecated => "RETIRED_DEPRECATED",
84 Self::RetiredRenamed => "RETIRED_RENAMED",
85 }
86 }
87 /// Creates an enum from field names used in the ProtoBuf definition.
88 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
89 match value {
90 "RETIRED_OTHER" => Some(Self::RetiredOther),
91 "RETIRED_INVALID" => Some(Self::RetiredInvalid),
92 "RETIRED_SECURITY" => Some(Self::RetiredSecurity),
93 "RETIRED_DEPRECATED" => Some(Self::RetiredDeprecated),
94 "RETIRED_RENAMED" => Some(Self::RetiredRenamed),
95 _ => None,
96 }
97 }
98}