// Copyright (C) 2025 Rivos Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Autogenerated by the ProtoZero Rust compiler plugin.
// Invoked by contrib/rust-sdk/tools/gen_rust_protos
// DO NOT EDIT.

use crate::pb_enum;
use crate::pb_msg;

pb_enum!(FieldDescriptorProtoType {
    TYPE_DOUBLE: 1,
    TYPE_FLOAT: 2,
    TYPE_INT64: 3,
    TYPE_UINT64: 4,
    TYPE_INT32: 5,
    TYPE_FIXED64: 6,
    TYPE_FIXED32: 7,
    TYPE_BOOL: 8,
    TYPE_STRING: 9,
    TYPE_GROUP: 10,
    TYPE_MESSAGE: 11,
    TYPE_BYTES: 12,
    TYPE_UINT32: 13,
    TYPE_ENUM: 14,
    TYPE_SFIXED32: 15,
    TYPE_SFIXED64: 16,
    TYPE_SINT32: 17,
    TYPE_SINT64: 18,
});

pb_enum!(FieldDescriptorProtoLabel {
    LABEL_OPTIONAL: 1,
    LABEL_REQUIRED: 2,
    LABEL_REPEATED: 3,
});

pb_msg!(OneofOptions {});

pb_msg!(EnumValueDescriptorProto {
    name: String, primitive, 1,
    number: i32, primitive, 2,
});

pb_msg!(EnumDescriptorProto {
    name: String, primitive, 1,
    value: EnumValueDescriptorProto, msg, 2,
    reserved_name: String, primitive, 5,
});

pb_msg!(OneofDescriptorProto {
    name: String, primitive, 1,
    options: OneofOptions, msg, 2,
});

pb_msg!(FieldDescriptorProto {
    name: String, primitive, 1,
    number: i32, primitive, 3,
    label: FieldDescriptorProtoLabel, enum, 4,
    type: FieldDescriptorProtoType, enum, 5,
    type_name: String, primitive, 6,
    extendee: String, primitive, 2,
    default_value: String, primitive, 7,
    options: FieldOptions, msg, 8,
    oneof_index: i32, primitive, 9,
});

pb_msg!(FieldOptions {
    packed: bool, primitive, 2,
    uninterpreted_option: UninterpretedOption, msg, 999,
});

pb_msg!(UninterpretedOption {
    name: UninterpretedOptionNamePart, msg, 2,
    identifier_value: String, primitive, 3,
    positive_int_value: u64, primitive, 4,
    negative_int_value: i64, primitive, 5,
    double_value: f64, primitive, 6,
    string_value: String, primitive, 7,
    aggregate_value: String, primitive, 8,
});

pb_msg!(UninterpretedOptionNamePart {
    name_part: String, primitive, 1,
    is_extension: bool, primitive, 2,
});

pb_msg!(DescriptorProto {
    name: String, primitive, 1,
    field: FieldDescriptorProto, msg, 2,
    extension: FieldDescriptorProto, msg, 6,
    nested_type: DescriptorProto, msg, 3,
    enum_type: EnumDescriptorProto, msg, 4,
    oneof_decl: OneofDescriptorProto, msg, 8,
    reserved_range: DescriptorProtoReservedRange, msg, 9,
    reserved_name: String, primitive, 10,
});

pb_msg!(DescriptorProtoReservedRange {
    start: i32, primitive, 1,
    end: i32, primitive, 2,
});

pb_msg!(FileDescriptorProto {
    name: String, primitive, 1,
    package: String, primitive, 2,
    dependency: String, primitive, 3,
    public_dependency: i32, primitive, 10,
    weak_dependency: i32, primitive, 11,
    message_type: DescriptorProto, msg, 4,
    enum_type: EnumDescriptorProto, msg, 5,
    extension: FieldDescriptorProto, msg, 7,
});

pb_msg!(FileDescriptorSet {
    file: FileDescriptorProto, msg, 1,
});
