//
// Copyright (C) 2023 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/metrics/android/android_blocking_calls_cuj_metric.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 { AndroidBlockingCall } from "./android_blocking_call_pb";
import { file_protos_perfetto_metrics_android_android_blocking_call } from "./android_blocking_call_pb";
import type { AndroidProcessMetadata } from "./process_metadata_pb";
import { file_protos_perfetto_metrics_android_process_metadata } from "./process_metadata_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/metrics/android/android_blocking_calls_cuj_metric.proto.
 */
export const file_protos_perfetto_metrics_android_android_blocking_calls_cuj_metric: GenFile = /*@__PURE__*/
  fileDesc("Ckdwcm90b3MvcGVyZmV0dG8vbWV0cmljcy9hbmRyb2lkL2FuZHJvaWRfYmxvY2tpbmdfY2FsbHNfY3VqX21ldHJpYy5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIpMCCh1BbmRyb2lkQmxvY2tpbmdDYWxsc0N1ak1ldHJpYxI/CgNjdWoYASADKAsyMi5wZXJmZXR0by5wcm90b3MuQW5kcm9pZEJsb2NraW5nQ2FsbHNDdWpNZXRyaWMuQ3VqGrABCgNDdWoSCgoCaWQYASABKAUSDAoEbmFtZRgCIAEoCRI4Cgdwcm9jZXNzGAMgASgLMicucGVyZmV0dG8ucHJvdG9zLkFuZHJvaWRQcm9jZXNzTWV0YWRhdGESCgoCdHMYBCABKAMSCwoDZHVyGAUgASgDEjwKDmJsb2NraW5nX2NhbGxzGAYgAygLMiQucGVyZmV0dG8ucHJvdG9zLkFuZHJvaWRCbG9ja2luZ0NhbGw", [file_protos_perfetto_metrics_android_android_blocking_call, file_protos_perfetto_metrics_android_process_metadata]);

/**
 * Blocking calls inside Android CUJs. Shows count and total duration for each.
 *
 * @generated from message perfetto.protos.AndroidBlockingCallsCujMetric
 */
export type AndroidBlockingCallsCujMetric = Message<"perfetto.protos.AndroidBlockingCallsCujMetric"> & {
  /**
   * @generated from field: repeated perfetto.protos.AndroidBlockingCallsCujMetric.Cuj cuj = 1;
   */
  cuj: AndroidBlockingCallsCujMetric_Cuj[];
};

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

/**
 * Next id: 7
 *
 * @generated from message perfetto.protos.AndroidBlockingCallsCujMetric.Cuj
 */
export type AndroidBlockingCallsCujMetric_Cuj = Message<"perfetto.protos.AndroidBlockingCallsCujMetric.Cuj"> & {
  /**
   * ID of the CUJ that is unique within the trace.
   *
   * @generated from field: optional int32 id = 1;
   */
  id: number;

  /**
   * Name of the CUJ, extracted from the CUJ jank or latency trace marker.
   * For example SHADE_EXPAND_COLLAPSE from J<SHADE_EXPAND_COLLAPSE>.
   *
   * @generated from field: optional string name = 2;
   */
  name: string;

  /**
   * Details about the process (uid, version, etc)
   *
   * @generated from field: optional perfetto.protos.AndroidProcessMetadata process = 3;
   */
  process?: AndroidProcessMetadata;

  /**
   * ts of the CUJ trace marker slice, in ns.
   *
   * @generated from field: optional int64 ts = 4;
   */
  ts: bigint;

  /**
   * dur of the CUJ trace marker slice, in ns.
   *
   * @generated from field: optional int64 dur = 5;
   */
  dur: bigint;

  /**
   * List of blocking calls on the process main thread.
   *
   * @generated from field: repeated perfetto.protos.AndroidBlockingCall blocking_calls = 6;
   */
  blockingCalls: AndroidBlockingCall[];
};

/**
 * Describes the message perfetto.protos.AndroidBlockingCallsCujMetric.Cuj.
 * Use `create(AndroidBlockingCallsCujMetric_CujSchema)` to create a new message.
 */
export const AndroidBlockingCallsCujMetric_CujSchema: GenMessage<AndroidBlockingCallsCujMetric_Cuj> = /*@__PURE__*/
  messageDesc(file_protos_perfetto_metrics_android_android_blocking_calls_cuj_metric, 0, 0);

