//
// Copyright (C) 2020 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/chrome_mojo_event_info.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 { Message } from "@bufbuild/protobuf";

/**
 * Describes the file protos/perfetto/trace/track_event/chrome_mojo_event_info.proto.
 */
export const file_protos_perfetto_trace_track_event_chrome_mojo_event_info: GenFile = /*@__PURE__*/
  fileDesc("Cj5wcm90b3MvcGVyZmV0dG8vdHJhY2UvdHJhY2tfZXZlbnQvY2hyb21lX21vam9fZXZlbnRfaW5mby5wcm90bxIPcGVyZmV0dG8ucHJvdG9zIswBChNDaHJvbWVNb2pvRXZlbnRJbmZvEiQKHHdhdGNoZXJfbm90aWZ5X2ludGVyZmFjZV90YWcYASABKAkSEAoIaXBjX2hhc2gYAiABKA0SGgoSbW9qb19pbnRlcmZhY2VfdGFnGAMgASgJEiEKGW1vam9faW50ZXJmYWNlX21ldGhvZF9paWQYBCABKAQSEAoIaXNfcmVwbHkYBSABKAgSFAoMcGF5bG9hZF9zaXplGAYgASgEEhYKDmRhdGFfbnVtX2J5dGVzGAcgASgE");

/**
 * Contains information to identify mojo handling events. The trace events in
 * mojo are common for all mojo interfaces and this information is used to
 * identify who is the caller or callee.
 *
 * @generated from message perfetto.protos.ChromeMojoEventInfo
 */
export type ChromeMojoEventInfo = Message<"perfetto.protos.ChromeMojoEventInfo"> & {
  /**
   * Contains the interface name or the file name of the creator of a mojo
   * handle watcher, recorded when an event if notified to the watcher. The code
   * that runs within the track event belongs to the interface.
   *
   * @generated from field: optional string watcher_notify_interface_tag = 1;
   */
  watcherNotifyInterfaceTag: string;

  /**
   * The hash of the IPC message that is being handled.
   *
   * @generated from field: optional uint32 ipc_hash = 2;
   */
  ipcHash: number;

  /**
   * A static string representing the mojo interface name of the message that is
   * being handled.
   *
   * @generated from field: optional string mojo_interface_tag = 3;
   */
  mojoInterfaceTag: string;

  /**
   * Refers to an interned UnsymbolizedSourceLocation.
   * The UnsymbolizedSourceLocation contains the interface method that's being
   * handled, represented as a native symbol.
   * The native symbol can be symbolized after the trace is recorded.
   * Not using a symbolized source location for official Chromium builds to
   * reduce binary size - emitting file/function names as strings into the
   * trace requires storing them in the binary, which causes a significant
   * binary size bloat for Chromium.
   *
   * @generated from field: optional uint64 mojo_interface_method_iid = 4;
   */
  mojoInterfaceMethodIid: bigint;

  /**
   * Indicate whether this is a message or reply.
   *
   * @generated from field: optional bool is_reply = 5;
   */
  isReply: boolean;

  /**
   * The payload size of the message being sent through mojo messages.
   *
   * @generated from field: optional uint64 payload_size = 6;
   */
  payloadSize: bigint;

  /**
   * Represents the size of the message. Includes all headers and user payload.
   *
   * @generated from field: optional uint64 data_num_bytes = 7;
   */
  dataNumBytes: bigint;
};

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

