text: /*
   * Copyright 2018 Google
   *
   * 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 the protocol buffer compiler.  DO NOT EDIT!
  // source: google/firestore/v1/query.proto
  
  #include "google/firestore/v1/query.pb.h"
  
  #include <algorithm>
  
  #include <google/protobuf/io/coded_stream.h>
  #include <google/protobuf/extension_set.h>
  #include <google/protobuf/wire_format_lite.h>
  #include <google/protobuf/descriptor.h>
  #include <google/protobuf/generated_message_reflection.h>
  #include <google/protobuf/reflection_ops.h>
  #include <google/protobuf/wire_format.h>
  // @@protoc_insertion_point(includes)
  #include <google/protobuf/port_def.inc>
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fquery_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto;
  extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fwrappers_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto;
  namespace google {
  namespace firestore {
  namespace v1 {
  class StructuredQuery_CollectionSelectorDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_CollectionSelector> _instance;
  } _StructuredQuery_CollectionSelector_default_instance_;
  class StructuredQuery_FilterDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_Filter> _instance;
    const ::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter_;
    const ::google::firestore::v1::StructuredQuery_FieldFilter* field_filter_;
    const ::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter_;
  } _StructuredQuery_Filter_default_instance_;
  class StructuredQuery_CompositeFilterDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_CompositeFilter> _instance;
  } _StructuredQuery_CompositeFilter_default_instance_;
  class StructuredQuery_FieldFilterDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_FieldFilter> _instance;
  } _StructuredQuery_FieldFilter_default_instance_;
  class StructuredQuery_UnaryFilterDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_UnaryFilter> _instance;
    const ::google::firestore::v1::StructuredQuery_FieldReference* field_;
  } _StructuredQuery_UnaryFilter_default_instance_;
  class StructuredQuery_OrderDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_Order> _instance;
  } _StructuredQuery_Order_default_instance_;
  class StructuredQuery_FieldReferenceDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_FieldReference> _instance;
  } _StructuredQuery_FieldReference_default_instance_;
  class StructuredQuery_ProjectionDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery_Projection> _instance;
  } _StructuredQuery_Projection_default_instance_;
  class StructuredQueryDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<StructuredQuery> _instance;
  } _StructuredQuery_default_instance_;
  class CursorDefaultTypeInternal {
   public:
    ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Cursor> _instance;
  } _Cursor_default_instance_;
  }  // namespace v1
  }  // namespace firestore
  }  // namespace google
  static void InitDefaultsscc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_Cursor_default_instance_;
      new (ptr) ::google::firestore::v1::Cursor();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::Cursor::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<6> scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 6, 0, InitDefaultsscc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_CollectionSelector();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_CollectionSelector::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto}, {}};
  
  static void InitDefaultsscc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_Filter_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_Filter();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_CompositeFilter();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_Filter::InitAsDefaultInstance();
    ::google::firestore::v1::StructuredQuery_CompositeFilter::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_FieldFilter();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_FieldFilter::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base,
        &scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_FieldReference();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_FieldReference::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto}, {}};
  
  static void InitDefaultsscc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_Order_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_Order();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_Order::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_Projection_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_Projection();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_Projection::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  
  static void InitDefaultsscc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto() {
    GOOGLE_PROTOBUF_VERIFY_VERSION;
  
    {
      void* ptr = &::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_;
      new (ptr) ::google::firestore::v1::StructuredQuery_UnaryFilter();
      ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
    }
    ::google::firestore::v1::StructuredQuery_UnaryFilter::InitAsDefaultInstance();
  }
  
  ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto =
      {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto}, {
        &scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base,}};
  
  static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2fquery_2eproto[10];
  static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto[4];
  static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ffirestore_2fv1_2fquery_2eproto = nullptr;
  
  const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ffirestore_2fv1_2fquery_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, collection_id_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, all_descendants_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _internal_metadata_),
    ~0u,  // no _extensions_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _oneof_case_[0]),
    ~0u,  // no _weak_field_map_
    offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, composite_filter_),
    offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, field_filter_),
    offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, unary_filter_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, filter_type_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, op_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, filters_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, field_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, op_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, value_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _internal_metadata_),
    ~0u,  // no _extensions_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _oneof_case_[0]),
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, op_),
    offsetof(::google::firestore::v1::StructuredQuery_UnaryFilterDefaultTypeInternal, field_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, operand_type_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, field_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, direction_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, field_path_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, fields_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, select_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, from_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, where_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, order_by_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, start_at_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, end_at_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, offset_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, limit_),
    ~0u,  // no _has_bits_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Cursor, _internal_metadata_),
    ~0u,  // no _extensions_
    ~0u,  // no _oneof_case_
    ~0u,  // no _weak_field_map_
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Cursor, values_),
    PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Cursor, before_),
  };
  static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
    { 0, -1, sizeof(::google::firestore::v1::StructuredQuery_CollectionSelector)},
    { 7, -1, sizeof(::google::firestore::v1::StructuredQuery_Filter)},
    { 16, -1, sizeof(::google::firestore::v1::StructuredQuery_CompositeFilter)},
    { 23, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldFilter)},
    { 31, -1, sizeof(::google::firestore::v1::StructuredQuery_UnaryFilter)},
    { 39, -1, sizeof(::google::firestore::v1::StructuredQuery_Order)},
    { 46, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldReference)},
    { 52, -1, sizeof(::google::firestore::v1::StructuredQuery_Projection)},
    { 58, -1, sizeof(::google::firestore::v1::StructuredQuery)},
    { 71, -1, sizeof(::google::firestore::v1::Cursor)},
  };
  
  static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_Filter_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_Order_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_Projection_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_StructuredQuery_default_instance_),
    reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Cursor_default_instance_),
  };
  
  const char descriptor_table_protodef_google_2ffirestore_2fv1_2fquery_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
    "\n\037google/firestore/v1/query.proto\022\023googl"
    "e.firestore.v1\032\034google/api/annotations.p"
    "roto\032\"google/firestore/v1/document.proto"
    "\032\036google/protobuf/wrappers.proto\"\372\016\n\017Str"
    "ucturedQuery\022\?\n\006select\030\001 \001(\0132/.google.fi"
    "restore.v1.StructuredQuery.Projection\022E\n"
    "\004from\030\002 \003(\01327.google.firestore.v1.Struct"
    "uredQuery.CollectionSelector\022:\n\005where\030\003 "
    "\001(\0132+.google.firestore.v1.StructuredQuer"
    "y.Filter\022<\n\010order_by\030\004 \003(\0132*.google.fire"
    "store.v1.StructuredQuery.Order\022-\n\010start_"
    "at\030\007 \001(\0132\033.google.firestore.v1.Cursor\022+\n"
    "\006end_at\030\010 \001(\0132\033.google.firestore.v1.Curs"
    "or\022\016\n\006offset\030\006 \001(\005\022*\n\005limit\030\005 \001(\0132\033.goog"
    "le.protobuf.Int32Value\032D\n\022CollectionSele"
    "ctor\022\025\n\rcollection_id\030\002 \001(\t\022\027\n\017all_desce"
    "ndants\030\003 \001(\010\032\375\001\n\006Filter\022P\n\020composite_fil"
    "ter\030\001 \001(\01324.google.firestore.v1.Structur"
    "edQuery.CompositeFilterH\000\022H\n\014field_filte"
    "r\030\002 \001(\01320.google.firestore.v1.Structured"
    "Query.FieldFilterH\000\022H\n\014unary_filter\030\003 \001("
    "\01320.google.firestore.v1.StructuredQuery."
    "UnaryFilterH\000B\r\n\013filter_type\032\311\001\n\017Composi"
    "teFilter\022I\n\002op\030\001 \001(\0162=.google.firestore."
    "v1.StructuredQuery.CompositeFilter.Opera"
    "tor\022<\n\007filters\030\002 \003(\0132+.google.firestore."
    "v1.StructuredQuery.Filter\"-\n\010Operator\022\030\n"
    "\024OPERATOR_UNSPECIFIED\020\000\022\007\n\003AND\020\001\032\375\002\n\013Fie"
    "ldFilter\022B\n\005field\030\001 \001(\01323.google.firesto"
    "re.v1.StructuredQuery.FieldReference\022E\n\002"
    "op\030\002 \001(\01629.google.firestore.v1.Structure"
    "dQuery.FieldFilter.Operator\022)\n\005value\030\003 \001"
    "(\0132\032.google.firestore.v1.Value\"\267\001\n\010Opera"
    "tor\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\r\n\tLESS_TH"
    "AN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GREATER_"
    "THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t\n\005EQU"
    "AL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\022\006\n\002IN\020\010\022\026\n\022ARRA"
    "Y_CONTAINS_ANY\020\t\032\351\001\n\013UnaryFilter\022E\n\002op\030\001"
    " \001(\01629.google.firestore.v1.StructuredQue"
    "ry.UnaryFilter.Operator\022D\n\005field\030\002 \001(\01323"
    ".google.firestore.v1.StructuredQuery.Fie"
    "ldReferenceH\000\"=\n\010Operator\022\030\n\024OPERATOR_UN"
    "SPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NULL\020\003B\016\n\014"
    "operand_type\032\216\001\n\005Order\022B\n\005field\030\001 \001(\01323."
    "google.firestore.v1.StructuredQuery.Fiel"
    "dReference\022A\n\tdirection\030\002 \001(\0162..google.f"
    "irestore.v1.StructuredQuery.Direction\032$\n"
    "\016FieldReference\022\022\n\nfield_path\030\002 \001(\t\032Q\n\nP"
    "rojection\022C\n\006fields\030\002 \003(\01323.google.fires"
    "tore.v1.StructuredQuery.FieldReference\"E"
    "\n\tDirection\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\r"
    "\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"D\n\006Cursor\022"
    "*\n\006values\030\001 \003(\0132\032.google.firestore.v1.Va"
    "lue\022\016\n\006before\030\002 \001(\010B\256\001\n\027com.google.fires"
    "tore.v1B\nQueryProtoP\001Z<google.golang.org"
    "/genproto/googleapis/firestore/v1;firest"
    "ore\242\002\004GCFS\252\002\036Google.Cloud.Firestore.V1Be"
    "ta1\312\002\036Google\\Cloud\\Firestore\\V1beta1b\006pr"
    "oto3"
    ;
  static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_deps[3] = {
    &::descriptor_table_google_2fapi_2fannotations_2eproto,
    &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
    &::descriptor_table_google_2fprotobuf_2fwrappers_2eproto,
  };
  static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_sccs[9] = {
    &scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto.base,
    &scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto.base,
  };
  static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_once;
  static bool descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_initialized = false;
  const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto = {
    &descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_initialized, descriptor_table_protodef_google_2ffirestore_2fv1_2fquery_2eproto, "google/firestore/v1/query.proto", 2324,
    &descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_once, descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_sccs, descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto_deps, 9, 3,
    schemas, file_default_instances, TableStruct_google_2ffirestore_2fv1_2fquery_2eproto::offsets,
    file_level_metadata_google_2ffirestore_2fv1_2fquery_2eproto, 10, file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto, file_level_service_descriptors_google_2ffirestore_2fv1_2fquery_2eproto,
  };
  
  // Force running AddDescriptors() at dynamic initialization time.
  static bool dynamic_init_dummy_google_2ffirestore_2fv1_2fquery_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto), true);
  namespace google {
  namespace firestore {
  namespace v1 {
  const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StructuredQuery_CompositeFilter_Operator_descriptor() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto);
    return file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto[0];
  }
  bool StructuredQuery_CompositeFilter_Operator_IsValid(int value) {
    switch (value) {
      case 0:
      case 1:
        return true;
      default:
        return false;
    }
  }
  
  #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::OPERATOR_UNSPECIFIED;
  constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::AND;
  constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::Operator_MIN;
  constexpr StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::Operator_MAX;
  constexpr int StructuredQuery_CompositeFilter::Operator_ARRAYSIZE;
  #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StructuredQuery_FieldFilter_Operator_descriptor() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto);
    return file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto[1];
  }
  bool StructuredQuery_FieldFilter_Operator_IsValid(int value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 7:
      case 8:
      case 9:
        return true;
      default:
        return false;
    }
  }
  
  #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::OPERATOR_UNSPECIFIED;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::LESS_THAN;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::LESS_THAN_OR_EQUAL;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::GREATER_THAN;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::GREATER_THAN_OR_EQUAL;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::EQUAL;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::ARRAY_CONTAINS;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::IN_;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::ARRAY_CONTAINS_ANY;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::Operator_MIN;
  constexpr StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::Operator_MAX;
  constexpr int StructuredQuery_FieldFilter::Operator_ARRAYSIZE;
  #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StructuredQuery_UnaryFilter_Operator_descriptor() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto);
    return file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto[2];
  }
  bool StructuredQuery_UnaryFilter_Operator_IsValid(int value) {
    switch (value) {
      case 0:
      case 2:
      case 3:
        return true;
      default:
        return false;
    }
  }
  
  #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::OPERATOR_UNSPECIFIED;
  constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::IS_NAN;
  constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::IS_NULL;
  constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::Operator_MIN;
  constexpr StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::Operator_MAX;
  constexpr int StructuredQuery_UnaryFilter::Operator_ARRAYSIZE;
  #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* StructuredQuery_Direction_descriptor() {
    ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fquery_2eproto);
    return file_level_enum_descriptors_google_2ffirestore_2fv1_2fquery_2eproto[3];
  }
  bool StructuredQuery_Direction_IsValid(int value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
        return true;
      default:
        return false;
    }
  }
  
  #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  constexpr StructuredQuery_Direction StructuredQuery::DIRECTION_UNSPECIFIED;
  constexpr StructuredQuery_Direction StructuredQuery::ASCENDING;
  constexpr StructuredQuery_Direction StructuredQuery::DESCENDING;
  constexpr StructuredQuery_Direction StructuredQuery::Direction_MIN;
  constexpr StructuredQuery_Direction StructuredQuery::Direction_MAX;
  constexpr int StructuredQuery::Direction_ARRAYSIZE;
  #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
  
  // ===================================================================
  
  void StructuredQuery_CollectionSelector::InitAsDefaultInstance() {
  }
  class StructuredQuery_CollectionSelector::_Internal {
   public:
  };
  
  StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CollectionSelector)
  }
  StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector(const StructuredQuery_CollectionSelector& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
    if (!from._internal_collection_id().empty()) {
      collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
    }
    all_descendants_ = from.all_descendants_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CollectionSelector)
  }
  
  void StructuredQuery_CollectionSelector::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto.base);
    collection_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
    all_descendants_ = false;
  }
  
  StructuredQuery_CollectionSelector::~StructuredQuery_CollectionSelector() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CollectionSelector)
    SharedDtor();
  }
  
  void StructuredQuery_CollectionSelector::SharedDtor() {
    collection_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  }
  
  void StructuredQuery_CollectionSelector::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_CollectionSelector& StructuredQuery_CollectionSelector::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_CollectionSelector_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_CollectionSelector::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    collection_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
    all_descendants_ = false;
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_CollectionSelector::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // string collection_id = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            auto str = _internal_mutable_collection_id();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id"));
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // bool all_descendants = 3;
        case 3:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
            all_descendants_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_CollectionSelector::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // string collection_id = 2;
    if (this->collection_id().size() > 0) {
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        this->_internal_collection_id().data(), static_cast<int>(this->_internal_collection_id().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id");
      target = stream->WriteStringMaybeAliased(
          2, this->_internal_collection_id(), target);
    }
  
    // bool all_descendants = 3;
    if (this->all_descendants() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_all_descendants(), target);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CollectionSelector)
    return target;
  }
  
  size_t StructuredQuery_CollectionSelector::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // string collection_id = 2;
    if (this->collection_id().size() > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_collection_id());
    }
  
    // bool all_descendants = 3;
    if (this->all_descendants() != 0) {
      total_size += 1 + 1;
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_CollectionSelector::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_CollectionSelector* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_CollectionSelector>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CollectionSelector)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CollectionSelector)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_CollectionSelector::MergeFrom(const StructuredQuery_CollectionSelector& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.collection_id().size() > 0) {
  
      collection_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.collection_id_);
    }
    if (from.all_descendants() != 0) {
      _internal_set_all_descendants(from._internal_all_descendants());
    }
  }
  
  void StructuredQuery_CollectionSelector::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_CollectionSelector::CopyFrom(const StructuredQuery_CollectionSelector& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_CollectionSelector::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_CollectionSelector::InternalSwap(StructuredQuery_CollectionSelector* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    collection_id_.Swap(&other->collection_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
    swap(all_descendants_, other->all_descendants_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_CollectionSelector::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_Filter::InitAsDefaultInstance() {
    ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.composite_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter*>(
        ::google::firestore::v1::StructuredQuery_CompositeFilter::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.field_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldFilter*>(
        ::google::firestore::v1::StructuredQuery_FieldFilter::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.unary_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter*>(
        ::google::firestore::v1::StructuredQuery_UnaryFilter::internal_default_instance());
  }
  class StructuredQuery_Filter::_Internal {
   public:
    static const ::google::firestore::v1::StructuredQuery_CompositeFilter& composite_filter(const StructuredQuery_Filter* msg);
    static const ::google::firestore::v1::StructuredQuery_FieldFilter& field_filter(const StructuredQuery_Filter* msg);
    static const ::google::firestore::v1::StructuredQuery_UnaryFilter& unary_filter(const StructuredQuery_Filter* msg);
  };
  
  const ::google::firestore::v1::StructuredQuery_CompositeFilter&
  StructuredQuery_Filter::_Internal::composite_filter(const StructuredQuery_Filter* msg) {
    return *msg->filter_type_.composite_filter_;
  }
  const ::google::firestore::v1::StructuredQuery_FieldFilter&
  StructuredQuery_Filter::_Internal::field_filter(const StructuredQuery_Filter* msg) {
    return *msg->filter_type_.field_filter_;
  }
  const ::google::firestore::v1::StructuredQuery_UnaryFilter&
  StructuredQuery_Filter::_Internal::unary_filter(const StructuredQuery_Filter* msg) {
    return *msg->filter_type_.unary_filter_;
  }
  void StructuredQuery_Filter::set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter) {
    ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
    clear_filter_type();
    if (composite_filter) {
      ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
      if (message_arena != submessage_arena) {
        composite_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
            message_arena, composite_filter, submessage_arena);
      }
      set_has_composite_filter();
      filter_type_.composite_filter_ = composite_filter;
    }
    // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.composite_filter)
  }
  void StructuredQuery_Filter::set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* field_filter) {
    ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
    clear_filter_type();
    if (field_filter) {
      ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
      if (message_arena != submessage_arena) {
        field_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
            message_arena, field_filter, submessage_arena);
      }
      set_has_field_filter();
      filter_type_.field_filter_ = field_filter;
    }
    // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.field_filter)
  }
  void StructuredQuery_Filter::set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter) {
    ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
    clear_filter_type();
    if (unary_filter) {
      ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
      if (message_arena != submessage_arena) {
        unary_filter = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
            message_arena, unary_filter, submessage_arena);
      }
      set_has_unary_filter();
      filter_type_.unary_filter_ = unary_filter;
    }
    // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.unary_filter)
  }
  StructuredQuery_Filter::StructuredQuery_Filter()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Filter)
  }
  StructuredQuery_Filter::StructuredQuery_Filter(const StructuredQuery_Filter& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    clear_has_filter_type();
    switch (from.filter_type_case()) {
      case kCompositeFilter: {
        _internal_mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from._internal_composite_filter());
        break;
      }
      case kFieldFilter: {
        _internal_mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from._internal_field_filter());
        break;
      }
      case kUnaryFilter: {
        _internal_mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from._internal_unary_filter());
        break;
      }
      case FILTER_TYPE_NOT_SET: {
        break;
      }
    }
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Filter)
  }
  
  void StructuredQuery_Filter::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    clear_has_filter_type();
  }
  
  StructuredQuery_Filter::~StructuredQuery_Filter() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Filter)
    SharedDtor();
  }
  
  void StructuredQuery_Filter::SharedDtor() {
    if (has_filter_type()) {
      clear_filter_type();
    }
  }
  
  void StructuredQuery_Filter::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_Filter& StructuredQuery_Filter::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_Filter::clear_filter_type() {
  // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.Filter)
    switch (filter_type_case()) {
      case kCompositeFilter: {
        delete filter_type_.composite_filter_;
        break;
      }
      case kFieldFilter: {
        delete filter_type_.field_filter_;
        break;
      }
      case kUnaryFilter: {
        delete filter_type_.unary_filter_;
        break;
      }
      case FILTER_TYPE_NOT_SET: {
        break;
      }
    }
    _oneof_case_[0] = FILTER_TYPE_NOT_SET;
  }
  
  
  void StructuredQuery_Filter::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Filter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    clear_filter_type();
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_Filter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
            ptr = ctx->ParseMessage(_internal_mutable_composite_filter(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            ptr = ctx->ParseMessage(_internal_mutable_field_filter(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
        case 3:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
            ptr = ctx->ParseMessage(_internal_mutable_unary_filter(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_Filter::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Filter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
    if (_internal_has_composite_filter()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::composite_filter(this), target, stream);
    }
  
    // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
    if (_internal_has_field_filter()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          2, _Internal::field_filter(this), target, stream);
    }
  
    // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
    if (_internal_has_unary_filter()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          3, _Internal::unary_filter(this), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Filter)
    return target;
  }
  
  size_t StructuredQuery_Filter::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Filter)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    switch (filter_type_case()) {
      // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1;
      case kCompositeFilter: {
        total_size += 1 +
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
            *filter_type_.composite_filter_);
        break;
      }
      // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2;
      case kFieldFilter: {
        total_size += 1 +
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
            *filter_type_.field_filter_);
        break;
      }
      // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3;
      case kUnaryFilter: {
        total_size += 1 +
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
            *filter_type_.unary_filter_);
        break;
      }
      case FILTER_TYPE_NOT_SET: {
        break;
      }
    }
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_Filter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Filter)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_Filter* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_Filter>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Filter)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Filter)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_Filter::MergeFrom(const StructuredQuery_Filter& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Filter)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    switch (from.filter_type_case()) {
      case kCompositeFilter: {
        _internal_mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from._internal_composite_filter());
        break;
      }
      case kFieldFilter: {
        _internal_mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from._internal_field_filter());
        break;
      }
      case kUnaryFilter: {
        _internal_mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from._internal_unary_filter());
        break;
      }
      case FILTER_TYPE_NOT_SET: {
        break;
      }
    }
  }
  
  void StructuredQuery_Filter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Filter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_Filter::CopyFrom(const StructuredQuery_Filter& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Filter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_Filter::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_Filter::InternalSwap(StructuredQuery_Filter* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(filter_type_, other->filter_type_);
    swap(_oneof_case_[0], other->_oneof_case_[0]);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_Filter::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_CompositeFilter::InitAsDefaultInstance() {
  }
  class StructuredQuery_CompositeFilter::_Internal {
   public:
  };
  
  StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CompositeFilter)
  }
  StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter(const StructuredQuery_CompositeFilter& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr),
        filters_(from.filters_) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    op_ = from.op_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CompositeFilter)
  }
  
  void StructuredQuery_CompositeFilter::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    op_ = 0;
  }
  
  StructuredQuery_CompositeFilter::~StructuredQuery_CompositeFilter() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CompositeFilter)
    SharedDtor();
  }
  
  void StructuredQuery_CompositeFilter::SharedDtor() {
  }
  
  void StructuredQuery_CompositeFilter::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_CompositeFilter& StructuredQuery_CompositeFilter::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_CompositeFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_CompositeFilter::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    filters_.Clear();
    op_ = 0;
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_CompositeFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
            ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
            _internal_set_op(static_cast<::google::firestore::v1::StructuredQuery_CompositeFilter_Operator>(val));
          } else goto handle_unusual;
          continue;
        // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            ptr -= 1;
            do {
              ptr += 1;
              ptr = ctx->ParseMessage(_internal_add_filters(), ptr);
              CHK_(ptr);
              if (!ctx->DataAvailable(ptr)) break;
            } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_CompositeFilter::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
    if (this->op() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        1, this->_internal_op(), target);
    }
  
    // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
    for (unsigned int i = 0,
        n = static_cast<unsigned int>(this->_internal_filters_size()); i < n; i++) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, this->_internal_filters(i), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CompositeFilter)
    return target;
  }
  
  size_t StructuredQuery_CompositeFilter::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2;
    total_size += 1UL * this->_internal_filters_size();
    for (const auto& msg : this->filters_) {
      total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
    }
  
    // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1;
    if (this->op() != 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_op());
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_CompositeFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_CompositeFilter* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_CompositeFilter>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CompositeFilter)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CompositeFilter)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_CompositeFilter::MergeFrom(const StructuredQuery_CompositeFilter& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    filters_.MergeFrom(from.filters_);
    if (from.op() != 0) {
      _internal_set_op(from._internal_op());
    }
  }
  
  void StructuredQuery_CompositeFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_CompositeFilter::CopyFrom(const StructuredQuery_CompositeFilter& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_CompositeFilter::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_CompositeFilter::InternalSwap(StructuredQuery_CompositeFilter* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    filters_.InternalSwap(&other->filters_);
    swap(op_, other->op_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_CompositeFilter::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_FieldFilter::InitAsDefaultInstance() {
    ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
        ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::firestore::v1::Value*>(
        ::google::firestore::v1::Value::internal_default_instance());
  }
  class StructuredQuery_FieldFilter::_Internal {
   public:
    static const ::google::firestore::v1::StructuredQuery_FieldReference& field(const StructuredQuery_FieldFilter* msg);
    static const ::google::firestore::v1::Value& value(const StructuredQuery_FieldFilter* msg);
  };
  
  const ::google::firestore::v1::StructuredQuery_FieldReference&
  StructuredQuery_FieldFilter::_Internal::field(const StructuredQuery_FieldFilter* msg) {
    return *msg->field_;
  }
  const ::google::firestore::v1::Value&
  StructuredQuery_FieldFilter::_Internal::value(const StructuredQuery_FieldFilter* msg) {
    return *msg->value_;
  }
  void StructuredQuery_FieldFilter::clear_value() {
    if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
      delete value_;
    }
    value_ = nullptr;
  }
  StructuredQuery_FieldFilter::StructuredQuery_FieldFilter()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldFilter)
  }
  StructuredQuery_FieldFilter::StructuredQuery_FieldFilter(const StructuredQuery_FieldFilter& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    if (from._internal_has_field()) {
      field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_);
    } else {
      field_ = nullptr;
    }
    if (from._internal_has_value()) {
      value_ = new ::google::firestore::v1::Value(*from.value_);
    } else {
      value_ = nullptr;
    }
    op_ = from.op_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldFilter)
  }
  
  void StructuredQuery_FieldFilter::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    ::memset(&field_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&op_) -
        reinterpret_cast<char*>(&field_)) + sizeof(op_));
  }
  
  StructuredQuery_FieldFilter::~StructuredQuery_FieldFilter() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldFilter)
    SharedDtor();
  }
  
  void StructuredQuery_FieldFilter::SharedDtor() {
    if (this != internal_default_instance()) delete field_;
    if (this != internal_default_instance()) delete value_;
  }
  
  void StructuredQuery_FieldFilter::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_FieldFilter& StructuredQuery_FieldFilter::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_FieldFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_FieldFilter::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    if (GetArenaNoVirtual() == nullptr && field_ != nullptr) {
      delete field_;
    }
    field_ = nullptr;
    if (GetArenaNoVirtual() == nullptr && value_ != nullptr) {
      delete value_;
    }
    value_ = nullptr;
    op_ = 0;
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_FieldFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
            ptr = ctx->ParseMessage(_internal_mutable_field(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
            ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
            _internal_set_op(static_cast<::google::firestore::v1::StructuredQuery_FieldFilter_Operator>(val));
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.Value value = 3;
        case 3:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
            ptr = ctx->ParseMessage(_internal_mutable_value(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_FieldFilter::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
    if (this->has_field()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::field(this), target, stream);
    }
  
    // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
    if (this->op() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        2, this->_internal_op(), target);
    }
  
    // .google.firestore.v1.Value value = 3;
    if (this->has_value()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          3, _Internal::value(this), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldFilter)
    return target;
  }
  
  size_t StructuredQuery_FieldFilter::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldFilter)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
    if (this->has_field()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *field_);
    }
  
    // .google.firestore.v1.Value value = 3;
    if (this->has_value()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *value_);
    }
  
    // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2;
    if (this->op() != 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_op());
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_FieldFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_FieldFilter* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_FieldFilter>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldFilter)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldFilter)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_FieldFilter::MergeFrom(const StructuredQuery_FieldFilter& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.has_field()) {
      _internal_mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from._internal_field());
    }
    if (from.has_value()) {
      _internal_mutable_value()->::google::firestore::v1::Value::MergeFrom(from._internal_value());
    }
    if (from.op() != 0) {
      _internal_set_op(from._internal_op());
    }
  }
  
  void StructuredQuery_FieldFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_FieldFilter::CopyFrom(const StructuredQuery_FieldFilter& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_FieldFilter::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_FieldFilter::InternalSwap(StructuredQuery_FieldFilter* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(field_, other->field_);
    swap(value_, other->value_);
    swap(op_, other->op_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_FieldFilter::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_UnaryFilter::InitAsDefaultInstance() {
    ::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_.field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
        ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
  }
  class StructuredQuery_UnaryFilter::_Internal {
   public:
    static const ::google::firestore::v1::StructuredQuery_FieldReference& field(const StructuredQuery_UnaryFilter* msg);
  };
  
  const ::google::firestore::v1::StructuredQuery_FieldReference&
  StructuredQuery_UnaryFilter::_Internal::field(const StructuredQuery_UnaryFilter* msg) {
    return *msg->operand_type_.field_;
  }
  void StructuredQuery_UnaryFilter::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field) {
    ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
    clear_operand_type();
    if (field) {
      ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
      if (message_arena != submessage_arena) {
        field = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
            message_arena, field, submessage_arena);
      }
      set_has_field();
      operand_type_.field_ = field;
    }
    // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.UnaryFilter.field)
  }
  StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.UnaryFilter)
  }
  StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter(const StructuredQuery_UnaryFilter& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    op_ = from.op_;
    clear_has_operand_type();
    switch (from.operand_type_case()) {
      case kField: {
        _internal_mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from._internal_field());
        break;
      }
      case OPERAND_TYPE_NOT_SET: {
        break;
      }
    }
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.UnaryFilter)
  }
  
  void StructuredQuery_UnaryFilter::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    op_ = 0;
    clear_has_operand_type();
  }
  
  StructuredQuery_UnaryFilter::~StructuredQuery_UnaryFilter() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.UnaryFilter)
    SharedDtor();
  }
  
  void StructuredQuery_UnaryFilter::SharedDtor() {
    if (has_operand_type()) {
      clear_operand_type();
    }
  }
  
  void StructuredQuery_UnaryFilter::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_UnaryFilter& StructuredQuery_UnaryFilter::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_UnaryFilter_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_UnaryFilter::clear_operand_type() {
  // @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    switch (operand_type_case()) {
      case kField: {
        delete operand_type_.field_;
        break;
      }
      case OPERAND_TYPE_NOT_SET: {
        break;
      }
    }
    _oneof_case_[0] = OPERAND_TYPE_NOT_SET;
  }
  
  
  void StructuredQuery_UnaryFilter::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    op_ = 0;
    clear_operand_type();
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_UnaryFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
            ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
            _internal_set_op(static_cast<::google::firestore::v1::StructuredQuery_UnaryFilter_Operator>(val));
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            ptr = ctx->ParseMessage(_internal_mutable_field(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_UnaryFilter::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
    if (this->op() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        1, this->_internal_op(), target);
    }
  
    // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
    if (_internal_has_field()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          2, _Internal::field(this), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.UnaryFilter)
    return target;
  }
  
  size_t StructuredQuery_UnaryFilter::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1;
    if (this->op() != 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_op());
    }
  
    switch (operand_type_case()) {
      // .google.firestore.v1.StructuredQuery.FieldReference field = 2;
      case kField: {
        total_size += 1 +
          ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
            *operand_type_.field_);
        break;
      }
      case OPERAND_TYPE_NOT_SET: {
        break;
      }
    }
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_UnaryFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_UnaryFilter* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_UnaryFilter>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.UnaryFilter)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.UnaryFilter)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_UnaryFilter::MergeFrom(const StructuredQuery_UnaryFilter& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.op() != 0) {
      _internal_set_op(from._internal_op());
    }
    switch (from.operand_type_case()) {
      case kField: {
        _internal_mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from._internal_field());
        break;
      }
      case OPERAND_TYPE_NOT_SET: {
        break;
      }
    }
  }
  
  void StructuredQuery_UnaryFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_UnaryFilter::CopyFrom(const StructuredQuery_UnaryFilter& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_UnaryFilter::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_UnaryFilter::InternalSwap(StructuredQuery_UnaryFilter* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(op_, other->op_);
    swap(operand_type_, other->operand_type_);
    swap(_oneof_case_[0], other->_oneof_case_[0]);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_UnaryFilter::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_Order::InitAsDefaultInstance() {
    ::google::firestore::v1::_StructuredQuery_Order_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(
        ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance());
  }
  class StructuredQuery_Order::_Internal {
   public:
    static const ::google::firestore::v1::StructuredQuery_FieldReference& field(const StructuredQuery_Order* msg);
  };
  
  const ::google::firestore::v1::StructuredQuery_FieldReference&
  StructuredQuery_Order::_Internal::field(const StructuredQuery_Order* msg) {
    return *msg->field_;
  }
  StructuredQuery_Order::StructuredQuery_Order()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Order)
  }
  StructuredQuery_Order::StructuredQuery_Order(const StructuredQuery_Order& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    if (from._internal_has_field()) {
      field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_);
    } else {
      field_ = nullptr;
    }
    direction_ = from.direction_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Order)
  }
  
  void StructuredQuery_Order::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto.base);
    ::memset(&field_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&direction_) -
        reinterpret_cast<char*>(&field_)) + sizeof(direction_));
  }
  
  StructuredQuery_Order::~StructuredQuery_Order() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Order)
    SharedDtor();
  }
  
  void StructuredQuery_Order::SharedDtor() {
    if (this != internal_default_instance()) delete field_;
  }
  
  void StructuredQuery_Order::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_Order& StructuredQuery_Order::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_Order_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_Order::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Order)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    if (GetArenaNoVirtual() == nullptr && field_ != nullptr) {
      delete field_;
    }
    field_ = nullptr;
    direction_ = 0;
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_Order::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
            ptr = ctx->ParseMessage(_internal_mutable_field(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.Direction direction = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
            ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
            _internal_set_direction(static_cast<::google::firestore::v1::StructuredQuery_Direction>(val));
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_Order::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Order)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
    if (this->has_field()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::field(this), target, stream);
    }
  
    // .google.firestore.v1.StructuredQuery.Direction direction = 2;
    if (this->direction() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        2, this->_internal_direction(), target);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Order)
    return target;
  }
  
  size_t StructuredQuery_Order::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Order)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.FieldReference field = 1;
    if (this->has_field()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *field_);
    }
  
    // .google.firestore.v1.StructuredQuery.Direction direction = 2;
    if (this->direction() != 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_direction());
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_Order::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Order)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_Order* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_Order>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Order)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Order)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_Order::MergeFrom(const StructuredQuery_Order& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Order)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.has_field()) {
      _internal_mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from._internal_field());
    }
    if (from.direction() != 0) {
      _internal_set_direction(from._internal_direction());
    }
  }
  
  void StructuredQuery_Order::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Order)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_Order::CopyFrom(const StructuredQuery_Order& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Order)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_Order::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_Order::InternalSwap(StructuredQuery_Order* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    swap(field_, other->field_);
    swap(direction_, other->direction_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_Order::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_FieldReference::InitAsDefaultInstance() {
  }
  class StructuredQuery_FieldReference::_Internal {
   public:
  };
  
  StructuredQuery_FieldReference::StructuredQuery_FieldReference()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldReference)
  }
  StructuredQuery_FieldReference::StructuredQuery_FieldReference(const StructuredQuery_FieldReference& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    field_path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
    if (!from._internal_field_path().empty()) {
      field_path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.field_path_);
    }
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldReference)
  }
  
  void StructuredQuery_FieldReference::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base);
    field_path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  }
  
  StructuredQuery_FieldReference::~StructuredQuery_FieldReference() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldReference)
    SharedDtor();
  }
  
  void StructuredQuery_FieldReference::SharedDtor() {
    field_path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  }
  
  void StructuredQuery_FieldReference::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_FieldReference& StructuredQuery_FieldReference::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_FieldReference_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_FieldReference::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldReference)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    field_path_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_FieldReference::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // string field_path = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            auto str = _internal_mutable_field_path();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.StructuredQuery.FieldReference.field_path"));
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_FieldReference::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldReference)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // string field_path = 2;
    if (this->field_path().size() > 0) {
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        this->_internal_field_path().data(), static_cast<int>(this->_internal_field_path().length()),
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
        "google.firestore.v1.StructuredQuery.FieldReference.field_path");
      target = stream->WriteStringMaybeAliased(
          2, this->_internal_field_path(), target);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldReference)
    return target;
  }
  
  size_t StructuredQuery_FieldReference::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldReference)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // string field_path = 2;
    if (this->field_path().size() > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_field_path());
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_FieldReference::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_FieldReference* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_FieldReference>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldReference)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldReference)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_FieldReference::MergeFrom(const StructuredQuery_FieldReference& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    if (from.field_path().size() > 0) {
  
      field_path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.field_path_);
    }
  }
  
  void StructuredQuery_FieldReference::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_FieldReference::CopyFrom(const StructuredQuery_FieldReference& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_FieldReference::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_FieldReference::InternalSwap(StructuredQuery_FieldReference* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    field_path_.Swap(&other->field_path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      GetArenaNoVirtual());
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_FieldReference::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery_Projection::InitAsDefaultInstance() {
  }
  class StructuredQuery_Projection::_Internal {
   public:
  };
  
  StructuredQuery_Projection::StructuredQuery_Projection()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Projection)
  }
  StructuredQuery_Projection::StructuredQuery_Projection(const StructuredQuery_Projection& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr),
        fields_(from.fields_) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Projection)
  }
  
  void StructuredQuery_Projection::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto.base);
  }
  
  StructuredQuery_Projection::~StructuredQuery_Projection() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Projection)
    SharedDtor();
  }
  
  void StructuredQuery_Projection::SharedDtor() {
  }
  
  void StructuredQuery_Projection::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery_Projection& StructuredQuery_Projection::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_Projection_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery_Projection::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Projection)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    fields_.Clear();
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery_Projection::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            ptr -= 1;
            do {
              ptr += 1;
              ptr = ctx->ParseMessage(_internal_add_fields(), ptr);
              CHK_(ptr);
              if (!ctx->DataAvailable(ptr)) break;
            } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery_Projection::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Projection)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
    for (unsigned int i = 0,
        n = static_cast<unsigned int>(this->_internal_fields_size()); i < n; i++) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, this->_internal_fields(i), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Projection)
    return target;
  }
  
  size_t StructuredQuery_Projection::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Projection)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2;
    total_size += 1UL * this->_internal_fields_size();
    for (const auto& msg : this->fields_) {
      total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery_Projection::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Projection)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery_Projection* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery_Projection>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Projection)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Projection)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery_Projection::MergeFrom(const StructuredQuery_Projection& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Projection)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    fields_.MergeFrom(from.fields_);
  }
  
  void StructuredQuery_Projection::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Projection)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery_Projection::CopyFrom(const StructuredQuery_Projection& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Projection)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery_Projection::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery_Projection::InternalSwap(StructuredQuery_Projection* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    fields_.InternalSwap(&other->fields_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery_Projection::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void StructuredQuery::InitAsDefaultInstance() {
    ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->select_ = const_cast< ::google::firestore::v1::StructuredQuery_Projection*>(
        ::google::firestore::v1::StructuredQuery_Projection::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->where_ = const_cast< ::google::firestore::v1::StructuredQuery_Filter*>(
        ::google::firestore::v1::StructuredQuery_Filter::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->start_at_ = const_cast< ::google::firestore::v1::Cursor*>(
        ::google::firestore::v1::Cursor::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->end_at_ = const_cast< ::google::firestore::v1::Cursor*>(
        ::google::firestore::v1::Cursor::internal_default_instance());
    ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->limit_ = const_cast< PROTOBUF_NAMESPACE_ID::Int32Value*>(
        PROTOBUF_NAMESPACE_ID::Int32Value::internal_default_instance());
  }
  class StructuredQuery::_Internal {
   public:
    static const ::google::firestore::v1::StructuredQuery_Projection& select(const StructuredQuery* msg);
    static const ::google::firestore::v1::StructuredQuery_Filter& where(const StructuredQuery* msg);
    static const ::google::firestore::v1::Cursor& start_at(const StructuredQuery* msg);
    static const ::google::firestore::v1::Cursor& end_at(const StructuredQuery* msg);
    static const PROTOBUF_NAMESPACE_ID::Int32Value& limit(const StructuredQuery* msg);
  };
  
  const ::google::firestore::v1::StructuredQuery_Projection&
  StructuredQuery::_Internal::select(const StructuredQuery* msg) {
    return *msg->select_;
  }
  const ::google::firestore::v1::StructuredQuery_Filter&
  StructuredQuery::_Internal::where(const StructuredQuery* msg) {
    return *msg->where_;
  }
  const ::google::firestore::v1::Cursor&
  StructuredQuery::_Internal::start_at(const StructuredQuery* msg) {
    return *msg->start_at_;
  }
  const ::google::firestore::v1::Cursor&
  StructuredQuery::_Internal::end_at(const StructuredQuery* msg) {
    return *msg->end_at_;
  }
  const PROTOBUF_NAMESPACE_ID::Int32Value&
  StructuredQuery::_Internal::limit(const StructuredQuery* msg) {
    return *msg->limit_;
  }
  void StructuredQuery::clear_limit() {
    if (GetArenaNoVirtual() == nullptr && limit_ != nullptr) {
      delete limit_;
    }
    limit_ = nullptr;
  }
  StructuredQuery::StructuredQuery()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery)
  }
  StructuredQuery::StructuredQuery(const StructuredQuery& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr),
        from_(from.from_),
        order_by_(from.order_by_) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    if (from._internal_has_select()) {
      select_ = new ::google::firestore::v1::StructuredQuery_Projection(*from.select_);
    } else {
      select_ = nullptr;
    }
    if (from._internal_has_where()) {
      where_ = new ::google::firestore::v1::StructuredQuery_Filter(*from.where_);
    } else {
      where_ = nullptr;
    }
    if (from._internal_has_limit()) {
      limit_ = new PROTOBUF_NAMESPACE_ID::Int32Value(*from.limit_);
    } else {
      limit_ = nullptr;
    }
    if (from._internal_has_start_at()) {
      start_at_ = new ::google::firestore::v1::Cursor(*from.start_at_);
    } else {
      start_at_ = nullptr;
    }
    if (from._internal_has_end_at()) {
      end_at_ = new ::google::firestore::v1::Cursor(*from.end_at_);
    } else {
      end_at_ = nullptr;
    }
    offset_ = from.offset_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery)
  }
  
  void StructuredQuery::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base);
    ::memset(&select_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&offset_) -
        reinterpret_cast<char*>(&select_)) + sizeof(offset_));
  }
  
  StructuredQuery::~StructuredQuery() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery)
    SharedDtor();
  }
  
  void StructuredQuery::SharedDtor() {
    if (this != internal_default_instance()) delete select_;
    if (this != internal_default_instance()) delete where_;
    if (this != internal_default_instance()) delete limit_;
    if (this != internal_default_instance()) delete start_at_;
    if (this != internal_default_instance()) delete end_at_;
  }
  
  void StructuredQuery::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const StructuredQuery& StructuredQuery::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_StructuredQuery_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void StructuredQuery::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    from_.Clear();
    order_by_.Clear();
    if (GetArenaNoVirtual() == nullptr && select_ != nullptr) {
      delete select_;
    }
    select_ = nullptr;
    if (GetArenaNoVirtual() == nullptr && where_ != nullptr) {
      delete where_;
    }
    where_ = nullptr;
    if (GetArenaNoVirtual() == nullptr && limit_ != nullptr) {
      delete limit_;
    }
    limit_ = nullptr;
    if (GetArenaNoVirtual() == nullptr && start_at_ != nullptr) {
      delete start_at_;
    }
    start_at_ = nullptr;
    if (GetArenaNoVirtual() == nullptr && end_at_ != nullptr) {
      delete end_at_;
    }
    end_at_ = nullptr;
    offset_ = 0;
    _internal_metadata_.Clear();
  }
  
  const char* StructuredQuery::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // .google.firestore.v1.StructuredQuery.Projection select = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
            ptr = ctx->ParseMessage(_internal_mutable_select(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
            ptr -= 1;
            do {
              ptr += 1;
              ptr = ctx->ParseMessage(_internal_add_from(), ptr);
              CHK_(ptr);
              if (!ctx->DataAvailable(ptr)) break;
            } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.StructuredQuery.Filter where = 3;
        case 3:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
            ptr = ctx->ParseMessage(_internal_mutable_where(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
        case 4:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
            ptr -= 1;
            do {
              ptr += 1;
              ptr = ctx->ParseMessage(_internal_add_order_by(), ptr);
              CHK_(ptr);
              if (!ctx->DataAvailable(ptr)) break;
            } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
          } else goto handle_unusual;
          continue;
        // .google.protobuf.Int32Value limit = 5;
        case 5:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
            ptr = ctx->ParseMessage(_internal_mutable_limit(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // int32 offset = 6;
        case 6:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
            offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.Cursor start_at = 7;
        case 7:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
            ptr = ctx->ParseMessage(_internal_mutable_start_at(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        // .google.firestore.v1.Cursor end_at = 8;
        case 8:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
            ptr = ctx->ParseMessage(_internal_mutable_end_at(), ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* StructuredQuery::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // .google.firestore.v1.StructuredQuery.Projection select = 1;
    if (this->has_select()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          1, _Internal::select(this), target, stream);
    }
  
    // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
    for (unsigned int i = 0,
        n = static_cast<unsigned int>(this->_internal_from_size()); i < n; i++) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, this->_internal_from(i), target, stream);
    }
  
    // .google.firestore.v1.StructuredQuery.Filter where = 3;
    if (this->has_where()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          3, _Internal::where(this), target, stream);
    }
  
    // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
    for (unsigned int i = 0,
        n = static_cast<unsigned int>(this->_internal_order_by_size()); i < n; i++) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, this->_internal_order_by(i), target, stream);
    }
  
    // .google.protobuf.Int32Value limit = 5;
    if (this->has_limit()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          5, _Internal::limit(this), target, stream);
    }
  
    // int32 offset = 6;
    if (this->offset() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_offset(), target);
    }
  
    // .google.firestore.v1.Cursor start_at = 7;
    if (this->has_start_at()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          7, _Internal::start_at(this), target, stream);
    }
  
    // .google.firestore.v1.Cursor end_at = 8;
    if (this->has_end_at()) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(
          8, _Internal::end_at(this), target, stream);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery)
    return target;
  }
  
  size_t StructuredQuery::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2;
    total_size += 1UL * this->_internal_from_size();
    for (const auto& msg : this->from_) {
      total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
    }
  
    // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4;
    total_size += 1UL * this->_internal_order_by_size();
    for (const auto& msg : this->order_by_) {
      total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
    }
  
    // .google.firestore.v1.StructuredQuery.Projection select = 1;
    if (this->has_select()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *select_);
    }
  
    // .google.firestore.v1.StructuredQuery.Filter where = 3;
    if (this->has_where()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *where_);
    }
  
    // .google.protobuf.Int32Value limit = 5;
    if (this->has_limit()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *limit_);
    }
  
    // .google.firestore.v1.Cursor start_at = 7;
    if (this->has_start_at()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *start_at_);
    }
  
    // .google.firestore.v1.Cursor end_at = 8;
    if (this->has_end_at()) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *end_at_);
    }
  
    // int32 offset = 6;
    if (this->offset() != 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_offset());
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void StructuredQuery::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery)
    GOOGLE_DCHECK_NE(&from, this);
    const StructuredQuery* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<StructuredQuery>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery)
      MergeFrom(*source);
    }
  }
  
  void StructuredQuery::MergeFrom(const StructuredQuery& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    from_.MergeFrom(from.from_);
    order_by_.MergeFrom(from.order_by_);
    if (from.has_select()) {
      _internal_mutable_select()->::google::firestore::v1::StructuredQuery_Projection::MergeFrom(from._internal_select());
    }
    if (from.has_where()) {
      _internal_mutable_where()->::google::firestore::v1::StructuredQuery_Filter::MergeFrom(from._internal_where());
    }
    if (from.has_limit()) {
      _internal_mutable_limit()->PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(from._internal_limit());
    }
    if (from.has_start_at()) {
      _internal_mutable_start_at()->::google::firestore::v1::Cursor::MergeFrom(from._internal_start_at());
    }
    if (from.has_end_at()) {
      _internal_mutable_end_at()->::google::firestore::v1::Cursor::MergeFrom(from._internal_end_at());
    }
    if (from.offset() != 0) {
      _internal_set_offset(from._internal_offset());
    }
  }
  
  void StructuredQuery::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void StructuredQuery::CopyFrom(const StructuredQuery& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool StructuredQuery::IsInitialized() const {
    return true;
  }
  
  void StructuredQuery::InternalSwap(StructuredQuery* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    from_.InternalSwap(&other->from_);
    order_by_.InternalSwap(&other->order_by_);
    swap(select_, other->select_);
    swap(where_, other->where_);
    swap(limit_, other->limit_);
    swap(start_at_, other->start_at_);
    swap(end_at_, other->end_at_);
    swap(offset_, other->offset_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata StructuredQuery::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // ===================================================================
  
  void Cursor::InitAsDefaultInstance() {
  }
  class Cursor::_Internal {
   public:
  };
  
  void Cursor::clear_values() {
    values_.Clear();
  }
  Cursor::Cursor()
    : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
    SharedCtor();
    // @@protoc_insertion_point(constructor:google.firestore.v1.Cursor)
  }
  Cursor::Cursor(const Cursor& from)
    : ::PROTOBUF_NAMESPACE_ID::Message(),
        _internal_metadata_(nullptr),
        values_(from.values_) {
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    before_ = from.before_;
    // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Cursor)
  }
  
  void Cursor::SharedCtor() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto.base);
    before_ = false;
  }
  
  Cursor::~Cursor() {
    // @@protoc_insertion_point(destructor:google.firestore.v1.Cursor)
    SharedDtor();
  }
  
  void Cursor::SharedDtor() {
  }
  
  void Cursor::SetCachedSize(int size) const {
    _cached_size_.Set(size);
  }
  const Cursor& Cursor::default_instance() {
    ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Cursor_google_2ffirestore_2fv1_2fquery_2eproto.base);
    return *internal_default_instance();
  }
  
  
  void Cursor::Clear() {
  // @@protoc_insertion_point(message_clear_start:google.firestore.v1.Cursor)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    values_.Clear();
    before_ = false;
    _internal_metadata_.Clear();
  }
  
  const char* Cursor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
    while (!ctx->Done(&ptr)) {
      ::PROTOBUF_NAMESPACE_ID::uint32 tag;
      ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
      CHK_(ptr);
      switch (tag >> 3) {
        // repeated .google.firestore.v1.Value values = 1;
        case 1:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
            ptr -= 1;
            do {
              ptr += 1;
              ptr = ctx->ParseMessage(_internal_add_values(), ptr);
              CHK_(ptr);
              if (!ctx->DataAvailable(ptr)) break;
            } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
          } else goto handle_unusual;
          continue;
        // bool before = 2;
        case 2:
          if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
            before_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
          } else goto handle_unusual;
          continue;
        default: {
        handle_unusual:
          if ((tag & 7) == 4 || tag == 0) {
            ctx->SetLastTag(tag);
            goto success;
          }
          ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
          CHK_(ptr != nullptr);
          continue;
        }
      }  // switch
    }  // while
  success:
    return ptr;
  failure:
    ptr = nullptr;
    goto success;
  #undef CHK_
  }
  
  ::PROTOBUF_NAMESPACE_ID::uint8* Cursor::_InternalSerialize(
      ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
    // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Cursor)
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.Value values = 1;
    for (unsigned int i = 0,
        n = static_cast<unsigned int>(this->_internal_values_size()); i < n; i++) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, this->_internal_values(i), target, stream);
    }
  
    // bool before = 2;
    if (this->before() != 0) {
      target = stream->EnsureSpace(target);
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_before(), target);
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
          _internal_metadata_.unknown_fields(), target, stream);
    }
    // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Cursor)
    return target;
  }
  
  size_t Cursor::ByteSizeLong() const {
  // @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Cursor)
    size_t total_size = 0;
  
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    // Prevent compiler warnings about cached_has_bits being unused
    (void) cached_has_bits;
  
    // repeated .google.firestore.v1.Value values = 1;
    total_size += 1UL * this->_internal_values_size();
    for (const auto& msg : this->values_) {
      total_size +=
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
    }
  
    // bool before = 2;
    if (this->before() != 0) {
      total_size += 1 + 1;
    }
  
    if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
      return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
          _internal_metadata_, total_size, &_cached_size_);
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
    SetCachedSize(cached_size);
    return total_size;
  }
  
  void Cursor::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Cursor)
    GOOGLE_DCHECK_NE(&from, this);
    const Cursor* source =
        ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Cursor>(
            &from);
    if (source == nullptr) {
    // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Cursor)
      ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
    } else {
    // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Cursor)
      MergeFrom(*source);
    }
  }
  
  void Cursor::MergeFrom(const Cursor& from) {
  // @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Cursor)
    GOOGLE_DCHECK_NE(&from, this);
    _internal_metadata_.MergeFrom(from._internal_metadata_);
    ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
    (void) cached_has_bits;
  
    values_.MergeFrom(from.values_);
    if (from.before() != 0) {
      _internal_set_before(from._internal_before());
    }
  }
  
  void Cursor::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  // @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Cursor)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  void Cursor::CopyFrom(const Cursor& from) {
  // @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Cursor)
    if (&from == this) return;
    Clear();
    MergeFrom(from);
  }
  
  bool Cursor::IsInitialized() const {
    return true;
  }
  
  void Cursor::InternalSwap(Cursor* other) {
    using std::swap;
    _internal_metadata_.Swap(&other->_internal_metadata_);
    values_.InternalSwap(&other->values_);
    swap(before_, other->before_);
  }
  
  ::PROTOBUF_NAMESPACE_ID::Metadata Cursor::GetMetadata() const {
    return GetMetadataStatic();
  }
  
  
  // @@protoc_insertion_point(namespace_scope)
  }  // namespace v1
  }  // namespace firestore
  }  // namespace google
  PROTOBUF_NAMESPACE_OPEN
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_CollectionSelector* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_CollectionSelector >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_CollectionSelector >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_Filter* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_Filter >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_Filter >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_CompositeFilter* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_CompositeFilter >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_CompositeFilter >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_FieldFilter* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_FieldFilter >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_FieldFilter >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_UnaryFilter* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_UnaryFilter >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_UnaryFilter >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_Order* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_Order >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_Order >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_FieldReference* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_FieldReference >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_FieldReference >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery_Projection* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery_Projection >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery_Projection >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::StructuredQuery* Arena::CreateMaybeMessage< ::google::firestore::v1::StructuredQuery >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::StructuredQuery >(arena);
  }
  template<> PROTOBUF_NOINLINE ::google::firestore::v1::Cursor* Arena::CreateMaybeMessage< ::google::firestore::v1::Cursor >(Arena* arena) {
    return Arena::CreateInternal< ::google::firestore::v1::Cursor >(arena);
  }
  PROTOBUF_NAMESPACE_CLOSE
  
  // @@protoc_insertion_point(global_scope)
  #include <google/protobuf/port_undef.inc>
  