// 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!(ThreadDescriptorChromeThreadType {
    CHROME_THREAD_UNSPECIFIED: 0,
    CHROME_THREAD_MAIN: 1,
    CHROME_THREAD_IO: 2,
    CHROME_THREAD_POOL_BG_WORKER: 3,
    CHROME_THREAD_POOL_FG_WORKER: 4,
    CHROME_THREAD_POOL_FB_BLOCKING: 5,
    CHROME_THREAD_POOL_BG_BLOCKING: 6,
    CHROME_THREAD_POOL_SERVICE: 7,
    CHROME_THREAD_COMPOSITOR: 8,
    CHROME_THREAD_VIZ_COMPOSITOR: 9,
    CHROME_THREAD_COMPOSITOR_WORKER: 10,
    CHROME_THREAD_SERVICE_WORKER: 11,
    CHROME_THREAD_MEMORY_INFRA: 50,
    CHROME_THREAD_SAMPLING_PROFILER: 51,
});

pb_msg!(ThreadDescriptor {
    pid: i32, primitive, 1,
    tid: i32, primitive, 2,
    thread_name: String, primitive, 5,
    chrome_thread_type: ThreadDescriptorChromeThreadType, enum, 4,
    reference_timestamp_us: i64, primitive, 6,
    reference_thread_time_us: i64, primitive, 7,
    reference_thread_instruction_count: i64, primitive, 8,
    legacy_sort_index: i32, primitive, 3,
});
