lib/generated/eventsequences.pb.ex

defmodule Cratis.Chronicle.Contracts.EventSequences.ConstraintType do
  @moduledoc false
  use Protobuf, enum: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Unknown, 0
  field :Unique, 1
  field :UniqueEventType, 2
  field :Schema, 3
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventObservationState do
  @moduledoc false
  use Protobuf, enum: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :None, 0
  field :Initial, 1
  field :HeadOfReplay, 2
  field :Replay, 4
  field :TailOfReplay, 8
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendManyRequest.ConcurrencyScopesEntry do
  @moduledoc false
  use Protobuf, map: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :key, 1, type: :string
  field :value, 2, type: Cratis.Chronicle.Contracts.EventSequences.ConcurrencyScope
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendManyRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :CorrelationId, 4, type: Bcl.Guid
  field :Events, 5, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventToAppend
  field :Causation, 6, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 7, type: Cratis.Chronicle.Contracts.EventSequences.Identity

  field :ConcurrencyScopes, 8,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.AppendManyRequest.ConcurrencyScopesEntry,
    map: true
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendManyResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :CorrelationId, 1, type: Bcl.Guid
  field :SequenceNumbers, 2, repeated: true, type: :uint64, packed: false, deprecated: false

  field :ConstraintViolations, 3,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.ConstraintViolation

  field :Errors, 4, repeated: true, type: :string

  field :ConcurrencyViolations, 5,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.ConcurrencyViolation
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :CorrelationId, 4, type: Bcl.Guid
  field :EventSourceType, 5, type: :string
  field :EventSourceId, 6, type: :string
  field :EventStreamType, 7, type: :string
  field :EventStreamId, 8, type: :string
  field :EventType, 9, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :Content, 10, type: :string
  field :Causation, 11, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 12, type: Cratis.Chronicle.Contracts.EventSequences.Identity
  field :ConcurrencyScope, 13, type: Cratis.Chronicle.Contracts.EventSequences.ConcurrencyScope
  field :Tags, 14, repeated: true, type: :string
  field :Occurred, 15, type: Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset
  field :Subject, 16, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :CorrelationId, 1, type: Bcl.Guid
  field :SequenceNumber, 2, type: :uint64

  field :ConstraintViolations, 3,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.ConstraintViolation

  field :Errors, 4, repeated: true, type: :string

  field :ConcurrencyViolation, 5,
    type: Cratis.Chronicle.Contracts.EventSequences.ConcurrencyViolation
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendedEvent.GenerationalContentEntry do
  @moduledoc false
  use Protobuf, map: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :key, 1, type: :int32
  field :value, 2, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.AppendedEvent do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Context, 1, type: Cratis.Chronicle.Contracts.EventSequences.EventContext
  field :Content, 2, type: :string
  field :OriginalContent, 3, type: :string

  field :Revisions, 4,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.EventRevision

  field :GenerationalContent, 5,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.AppendedEvent.GenerationalContentEntry,
    map: true
end

defmodule Cratis.Chronicle.Contracts.EventSequences.Causation.PropertiesEntry do
  @moduledoc false
  use Protobuf, map: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :key, 1, type: :string
  field :value, 2, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.Causation do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Occurred, 1, type: Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset
  field :Type, 2, type: :string

  field :Properties, 3,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.Causation.PropertiesEntry,
    map: true
end

defmodule Cratis.Chronicle.Contracts.EventSequences.ConcurrencyScope do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :SequenceNumber, 1, type: :uint64
  field :EventSourceId, 2, type: :bool
  field :EventStreamType, 3, type: :string
  field :EventStreamId, 4, type: :string
  field :EventSourceType, 5, type: :string
  field :EventTypes, 6, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventType
end

defmodule Cratis.Chronicle.Contracts.EventSequences.ConcurrencyViolation do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventSourceId, 1, type: :string
  field :ExpectedSequenceNumber, 2, type: :uint64
  field :ActualSequenceNumber, 3, type: :uint64
