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