# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: temporal/api/failure/v1/message.proto

require 'google/protobuf'

require 'temporal/api/common/v1/message_pb'
require 'temporal/api/enums/v1/workflow_pb'

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file("temporal/api/failure/v1/message.proto", :syntax => :proto3) do
    add_message "temporal.api.failure.v1.ApplicationFailureInfo" do
      optional :type, :string, 1
      optional :non_retryable, :bool, 2
      optional :details, :message, 3, "temporal.api.common.v1.Payloads"
    end
    add_message "temporal.api.failure.v1.TimeoutFailureInfo" do
      optional :timeout_type, :enum, 1, "temporal.api.enums.v1.TimeoutType"
      optional :last_heartbeat_details, :message, 2, "temporal.api.common.v1.Payloads"
    end
    add_message "temporal.api.failure.v1.CanceledFailureInfo" do
      optional :details, :message, 1, "temporal.api.common.v1.Payloads"
    end
    add_message "temporal.api.failure.v1.TerminatedFailureInfo" do
    end
    add_message "temporal.api.failure.v1.ServerFailureInfo" do
      optional :non_retryable, :bool, 1
    end
    add_message "temporal.api.failure.v1.ResetWorkflowFailureInfo" do
      optional :last_heartbeat_details, :message, 1, "temporal.api.common.v1.Payloads"
    end
    add_message "temporal.api.failure.v1.ActivityFailureInfo" do
      optional :scheduled_event_id, :int64, 1
      optional :started_event_id, :int64, 2
      optional :identity, :string, 3
      optional :activity_type, :message, 4, "temporal.api.common.v1.ActivityType"
      optional :activity_id, :string, 5
      optional :retry_state, :enum, 6, "temporal.api.enums.v1.RetryState"
    end
    add_message "temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo" do
      optional :namespace, :string, 1
      optional :workflow_execution, :message, 2, "temporal.api.common.v1.WorkflowExecution"
      optional :workflow_type, :message, 3, "temporal.api.common.v1.WorkflowType"
      optional :initiated_event_id, :int64, 4
      optional :started_event_id, :int64, 5
      optional :retry_state, :enum, 6, "temporal.api.enums.v1.RetryState"
    end
    add_message "temporal.api.failure.v1.Failure" do
      optional :message, :string, 1
      optional :source, :string, 2
      optional :stack_trace, :string, 3
      optional :encoded_attributes, :message, 20, "temporal.api.common.v1.Payload"
      optional :cause, :message, 4, "temporal.api.failure.v1.Failure"
      oneof :failure_info do
        optional :application_failure_info, :message, 5, "temporal.api.failure.v1.ApplicationFailureInfo"
        optional :timeout_failure_info, :message, 6, "temporal.api.failure.v1.TimeoutFailureInfo"
        optional :canceled_failure_info, :message, 7, "temporal.api.failure.v1.CanceledFailureInfo"
        optional :terminated_failure_info, :message, 8, "temporal.api.failure.v1.TerminatedFailureInfo"
        optional :server_failure_info, :message, 9, "temporal.api.failure.v1.ServerFailureInfo"
        optional :reset_workflow_failure_info, :message, 10, "temporal.api.failure.v1.ResetWorkflowFailureInfo"
        optional :activity_failure_info, :message, 11, "temporal.api.failure.v1.ActivityFailureInfo"
        optional :child_workflow_execution_failure_info, :message, 12, "temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo"
      end
    end
  end
end

module Temporalio
  module Api
    module Failure
      module V1
        ApplicationFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.ApplicationFailureInfo").msgclass
        TimeoutFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.TimeoutFailureInfo").msgclass
        CanceledFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.CanceledFailureInfo").msgclass
        TerminatedFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.TerminatedFailureInfo").msgclass
        ServerFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.ServerFailureInfo").msgclass
        ResetWorkflowFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.ResetWorkflowFailureInfo").msgclass
        ActivityFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.ActivityFailureInfo").msgclass
        ChildWorkflowExecutionFailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.ChildWorkflowExecutionFailureInfo").msgclass
        Failure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("temporal.api.failure.v1.Failure").msgclass
      end
    end
  end
end