end

defmodule Cratis.Chronicle.Contracts.EventSequences.ConstraintViolation.DetailsEntry do
  @moduledoc false
  use Protobuf, map: true, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :key, 1, type: :string
  field :value, 2, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.ConstraintViolation do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventTypeId, 1, type: :string
  field :SequenceNumber, 2, type: :uint64

  field :ConstraintType, 3,
    type: Cratis.Chronicle.Contracts.EventSequences.ConstraintType,
    enum: true

  field :ConstraintName, 4, type: :string
  field :Message, 5, type: :string

  field :Details, 6,
    repeated: true,
    type: Cratis.Chronicle.Contracts.EventSequences.ConstraintViolation.DetailsEntry,
    map: true
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventContext do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventType, 1, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :EventSourceType, 2, type: :string
  field :EventSourceId, 3, type: :string
  field :SequenceNumber, 4, type: :uint64
  field :EventStreamType, 5, type: :string
  field :EventStreamId, 6, type: :string
  field :Occurred, 7, type: Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset
  field :EventStore, 8, type: :string
  field :Namespace, 9, type: :string
  field :CorrelationId, 10, type: Bcl.Guid
  field :Causation, 11, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 12, type: Cratis.Chronicle.Contracts.EventSequences.Identity

  field :ObservationState, 13,
    type: Cratis.Chronicle.Contracts.EventSequences.EventObservationState,
    enum: true

  field :Tags, 14, repeated: true, type: :string
  field :Hash, 15, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventRevision do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Generation, 1, type: :uint32
  field :CorrelationId, 2, type: :string
  field :CausedBy, 3, type: Cratis.Chronicle.Contracts.EventSequences.Identity
  field :Occurred, 4, type: Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset
  field :Content, 5, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventToAppend do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventSourceType, 1, type: :string
  field :EventSourceId, 2, type: :string
  field :EventStreamType, 3, type: :string
  field :EventStreamId, 4, type: :string
  field :EventType, 5, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :Content, 6, type: :string
  field :Tags, 7, repeated: true, type: :string
  field :Occurred, 8, type: Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset
  field :Subject, 9, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventType do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Id, 1, type: :string
  field :Generation, 2, type: :uint32
  field :Tombstone, 3, type: :bool
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetForEventSourceIdAndEventTypesRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :EventSourceType, 4, type: :string
  field :EventSourceId, 5, type: :string
  field :EventStreamType, 6, type: :string
  field :EventStreamId, 7, type: :string
  field :EventTypes, 8, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventType
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetForEventSourceIdAndEventTypesResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Events, 1, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.AppendedEvent
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetFromEventSequenceNumberRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :FromEventSequenceNumber, 4, type: :uint64
  field :ToEventSequenceNumber, 5, type: :uint64
  field :EventSourceId, 6, type: :string
  field :EventTypes, 7, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventType
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetFromEventSequenceNumberResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Events, 1, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.AppendedEvent
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetTailSequenceNumberRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :EventTypes, 4, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :EventSourceId, 5, type: :string
  field :EventSourceType, 6, type: :string
  field :EventStreamId, 7, type: :string
  field :EventStreamType, 8, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.GetTailSequenceNumberResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :SequenceNumber, 1, type: :uint64
end

defmodule Cratis.Chronicle.Contracts.EventSequences.HasEventsForEventSourceIdRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :EventSourceId, 4, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.HasEventsForEventSourceIdResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :HasEvents, 1, type: :bool
end

defmodule Cratis.Chronicle.Contracts.EventSequences.Identity do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Subject, 1, type: :string
  field :Name, 2, type: :string
  field :UserName, 3, type: :string
  field :OnBehalfOf, 4, type: Cratis.Chronicle.Contracts.EventSequences.Identity
end

