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
// This file is generated by rust-protobuf 2.8.1. Do not edit
// @generated

// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![cfg_attr(rustfmt, rustfmt_skip)]

#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `Network.proto`

use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1;

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum NetworkType {
    NETWORK_TYPE_UNKNOWN = 0,
    MAINNET = 1,
    DEVNET = 2,
    TESTNET = 3,
}

impl ::protobuf::ProtobufEnum for NetworkType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<NetworkType> {
        match value {
            0 => ::std::option::Option::Some(NetworkType::NETWORK_TYPE_UNKNOWN),
            1 => ::std::option::Option::Some(NetworkType::MAINNET),
            2 => ::std::option::Option::Some(NetworkType::DEVNET),
            3 => ::std::option::Option::Some(NetworkType::TESTNET),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [NetworkType] = &[
            NetworkType::NETWORK_TYPE_UNKNOWN,
            NetworkType::MAINNET,
            NetworkType::DEVNET,
            NetworkType::TESTNET,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy {
            lock: ::protobuf::lazy::ONCE_INIT,
            ptr: 0 as *const ::protobuf::reflect::EnumDescriptor,
        };
        unsafe {
            descriptor.get(|| {
                ::protobuf::reflect::EnumDescriptor::new("NetworkType", file_descriptor_proto())
            })
        }
    }
}

impl ::std::marker::Copy for NetworkType {
}

impl ::std::default::Default for NetworkType {
    fn default() -> Self {
        NetworkType::NETWORK_TYPE_UNKNOWN
    }
}

impl ::protobuf::reflect::ProtobufValue for NetworkType {
    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
        ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\rNetwork.proto\x12\x19Catalyst.Protocol.Network*M\n\x0bNetworkType\
    \x12\x18\n\x14NETWORK_TYPE_UNKNOWN\x10\0\x12\x0b\n\x07MAINNET\x10\x01\
    \x12\n\n\x06DEVNET\x10\x02\x12\x0b\n\x07TESTNET\x10\x03B\x02P\x01J\x90\t\
    \n\x06\x12\x04\x13\0\x1e\x01\n\xdf\x06\n\x01\x0c\x12\x03\x13\0\x122\xd4\
    \x06*\n\x20Copyright\x20(c)\x202019\x20Catalyst\x20Network\n\n\x20This\
    \x20file\x20is\x20part\x20of\x20Catalyst.Network.Protocol.Protobuffs\x20\
    <https://github.com/catalyst-network/protocol-protobuffs>\n\n\x20Catalys\
    t.Network.Protocol.Protobuffs\x20is\x20free\x20software:\x20you\x20can\
    \x20redistribute\x20it\x20and/or\x20modify\n\x20it\x20under\x20the\x20te\
    rms\x20of\x20the\x20GNU\x20General\x20Public\x20License\x20as\x20publish\
    ed\x20by\n\x20the\x20Free\x20Software\x20Foundation,\x20either\x20versio\
    n\x202\x20of\x20the\x20License,\x20or\n\x20(at\x20your\x20option)\x20any\
    \x20later\x20version.\n\x20\n\x20Catalyst.Network.Protocol.Protobuffs\
    \x20is\x20distributed\x20in\x20the\x20hope\x20that\x20it\x20will\x20be\
    \x20useful,\n\x20but\x20WITHOUT\x20ANY\x20WARRANTY;\x20without\x20even\
    \x20the\x20implied\x20warranty\x20of\n\x20MERCHANTABILITY\x20or\x20FITNE\
    SS\x20FOR\x20A\x20PARTICULAR\x20PURPOSE.\x20See\x20the\n\x20GNU\x20Gener\
    al\x20Public\x20License\x20for\x20more\x20details.\n\x20\n\x20You\x20sho\
    uld\x20have\x20received\x20a\x20copy\x20of\x20the\x20GNU\x20General\x20P\
    ublic\x20License\n\x20along\x20with\x20Catalyst.Network.Protocol.Protobu\
    ffs\x20If\x20not,\x20see\x20<https://www.gnu.org/licenses/>.\n\n\x08\n\
    \x01\x08\x12\x03\x15\0\"\n\t\n\x02\x08\n\x12\x03\x15\0\"\n\x08\n\x01\x02\
    \x12\x03\x17\0\"\n\n\n\x02\x05\0\x12\x04\x19\0\x1e\x01\n\n\n\x03\x05\0\
    \x01\x12\x03\x19\x05\x10\n\x1f\n\x04\x05\0\x02\0\x12\x03\x1a\x04\x1d\"\
    \x12\x20un-known\x20network\n\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x1a\
    \x04\x18\n\x0c\n\x05\x05\0\x02\0\x02\x12\x03\x1a\x1b\x1c\n\x20\n\x04\x05\
    \0\x02\x01\x12\x03\x1b\x04\x10\"\x13\x20main\x20live\x20network\n\n\x0c\
    \n\x05\x05\0\x02\x01\x01\x12\x03\x1b\x04\x0b\n\x0c\n\x05\x05\0\x02\x01\
    \x02\x12\x03\x1b\x0e\x0f\n\x1b\n\x04\x05\0\x02\x02\x12\x03\x1c\x04\x0f\"\
    \x0e\x20local\x20devnet\n\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x1c\x04\
    \n\n\x0c\n\x05\x05\0\x02\x02\x02\x12\x03\x1c\r\x0e\n\x1d\n\x04\x05\0\x02\
    \x03\x12\x03\x1d\x04\x10\"\x10\x20public\x20testnet\n\n\x0c\n\x05\x05\0\
    \x02\x03\x01\x12\x03\x1d\x04\x0b\n\x0c\n\x05\x05\0\x02\x03\x02\x12\x03\
    \x1d\x0e\x0fb\x06proto3\
";

static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
    lock: ::protobuf::lazy::ONCE_INIT,
    ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    unsafe {
        file_descriptor_proto_lazy.get(|| {
            parse_descriptor_proto()
        })
    }
}