//
// 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/gpu/gpu_counter_event.proto (package perfetto.protos, syntax proto2)
/* eslint-disable */

import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { GpuCounterDescriptor } from "../../common/gpu_counter_descriptor_pb";
import { file_protos_perfetto_common_gpu_counter_descriptor } from "../../common/gpu_counter_descriptor_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/trace/gpu/gpu_counter_event.proto.
 */
export const file_protos_perfetto_trace_gpu_gpu_counter_event: GenFile = /*@__PURE__*/
  fileDesc("CjFwcm90b3MvcGVyZmV0dG8vdHJhY2UvZ3B1L2dwdV9jb3VudGVyX2V2ZW50LnByb3RvEg9wZXJmZXR0by5wcm90b3Mi+wEKD0dwdUNvdW50ZXJFdmVudBJBChJjb3VudGVyX2Rlc2NyaXB0b3IYASABKAsyJS5wZXJmZXR0by5wcm90b3MuR3B1Q291bnRlckRlc2NyaXB0b3ISPQoIY291bnRlcnMYAiADKAsyKy5wZXJmZXR0by5wcm90b3MuR3B1Q291bnRlckV2ZW50LkdwdUNvdW50ZXISDgoGZ3B1X2lkGAMgASgFGlYKCkdwdUNvdW50ZXISEgoKY291bnRlcl9pZBgBIAEoDRITCglpbnRfdmFsdWUYAiABKANIABIWCgxkb3VibGVfdmFsdWUYAyABKAFIAEIHCgV2YWx1ZQ", [file_protos_perfetto_common_gpu_counter_descriptor]);

/**
 * @generated from message perfetto.protos.GpuCounterEvent
 */
export type GpuCounterEvent = Message<"perfetto.protos.GpuCounterEvent"> & {
  /**
   * The first trace packet of each session should include counter_spec.
   *
   * @generated from field: optional perfetto.protos.GpuCounterDescriptor counter_descriptor = 1;
   */
  counterDescriptor?: GpuCounterDescriptor;

  /**
   * @generated from field: repeated perfetto.protos.GpuCounterEvent.GpuCounter counters = 2;
   */
  counters: GpuCounterEvent_GpuCounter[];

  /**
   * optional. Identifier for GPU in a multi-gpu device.
   *
   * @generated from field: optional int32 gpu_id = 3;
   */
  gpuId: number;
};

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

/**
 * @generated from message perfetto.protos.GpuCounterEvent.GpuCounter
 */
export type GpuCounterEvent_GpuCounter = Message<"perfetto.protos.GpuCounterEvent.GpuCounter"> & {
  /**
   * required. Identifier for counter.
   *
   * @generated from field: optional uint32 counter_id = 1;
   */
  counterId: number;

  /**
   * required. Value of the counter.
   *
   * @generated from oneof perfetto.protos.GpuCounterEvent.GpuCounter.value
   */
  value: {
    /**
     * @generated from field: int64 int_value = 2;
     */
    value: bigint;
    case: "intValue";
  } | {
    /**
     * @generated from field: double double_value = 3;
     */
    value: number;
    case: "doubleValue";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message perfetto.protos.GpuCounterEvent.GpuCounter.
 * Use `create(GpuCounterEvent_GpuCounterSchema)` to create a new message.
 */
export const GpuCounterEvent_GpuCounterSchema: GenMessage<GpuCounterEvent_GpuCounter> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_trace_gpu_gpu_counter_event, 0, 0);

