defmodule Com.Github.TraceMachina.Nativelink.Events.BatchUpdateBlobsRequestOverride.Request do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :digest, 1, type: Build.Bazel.Remote.Execution.V2.Digest
  field :compressor, 3, type: Build.Bazel.Remote.Execution.V2.Compressor.Value, enum: true
  field :data_len, 15, type: :uint64, json_name: "dataLen"
end

defmodule Com.Github.TraceMachina.Nativelink.Events.BatchUpdateBlobsRequestOverride do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :instance_name, 1, type: :string, json_name: "instanceName"

  field :requests, 2,
    repeated: true,
    type: Com.Github.TraceMachina.Nativelink.Events.BatchUpdateBlobsRequestOverride.Request

  field :digest_function, 5,
    type: Build.Bazel.Remote.Execution.V2.DigestFunction.Value,
    json_name: "digestFunction",
    enum: true
end

defmodule Com.Github.TraceMachina.Nativelink.Events.BatchReadBlobsResponseOverride.Response do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :digest, 1, type: Build.Bazel.Remote.Execution.V2.Digest
  field :compressor, 4, type: Build.Bazel.Remote.Execution.V2.Compressor.Value, enum: true
  field :status, 3, type: Google.Rpc.Status
  field :data_len, 15, type: :uint64, json_name: "dataLen"
end

defmodule Com.Github.TraceMachina.Nativelink.Events.BatchReadBlobsResponseOverride do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :responses, 1,
    repeated: true,
    type: Com.Github.TraceMachina.Nativelink.Events.BatchReadBlobsResponseOverride.Response
end

defmodule Com.Github.TraceMachina.Nativelink.Events.WriteRequestOverride do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :resource_name, 1, type: :string, json_name: "resourceName"
  field :write_offset, 2, type: :int64, json_name: "writeOffset"
  field :finish_write, 3, type: :bool, json_name: "finishWrite"
  field :data_len, 15, type: :uint64, json_name: "dataLen"
end

defmodule Com.Github.TraceMachina.Nativelink.Events.RequestEvent do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  oneof :event, 0

  field :get_capabilities_request, 1,
    type: Build.Bazel.Remote.Execution.V2.GetCapabilitiesRequest,
    json_name: "getCapabilitiesRequest",
    oneof: 0

  field :get_action_result_request, 2,
    type: Build.Bazel.Remote.Execution.V2.GetActionResultRequest,
    json_name: "getActionResultRequest",
    oneof: 0

  field :update_action_result_request, 3,
    type: Build.Bazel.Remote.Execution.V2.UpdateActionResultRequest,
    json_name: "updateActionResultRequest",
    oneof: 0

  field :find_missing_blobs_request, 4,
    type: Build.Bazel.Remote.Execution.V2.FindMissingBlobsRequest,
    json_name: "findMissingBlobsRequest",
    oneof: 0

  field :batch_read_blobs_request, 5,
    type: Build.Bazel.Remote.Execution.V2.BatchReadBlobsRequest,
    json_name: "batchReadBlobsRequest",
    oneof: 0

  field :batch_update_blobs_request, 6,
    type: Com.Github.TraceMachina.Nativelink.Events.BatchUpdateBlobsRequestOverride,
    json_name: "batchUpdateBlobsRequest",
    oneof: 0

  field :get_tree_request, 7,
    type: Build.Bazel.Remote.Execution.V2.GetTreeRequest,
    json_name: "getTreeRequest",
    oneof: 0

  field :read_request, 8, type: Google.Bytestream.ReadRequest, json_name: "readRequest", oneof: 0
  field :write_request, 9, type: Google.Protobuf.Empty, json_name: "writeRequest", oneof: 0

  field :query_write_status_request, 10,
    type: Google.Bytestream.QueryWriteStatusRequest,
    json_name: "queryWriteStatusRequest",
    oneof: 0

  field :execute_request, 11,
    type: Build.Bazel.Remote.Execution.V2.ExecuteRequest,
    json_name: "executeRequest",
    oneof: 0

  field :wait_execution_request, 12,
    type: Build.Bazel.Remote.Execution.V2.WaitExecutionRequest,
    json_name: "waitExecutionRequest",
    oneof: 0

  field :scheduler_start_execute, 13,
    type: Com.Github.TraceMachina.Nativelink.RemoteExecution.StartExecute,
    json_name: "schedulerStartExecute",
    oneof: 0

  field :fetch_blob_request, 14,
    type: Build.Bazel.Remote.Asset.V1.FetchBlobRequest,
    json_name: "fetchBlobRequest",
    oneof: 0

  field :push_blob_request, 15,
    type: Build.Bazel.Remote.Asset.V1.PushBlobRequest,
    json_name: "pushBlobRequest",
    oneof: 0
