# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/firestore/v1beta1/write.proto

require 'google/protobuf'

require 'google/api/annotations_pb'
require 'google/firestore/v1beta1/common_pb'
require 'google/firestore/v1beta1/document_pb'
require 'google/protobuf/timestamp_pb'
Google::Protobuf::DescriptorPool.generated_pool.build do
  add_message "google.firestore.v1beta1.Write" do
    optional :update_mask, :message, 3, "google.firestore.v1beta1.DocumentMask"
    optional :current_document, :message, 4, "google.firestore.v1beta1.Precondition"
    oneof :operation do
      optional :update, :message, 1, "google.firestore.v1beta1.Document"
      optional :delete, :string, 2
      optional :transform, :message, 6, "google.firestore.v1beta1.DocumentTransform"
    end
  end
  add_message "google.firestore.v1beta1.DocumentTransform" do
    optional :document, :string, 1
    repeated :field_transforms, :message, 2, "google.firestore.v1beta1.DocumentTransform.FieldTransform"
  end
  add_message "google.firestore.v1beta1.DocumentTransform.FieldTransform" do
    optional :field_path, :string, 1
    oneof :transform_type do
      optional :set_to_server_value, :enum, 2, "google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue"
    end
  end
  add_enum "google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue" do
    value :SERVER_VALUE_UNSPECIFIED, 0
    value :REQUEST_TIME, 1
  end
  add_message "google.firestore.v1beta1.WriteResult" do
    optional :update_time, :message, 1, "google.protobuf.Timestamp"
    repeated :transform_results, :message, 2, "google.firestore.v1beta1.Value"
  end
  add_message "google.firestore.v1beta1.DocumentChange" do
    optional :document, :message, 1, "google.firestore.v1beta1.Document"
    repeated :target_ids, :int32, 5
    repeated :removed_target_ids, :int32, 6
  end
  add_message "google.firestore.v1beta1.DocumentDelete" do
    optional :document, :string, 1
    repeated :removed_target_ids, :int32, 6
    optional :read_time, :message, 4, "google.protobuf.Timestamp"
  end
  add_message "google.firestore.v1beta1.DocumentRemove" do
    optional :document, :string, 1
    repeated :removed_target_ids, :int32, 2
    optional :read_time, :message, 4, "google.protobuf.Timestamp"
  end
  add_message "google.firestore.v1beta1.ExistenceFilter" do
    optional :target_id, :int32, 1
    optional :count, :int32, 2
  end
end

module Google
  module Firestore
    module V1beta1
      Write = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.Write").msgclass
      DocumentTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform").msgclass
      DocumentTransform::FieldTransform = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform.FieldTransform").msgclass
      DocumentTransform::FieldTransform::ServerValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue").enummodule
      WriteResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.WriteResult").msgclass
      DocumentChange = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentChange").msgclass
      DocumentDelete = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentDelete").msgclass
      DocumentRemove = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.DocumentRemove").msgclass
      ExistenceFilter = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1beta1.ExistenceFilter").msgclass
    end
  end
end
