//
// Copyright (C) 2019 The Android Open Source Project
//
// 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.

// @generated by protoc-gen-es v2.2.2 with parameter "target=ts"
// @generated from file protos/perfetto/trace/track_event/process_descriptor.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/trace/track_event/process_descriptor.proto.
 */
export const file_protos_perfetto_trace_track_event_process_descriptor: GenFile = /*@__PURE__*/
  fileDesc("Cjpwcm90b3MvcGVyZmV0dG8vdHJhY2UvdHJhY2tfZXZlbnQvcHJvY2Vzc19kZXNjcmlwdG9yLnByb3RvEg9wZXJmZXR0by5wcm90b3Mi5wMKEVByb2Nlc3NEZXNjcmlwdG9yEgsKA3BpZBgBIAEoBRIPCgdjbWRsaW5lGAIgAygJEhQKDHByb2Nlc3NfbmFtZRgGIAEoCRIYChBwcm9jZXNzX3ByaW9yaXR5GAUgASgFEhoKEnN0YXJ0X3RpbWVzdGFtcF9ucxgHIAEoAxJRChNjaHJvbWVfcHJvY2Vzc190eXBlGAQgASgOMjQucGVyZmV0dG8ucHJvdG9zLlByb2Nlc3NEZXNjcmlwdG9yLkNocm9tZVByb2Nlc3NUeXBlEhkKEWxlZ2FjeV9zb3J0X2luZGV4GAMgASgFEhYKDnByb2Nlc3NfbGFiZWxzGAggAygJIuEBChFDaHJvbWVQcm9jZXNzVHlwZRIXChNQUk9DRVNTX1VOU1BFQ0lGSUVEEAASEwoPUFJPQ0VTU19CUk9XU0VSEAESFAoQUFJPQ0VTU19SRU5ERVJFUhACEhMKD1BST0NFU1NfVVRJTElUWRADEhIKDlBST0NFU1NfWllHT1RFEAQSGgoWUFJPQ0VTU19TQU5EQk9YX0hFTFBFUhAFEg8KC1BST0NFU1NfR1BVEAYSGAoUUFJPQ0VTU19QUEFQSV9QTFVHSU4QBxIYChRQUk9DRVNTX1BQQVBJX0JST0tFUhAI");

/**
 * Describes a process's attributes. Emitted as part of a TrackDescriptor,
 * usually by the process's main thread.
 *
 * Next id: 9.
 *
 * @generated from message perfetto.protos.ProcessDescriptor
 */
export type ProcessDescriptor = Message<"perfetto.protos.ProcessDescriptor"> & {
  /**
   * @generated from field: optional int32 pid = 1;
   */
  pid: number;

  /**
   * @generated from field: repeated string cmdline = 2;
   */
  cmdline: string[];

  /**
   * @generated from field: optional string process_name = 6;
   */
  processName: string;

  /**
   * @generated from field: optional int32 process_priority = 5;
   */
  processPriority: number;

  /**
   * Process start time in nanoseconds.
   * The timestamp refers to the trace clock by default. Other clock IDs
   * provided in TracePacket are not supported.
   *
   * @generated from field: optional int64 start_timestamp_ns = 7;
   */
  startTimestampNs: bigint;

  /**
   * @generated from field: optional perfetto.protos.ProcessDescriptor.ChromeProcessType chrome_process_type = 4;
   */
  chromeProcessType: ProcessDescriptor_ChromeProcessType;

  /**
   * To support old UI. New UI should determine default sorting by process_type.
   *
   * @generated from field: optional int32 legacy_sort_index = 3;
   */
  legacySortIndex: number;

  /**
   * Labels can be used to further describe properties of the work performed by
   * the process. For example, these can be used by Chrome renderer process to
   * provide titles of frames being rendered.
   *
   * @generated from field: repeated string process_labels = 8;
   */
  processLabels: string[];
};

/**
 * Describes the message perfetto.protos.ProcessDescriptor.
 * Use `create(ProcessDescriptorSchema)` to create a new message.
 */
export const ProcessDescriptorSchema: GenMessage<ProcessDescriptor> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_track_event_process_descriptor, 0);

/**
 * See chromium's content::ProcessType.
 *
 * @generated from enum perfetto.protos.ProcessDescriptor.ChromeProcessType
 */
export enum ProcessDescriptor_ChromeProcessType {
  /**
   * @generated from enum value: PROCESS_UNSPECIFIED = 0;
   */
  PROCESS_UNSPECIFIED = 0,

  /**
   * @generated from enum value: PROCESS_BROWSER = 1;
   */
  PROCESS_BROWSER = 1,

  /**
   * @generated from enum value: PROCESS_RENDERER = 2;
   */
  PROCESS_RENDERER = 2,

  /**
   * @generated from enum value: PROCESS_UTILITY = 3;
   */
  PROCESS_UTILITY = 3,

  /**
   * @generated from enum value: PROCESS_ZYGOTE = 4;
   */
  PROCESS_ZYGOTE = 4,

  /**
   * @generated from enum value: PROCESS_SANDBOX_HELPER = 5;
   */
  PROCESS_SANDBOX_HELPER = 5,

  /**
   * @generated from enum value: PROCESS_GPU = 6;
   */
  PROCESS_GPU = 6,

  /**
   * @generated from enum value: PROCESS_PPAPI_PLUGIN = 7;
   */
  PROCESS_PPAPI_PLUGIN = 7,

  /**
   * @generated from enum value: PROCESS_PPAPI_BROKER = 8;
   */
  PROCESS_PPAPI_BROKER = 8,
}

/**
 * Describes the enum perfetto.protos.ProcessDescriptor.ChromeProcessType.
 */
export const ProcessDescriptor_ChromeProcessTypeSchema: GenEnum<ProcessDescriptor_ChromeProcessType> = /*@__PURE__*/
  enumDesc(file_protos_perfetto_trace_track_event_process_descriptor, 0, 0);