defmodule Cratis.Chronicle.Contracts.EventSequences.RedactForEventSourceRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :EventSourceId, 4, type: :string
  field :Reason, 5, type: :string
  field :EventTypes, 6, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :CorrelationId, 7, type: Bcl.Guid
  field :Causation, 8, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 9, type: Cratis.Chronicle.Contracts.EventSequences.Identity
end

defmodule Cratis.Chronicle.Contracts.EventSequences.RedactRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :SequenceNumber, 4, type: :uint64
  field :Reason, 5, type: :string
  field :CorrelationId, 6, type: Bcl.Guid
  field :Causation, 7, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 8, type: Cratis.Chronicle.Contracts.EventSequences.Identity
end

defmodule Cratis.Chronicle.Contracts.EventSequences.RedactResponse do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3
end

defmodule Cratis.Chronicle.Contracts.EventSequences.ReviseRequest do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :EventStore, 1, type: :string
  field :Namespace, 2, type: :string
  field :EventSequenceId, 3, type: :string
  field :SequenceNumber, 4, type: :uint64
  field :EventType, 5, type: Cratis.Chronicle.Contracts.EventSequences.EventType
  field :Content, 6, type: :string
  field :CorrelationId, 7, type: Bcl.Guid
  field :Causation, 8, repeated: true, type: Cratis.Chronicle.Contracts.EventSequences.Causation
  field :CausedBy, 9, type: Cratis.Chronicle.Contracts.EventSequences.Identity
end

defmodule Cratis.Chronicle.Contracts.EventSequences.SerializableDateTimeOffset do
  @moduledoc false
  use Protobuf, protoc_gen_elixir_version: "0.16.0", syntax: :proto3

  field :Value, 1, type: :string
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventSequences.Service do
  @moduledoc false

  use GRPC.Service,
    name: "Cratis.Chronicle.Contracts.EventSequences.EventSequences",
    protoc_gen_elixir_version: "0.16.0"

  rpc :Append,
      Cratis.Chronicle.Contracts.EventSequences.AppendRequest,
      Cratis.Chronicle.Contracts.EventSequences.AppendResponse

  rpc :AppendMany,
      Cratis.Chronicle.Contracts.EventSequences.AppendManyRequest,
      Cratis.Chronicle.Contracts.EventSequences.AppendManyResponse

  rpc :GetEventsFromEventSequenceNumber,
      Cratis.Chronicle.Contracts.EventSequences.GetFromEventSequenceNumberRequest,
      Cratis.Chronicle.Contracts.EventSequences.GetFromEventSequenceNumberResponse

  rpc :GetForEventSourceIdAndEventTypes,
      Cratis.Chronicle.Contracts.EventSequences.GetForEventSourceIdAndEventTypesRequest,
      Cratis.Chronicle.Contracts.EventSequences.GetForEventSourceIdAndEventTypesResponse

  rpc :GetTailSequenceNumber,
      Cratis.Chronicle.Contracts.EventSequences.GetTailSequenceNumberRequest,
      Cratis.Chronicle.Contracts.EventSequences.GetTailSequenceNumberResponse

  rpc :HasEventsForEventSourceId,
      Cratis.Chronicle.Contracts.EventSequences.HasEventsForEventSourceIdRequest,
      Cratis.Chronicle.Contracts.EventSequences.HasEventsForEventSourceIdResponse

  rpc :Redact,
      Cratis.Chronicle.Contracts.EventSequences.RedactRequest,
      Cratis.Chronicle.Contracts.EventSequences.RedactResponse

  rpc :RedactForEventSource,
      Cratis.Chronicle.Contracts.EventSequences.RedactForEventSourceRequest,
      Google.Protobuf.Empty

  rpc :Revise, Cratis.Chronicle.Contracts.EventSequences.ReviseRequest, Google.Protobuf.Empty
end

defmodule Cratis.Chronicle.Contracts.EventSequences.EventSequences.Stub do
  @moduledoc false

  use GRPC.Stub, service: Cratis.Chronicle.Contracts.EventSequences.EventSequences.Service
end