end

defmodule Com.Github.TraceMachina.Nativelink.Events.ResponseEvent do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  oneof :event, 0

  field :error, 1, type: Google.Rpc.Status, oneof: 0

  field :server_capabilities, 2,
    type: Build.Bazel.Remote.Execution.V2.ServerCapabilities,
    json_name: "serverCapabilities",
    oneof: 0

  field :action_result, 3,
    type: Build.Bazel.Remote.Execution.V2.ActionResult,
    json_name: "actionResult",
    oneof: 0

  field :find_missing_blobs_response, 4,
    type: Build.Bazel.Remote.Execution.V2.FindMissingBlobsResponse,
    json_name: "findMissingBlobsResponse",
    oneof: 0

  field :batch_read_blobs_response, 5,
    type: Com.Github.TraceMachina.Nativelink.Events.BatchReadBlobsResponseOverride,
    json_name: "batchReadBlobsResponse",
    oneof: 0

  field :batch_update_blobs_response, 6,
    type: Build.Bazel.Remote.Execution.V2.BatchUpdateBlobsResponse,
    json_name: "batchUpdateBlobsResponse",
    oneof: 0

  field :write_response, 7,
    type: Google.Bytestream.WriteResponse,
    json_name: "writeResponse",
    oneof: 0

  field :query_write_status_response, 8,
    type: Google.Bytestream.QueryWriteStatusResponse,
    json_name: "queryWriteStatusResponse",
    oneof: 0

  field :empty, 9, type: Google.Protobuf.Empty, oneof: 0

  field :fetch_blob_response, 10,
    type: Build.Bazel.Remote.Asset.V1.FetchBlobResponse,
    json_name: "fetchBlobResponse",
    oneof: 0

  field :push_blob_response, 11,
    type: Build.Bazel.Remote.Asset.V1.PushBlobResponse,
    json_name: "pushBlobResponse",
    oneof: 0
end

defmodule Com.Github.TraceMachina.Nativelink.Events.StreamEvent do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  oneof :event, 0

  field :error, 1, type: Google.Rpc.Status, oneof: 0

  field :get_tree_response, 2,
    type: Build.Bazel.Remote.Execution.V2.GetTreeResponse,
    json_name: "getTreeResponse",
    oneof: 0

  field :data_length, 3, type: :uint64, json_name: "dataLength", oneof: 0

  field :write_request, 4,
    type: Com.Github.TraceMachina.Nativelink.Events.WriteRequestOverride,
    json_name: "writeRequest",
    oneof: 0

  field :operation, 5, type: Google.Longrunning.Operation, oneof: 0
  field :closed, 6, type: Google.Protobuf.Empty, oneof: 0
end

defmodule Com.Github.TraceMachina.Nativelink.Events.Event do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  oneof :event, 0

  field :request, 1, type: Com.Github.TraceMachina.Nativelink.Events.RequestEvent, oneof: 0
  field :response, 2, type: Com.Github.TraceMachina.Nativelink.Events.ResponseEvent, oneof: 0
  field :stream, 3, type: Com.Github.TraceMachina.Nativelink.Events.StreamEvent, oneof: 0
end

defmodule Com.Github.TraceMachina.Nativelink.Events.OriginEvent do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :version, 1, type: :uint32
  field :event_id, 2, type: :string, json_name: "eventId"
  field :parent_event_id, 3, type: :string, json_name: "parentEventId"

  field :bazel_request_metadata, 4,
    type: Build.Bazel.Remote.Execution.V2.RequestMetadata,
    json_name: "bazelRequestMetadata"

  field :identity, 5, type: :string
  field :event, 6, type: Com.Github.TraceMachina.Nativelink.Events.Event
end

defmodule Com.Github.TraceMachina.Nativelink.Events.OriginEvents do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  field :events, 1, repeated: true, type: Com.Github.TraceMachina.Nativelink.Events.OriginEvent
end

defmodule Com.Github.TraceMachina.Nativelink.Events.BepEvent do
  @moduledoc false

  use Protobuf, protoc_gen_elixir_version: "0.14.1", syntax: :proto3

  oneof :event, 0

  field :version, 1, type: :uint32
  field :identity, 2, type: :string

  field :lifecycle_event, 3,
    type: Google.Devtools.Build.V1.PublishLifecycleEventRequest,
    json_name: "lifecycleEvent",
    oneof: 0

  field :build_tool_event, 4,
    type: Google.Devtools.Build.V1.PublishBuildToolEventStreamRequest,
    json_name: "buildToolEvent",
    oneof: 0
end
