vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,583 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/admin/v1beta1/firestore_admin.proto
/*
Package admin is a generated protocol buffer package.
It is generated from these files:
google/firestore/admin/v1beta1/firestore_admin.proto
google/firestore/admin/v1beta1/index.proto
It has these top-level messages:
IndexOperationMetadata
Progress
CreateIndexRequest
GetIndexRequest
ListIndexesRequest
DeleteIndexRequest
ListIndexesResponse
IndexField
Index
*/
package admin
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_longrunning "google.golang.org/genproto/googleapis/longrunning"
import google_protobuf2 "github.com/golang/protobuf/ptypes/empty"
import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// The type of index operation.
type IndexOperationMetadata_OperationType int32
const (
// Unspecified. Never set by server.
IndexOperationMetadata_OPERATION_TYPE_UNSPECIFIED IndexOperationMetadata_OperationType = 0
// The operation is creating the index. Initiated by a `CreateIndex` call.
IndexOperationMetadata_CREATING_INDEX IndexOperationMetadata_OperationType = 1
)
var IndexOperationMetadata_OperationType_name = map[int32]string{
0: "OPERATION_TYPE_UNSPECIFIED",
1: "CREATING_INDEX",
}
var IndexOperationMetadata_OperationType_value = map[string]int32{
"OPERATION_TYPE_UNSPECIFIED": 0,
"CREATING_INDEX": 1,
}
func (x IndexOperationMetadata_OperationType) String() string {
return proto.EnumName(IndexOperationMetadata_OperationType_name, int32(x))
}
func (IndexOperationMetadata_OperationType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{0, 0}
}
// Metadata for index operations. This metadata populates
// the metadata field of [google.longrunning.Operation][google.longrunning.Operation].
type IndexOperationMetadata struct {
// The time that work began on the operation.
StartTime *google_protobuf3.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime" json:"start_time,omitempty"`
// The time the operation ended, either successfully or otherwise. Unset if
// the operation is still active.
EndTime *google_protobuf3.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime" json:"end_time,omitempty"`
// The index resource that this operation is acting on. For example:
// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
Index string `protobuf:"bytes,3,opt,name=index" json:"index,omitempty"`
// The type of index operation.
OperationType IndexOperationMetadata_OperationType `protobuf:"varint,4,opt,name=operation_type,json=operationType,enum=google.firestore.admin.v1beta1.IndexOperationMetadata_OperationType" json:"operation_type,omitempty"`
// True if the [google.longrunning.Operation] was cancelled. If the
// cancellation is in progress, cancelled will be true but
// [google.longrunning.Operation.done][google.longrunning.Operation.done] will be false.
Cancelled bool `protobuf:"varint,5,opt,name=cancelled" json:"cancelled,omitempty"`
// Progress of the existing operation, measured in number of documents.
DocumentProgress *Progress `protobuf:"bytes,6,opt,name=document_progress,json=documentProgress" json:"document_progress,omitempty"`
}
func (m *IndexOperationMetadata) Reset() { *m = IndexOperationMetadata{} }
func (m *IndexOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*IndexOperationMetadata) ProtoMessage() {}
func (*IndexOperationMetadata) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *IndexOperationMetadata) GetStartTime() *google_protobuf3.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *IndexOperationMetadata) GetEndTime() *google_protobuf3.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
func (m *IndexOperationMetadata) GetIndex() string {
if m != nil {
return m.Index
}
return ""
}
func (m *IndexOperationMetadata) GetOperationType() IndexOperationMetadata_OperationType {
if m != nil {
return m.OperationType
}
return IndexOperationMetadata_OPERATION_TYPE_UNSPECIFIED
}
func (m *IndexOperationMetadata) GetCancelled() bool {
if m != nil {
return m.Cancelled
}
return false
}
func (m *IndexOperationMetadata) GetDocumentProgress() *Progress {
if m != nil {
return m.DocumentProgress
}
return nil
}
// Measures the progress of a particular metric.
type Progress struct {
// An estimate of how much work has been completed. Note that this may be
// greater than `work_estimated`.
WorkCompleted int64 `protobuf:"varint,1,opt,name=work_completed,json=workCompleted" json:"work_completed,omitempty"`
// An estimate of how much work needs to be performed. Zero if the
// work estimate is unavailable. May change as work progresses.
WorkEstimated int64 `protobuf:"varint,2,opt,name=work_estimated,json=workEstimated" json:"work_estimated,omitempty"`
}
func (m *Progress) Reset() { *m = Progress{} }
func (m *Progress) String() string { return proto.CompactTextString(m) }
func (*Progress) ProtoMessage() {}
func (*Progress) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Progress) GetWorkCompleted() int64 {
if m != nil {
return m.WorkCompleted
}
return 0
}
func (m *Progress) GetWorkEstimated() int64 {
if m != nil {
return m.WorkEstimated
}
return 0
}
// The request for [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
type CreateIndexRequest struct {
// The name of the database this index will apply to. For example:
// `projects/{project_id}/databases/{database_id}`
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
// The index to create. The name and state fields are output only and will be
// ignored. Certain single field indexes cannot be created or deleted.
Index *Index `protobuf:"bytes,2,opt,name=index" json:"index,omitempty"`
}
func (m *CreateIndexRequest) Reset() { *m = CreateIndexRequest{} }
func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) }
func (*CreateIndexRequest) ProtoMessage() {}
func (*CreateIndexRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *CreateIndexRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateIndexRequest) GetIndex() *Index {
if m != nil {
return m.Index
}
return nil
}
// The request for [FirestoreAdmin.GetIndex][google.firestore.admin.v1beta1.FirestoreAdmin.GetIndex].
type GetIndexRequest struct {
// The name of the index. For example:
// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetIndexRequest) Reset() { *m = GetIndexRequest{} }
func (m *GetIndexRequest) String() string { return proto.CompactTextString(m) }
func (*GetIndexRequest) ProtoMessage() {}
func (*GetIndexRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *GetIndexRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].
type ListIndexesRequest struct {
// The database name. For example:
// `projects/{project_id}/databases/{database_id}`
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
Filter string `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"`
// The standard List page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// The standard List page token.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
}
func (m *ListIndexesRequest) Reset() { *m = ListIndexesRequest{} }
func (m *ListIndexesRequest) String() string { return proto.CompactTextString(m) }
func (*ListIndexesRequest) ProtoMessage() {}
func (*ListIndexesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *ListIndexesRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListIndexesRequest) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
func (m *ListIndexesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListIndexesRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The request for [FirestoreAdmin.DeleteIndex][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex].
type DeleteIndexRequest struct {
// The index name. For example:
// `projects/{project_id}/databases/{database_id}/indexes/{index_id}`
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *DeleteIndexRequest) Reset() { *m = DeleteIndexRequest{} }
func (m *DeleteIndexRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteIndexRequest) ProtoMessage() {}
func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *DeleteIndexRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The response for [FirestoreAdmin.ListIndexes][google.firestore.admin.v1beta1.FirestoreAdmin.ListIndexes].
type ListIndexesResponse struct {
// The indexes.
Indexes []*Index `protobuf:"bytes,1,rep,name=indexes" json:"indexes,omitempty"`
// The standard List next-page token.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (m *ListIndexesResponse) Reset() { *m = ListIndexesResponse{} }
func (m *ListIndexesResponse) String() string { return proto.CompactTextString(m) }
func (*ListIndexesResponse) ProtoMessage() {}
func (*ListIndexesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *ListIndexesResponse) GetIndexes() []*Index {
if m != nil {
return m.Indexes
}
return nil
}
func (m *ListIndexesResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
func init() {
proto.RegisterType((*IndexOperationMetadata)(nil), "google.firestore.admin.v1beta1.IndexOperationMetadata")
proto.RegisterType((*Progress)(nil), "google.firestore.admin.v1beta1.Progress")
proto.RegisterType((*CreateIndexRequest)(nil), "google.firestore.admin.v1beta1.CreateIndexRequest")
proto.RegisterType((*GetIndexRequest)(nil), "google.firestore.admin.v1beta1.GetIndexRequest")
proto.RegisterType((*ListIndexesRequest)(nil), "google.firestore.admin.v1beta1.ListIndexesRequest")
proto.RegisterType((*DeleteIndexRequest)(nil), "google.firestore.admin.v1beta1.DeleteIndexRequest")
proto.RegisterType((*ListIndexesResponse)(nil), "google.firestore.admin.v1beta1.ListIndexesResponse")
proto.RegisterEnum("google.firestore.admin.v1beta1.IndexOperationMetadata_OperationType", IndexOperationMetadata_OperationType_name, IndexOperationMetadata_OperationType_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for FirestoreAdmin service
type FirestoreAdminClient interface {
// Creates the specified index.
// A newly created index's initial state is `CREATING`. On completion of the
// returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
// If the index already exists, the call will return an `ALREADY_EXISTS`
// status.
//
// During creation, the process could result in an error, in which case the
// index will move to the `ERROR` state. The process can be recovered by
// fixing the data that caused the error, removing the index with
// [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with
// [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
//
// Indexes with a single field cannot be created.
CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
// Lists the indexes that match the specified filters.
ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error)
// Gets an index.
GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error)
// Deletes an index.
DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
}
type firestoreAdminClient struct {
cc *grpc.ClientConn
}
func NewFirestoreAdminClient(cc *grpc.ClientConn) FirestoreAdminClient {
return &firestoreAdminClient{cc}
}
func (c *firestoreAdminClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error) {
out := new(google_longrunning.Operation)
err := grpc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/CreateIndex", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *firestoreAdminClient) ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) {
out := new(ListIndexesResponse)
err := grpc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/ListIndexes", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *firestoreAdminClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) {
out := new(Index)
err := grpc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/GetIndex", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *firestoreAdminClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
out := new(google_protobuf2.Empty)
err := grpc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/DeleteIndex", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for FirestoreAdmin service
type FirestoreAdminServer interface {
// Creates the specified index.
// A newly created index's initial state is `CREATING`. On completion of the
// returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
// If the index already exists, the call will return an `ALREADY_EXISTS`
// status.
//
// During creation, the process could result in an error, in which case the
// index will move to the `ERROR` state. The process can be recovered by
// fixing the data that caused the error, removing the index with
// [delete][google.firestore.admin.v1beta1.FirestoreAdmin.DeleteIndex], then re-creating the index with
// [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
//
// Indexes with a single field cannot be created.
CreateIndex(context.Context, *CreateIndexRequest) (*google_longrunning.Operation, error)
// Lists the indexes that match the specified filters.
ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error)
// Gets an index.
GetIndex(context.Context, *GetIndexRequest) (*Index, error)
// Deletes an index.
DeleteIndex(context.Context, *DeleteIndexRequest) (*google_protobuf2.Empty, error)
}
func RegisterFirestoreAdminServer(s *grpc.Server, srv FirestoreAdminServer) {
s.RegisterService(&_FirestoreAdmin_serviceDesc, srv)
}
func _FirestoreAdmin_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FirestoreAdminServer).CreateIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.firestore.admin.v1beta1.FirestoreAdmin/CreateIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FirestoreAdminServer).CreateIndex(ctx, req.(*CreateIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FirestoreAdmin_ListIndexes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListIndexesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FirestoreAdminServer).ListIndexes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.firestore.admin.v1beta1.FirestoreAdmin/ListIndexes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FirestoreAdminServer).ListIndexes(ctx, req.(*ListIndexesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FirestoreAdmin_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FirestoreAdminServer).GetIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.firestore.admin.v1beta1.FirestoreAdmin/GetIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FirestoreAdminServer).GetIndex(ctx, req.(*GetIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FirestoreAdmin_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteIndexRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FirestoreAdminServer).DeleteIndex(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.firestore.admin.v1beta1.FirestoreAdmin/DeleteIndex",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FirestoreAdminServer).DeleteIndex(ctx, req.(*DeleteIndexRequest))
}
return interceptor(ctx, in, info, handler)
}
var _FirestoreAdmin_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.firestore.admin.v1beta1.FirestoreAdmin",
HandlerType: (*FirestoreAdminServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateIndex",
Handler: _FirestoreAdmin_CreateIndex_Handler,
},
{
MethodName: "ListIndexes",
Handler: _FirestoreAdmin_ListIndexes_Handler,
},
{
MethodName: "GetIndex",
Handler: _FirestoreAdmin_GetIndex_Handler,
},
{
MethodName: "DeleteIndex",
Handler: _FirestoreAdmin_DeleteIndex_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/firestore/admin/v1beta1/firestore_admin.proto",
}
func init() {
proto.RegisterFile("google/firestore/admin/v1beta1/firestore_admin.proto", fileDescriptor0)
}
var fileDescriptor0 = []byte{
// 841 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xc6, 0xe9, 0xcf, 0x26, 0xa7, 0x6a, 0xb6, 0xcc, 0xa2, 0x2a, 0xf2, 0xfe, 0x10, 0x19, 0x8a,
0xa2, 0x5c, 0xd8, 0x34, 0x0b, 0x12, 0xcb, 0x0a, 0xad, 0x5a, 0xd7, 0xad, 0x22, 0x41, 0x1b, 0xb9,
0x59, 0xb4, 0x70, 0x63, 0x4d, 0xe3, 0x53, 0xcb, 0xd4, 0x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 0xac, 0xa2, 0xdf, 0x1b, 0xcb, 0x07, 0xee,
0xfe, 0xf1, 0x1f, 0x8d, 0x0f, 0x0f, 0x4a, 0x31, 0x37, 0xe1, 0xd3, 0xd0, 0x9e, 0x15, 0xb4, 0x55,
0x45, 0xfb, 0xeb, 0xed, 0xdd, 0x82, 0x73, 0xb2, 0xaa, 0xd4, 0x1f, 0xfe, 0x17, 0x00, 0x00, 0xff,
0xff, 0x6b, 0x78, 0x44, 0x07, 0x3e, 0x08, 0x00, 0x00,
}

View File

@ -0,0 +1,205 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/admin/v1beta1/index.proto
package admin
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// The mode determines how a field is indexed.
type IndexField_Mode int32
const (
// The mode is unspecified.
IndexField_MODE_UNSPECIFIED IndexField_Mode = 0
// The field's values are indexed so as to support sequencing in
// ascending order and also query by <, >, <=, >=, and =.
IndexField_ASCENDING IndexField_Mode = 2
// The field's values are indexed so as to support sequencing in
// descending order and also query by <, >, <=, >=, and =.
IndexField_DESCENDING IndexField_Mode = 3
)
var IndexField_Mode_name = map[int32]string{
0: "MODE_UNSPECIFIED",
2: "ASCENDING",
3: "DESCENDING",
}
var IndexField_Mode_value = map[string]int32{
"MODE_UNSPECIFIED": 0,
"ASCENDING": 2,
"DESCENDING": 3,
}
func (x IndexField_Mode) String() string {
return proto.EnumName(IndexField_Mode_name, int32(x))
}
func (IndexField_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} }
// The state of an index. During index creation, an index will be in the
// `CREATING` state. If the index is created successfully, it will transition
// to the `READY` state. If the index is not able to be created, it will
// transition to the `ERROR` state.
type Index_State int32
const (
// The state is unspecified.
Index_STATE_UNSPECIFIED Index_State = 0
// The index is being created.
// There is an active long-running operation for the index.
// The index is updated when writing a document.
// Some index data may exist.
Index_CREATING Index_State = 3
// The index is ready to be used.
// The index is updated when writing a document.
// The index is fully populated from all stored documents it applies to.
Index_READY Index_State = 2
// The index was being created, but something went wrong.
// There is no active long-running operation for the index,
// and the most recently finished long-running operation failed.
// The index is not updated when writing a document.
// Some index data may exist.
Index_ERROR Index_State = 5
)
var Index_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
3: "CREATING",
2: "READY",
5: "ERROR",
}
var Index_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATING": 3,
"READY": 2,
"ERROR": 5,
}
func (x Index_State) String() string {
return proto.EnumName(Index_State_name, int32(x))
}
func (Index_State) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{1, 0} }
// A field of an index.
type IndexField struct {
// The path of the field. Must match the field path specification described
// by [google.firestore.v1beta1.Document.fields][fields].
// Special field path `__name__` may be used by itself or at the end of a
// path. `__type__` may be used only at the end of path.
FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"`
// The field's mode.
Mode IndexField_Mode `protobuf:"varint,2,opt,name=mode,enum=google.firestore.admin.v1beta1.IndexField_Mode" json:"mode,omitempty"`
}
func (m *IndexField) Reset() { *m = IndexField{} }
func (m *IndexField) String() string { return proto.CompactTextString(m) }
func (*IndexField) ProtoMessage() {}
func (*IndexField) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *IndexField) GetFieldPath() string {
if m != nil {
return m.FieldPath
}
return ""
}
func (m *IndexField) GetMode() IndexField_Mode {
if m != nil {
return m.Mode
}
return IndexField_MODE_UNSPECIFIED
}
// An index definition.
type Index struct {
// The resource name of the index.
// Output only.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The collection ID to which this index applies. Required.
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId" json:"collection_id,omitempty"`
// The fields to index.
Fields []*IndexField `protobuf:"bytes,3,rep,name=fields" json:"fields,omitempty"`
// The state of the index.
// Output only.
State Index_State `protobuf:"varint,6,opt,name=state,enum=google.firestore.admin.v1beta1.Index_State" json:"state,omitempty"`
}
func (m *Index) Reset() { *m = Index{} }
func (m *Index) String() string { return proto.CompactTextString(m) }
func (*Index) ProtoMessage() {}
func (*Index) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *Index) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Index) GetCollectionId() string {
if m != nil {
return m.CollectionId
}
return ""
}
func (m *Index) GetFields() []*IndexField {
if m != nil {
return m.Fields
}
return nil
}
func (m *Index) GetState() Index_State {
if m != nil {
return m.State
}
return Index_STATE_UNSPECIFIED
}
func init() {
proto.RegisterType((*IndexField)(nil), "google.firestore.admin.v1beta1.IndexField")
proto.RegisterType((*Index)(nil), "google.firestore.admin.v1beta1.Index")
proto.RegisterEnum("google.firestore.admin.v1beta1.IndexField_Mode", IndexField_Mode_name, IndexField_Mode_value)
proto.RegisterEnum("google.firestore.admin.v1beta1.Index_State", Index_State_name, Index_State_value)
}
func init() { proto.RegisterFile("google/firestore/admin/v1beta1/index.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 422 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x8b, 0x13, 0x31,
0x1c, 0x75, 0xa6, 0x9d, 0xe2, 0xfc, 0xdc, 0x5d, 0xc6, 0xa0, 0x50, 0x44, 0xa5, 0x8c, 0x1e, 0xca,
0x0a, 0x19, 0xba, 0x1e, 0xf7, 0x34, 0xff, 0x5a, 0xe6, 0xb0, 0xdd, 0x92, 0xa9, 0x82, 0x5e, 0x4a,
0xb6, 0xc9, 0xce, 0x06, 0xa6, 0x49, 0x99, 0x89, 0xe2, 0x77, 0xf0, 0x5b, 0x08, 0x5e, 0x04, 0xbf,
0xa3, 0x24, 0x33, 0x74, 0x41, 0xd0, 0xed, 0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x46, 0x30,
0x1b, 0xd4, 0x27, 0x27, 0xf7, 0x8b, 0x05, 0x43, 0x09, 0x8c, 0x6c, 0xa3, 0x76, 0x3c, 0x98, 0x0c,
0xa6, 0x4f, 0x2e, 0xce, 0x8f, 0xaf, 0x41, 0x7a, 0x25, 0x8a, 0xc1, 0x6b, 0x35, 0xd5, 0x7c, 0x3c,
0xb2, 0x37, 0xf1, 0xee, 0x28, 0x0b, 0x5c, 0x1a, 0x09, 0xe9, 0x94, 0x61, 0x02, 0x9e, 0xc5, 0xe8,
0x39, 0x3c, 0x2d, 0xd7, 0xf1, 0xfa, 0xef, 0x8b, 0x38, 0x81, 0xc7, 0x29, 0xc9, 0xe3, 0xb5, 0xed,
0x8d, 0x7c, 0xf0, 0x48, 0x1e, 0x67, 0x9f, 0x02, 0xd7, 0x8c, 0x39, 0x21, 0xd7, 0x24, 0xf0, 0x92,
0x9f, 0x0e, 0x84, 0x5b, 0xb5, 0x7b, 0xe0, 0xf4, 0xa4, 0x7b, 0xe1, 0x95, 0x79, 0xf0, 0x95, 0xf3,
0x39, 0xed, 0xd9, 0x95, 0xaa, 0xa9, 0xac, 0xb0, 0x6a, 0xaa, 0xa8, 0xe2, 0xd2, 0x7e, 0x87, 0xa8,
0xdb, 0xa2, 0x7b, 0xd1, 0xfe, 0xeb, 0xef, 0x5d, 0x5a, 0xf4, 0xc3, 0x1d, 0x2e, 0xd2, 0x79, 0xf9,
0xcb, 0x7d, 0xbb, 0xe8, 0xcc, 0xd2, 0x5a, 0x7d, 0x61, 0x78, 0x7e, 0x08, 0x10, 0xdb, 0x00, 0x1f,
0x67, 0x89, 0xd1, 0xdc, 0x8c, 0xac, 0xfb, 0xfb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xcb,
0x38, 0x95, 0xd8, 0x02, 0x00, 0x00,
}

View File

@ -0,0 +1,498 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/common.proto
/*
Package firestore is a generated protocol buffer package.
It is generated from these files:
google/firestore/v1beta1/common.proto
google/firestore/v1beta1/document.proto
google/firestore/v1beta1/firestore.proto
google/firestore/v1beta1/query.proto
google/firestore/v1beta1/write.proto
It has these top-level messages:
DocumentMask
Precondition
TransactionOptions
Document
Value
ArrayValue
MapValue
GetDocumentRequest
ListDocumentsRequest
ListDocumentsResponse
CreateDocumentRequest
UpdateDocumentRequest
DeleteDocumentRequest
BatchGetDocumentsRequest
BatchGetDocumentsResponse
BeginTransactionRequest
BeginTransactionResponse
CommitRequest
CommitResponse
RollbackRequest
RunQueryRequest
RunQueryResponse
WriteRequest
WriteResponse
ListenRequest
ListenResponse
Target
TargetChange
ListCollectionIdsRequest
ListCollectionIdsResponse
StructuredQuery
Cursor
Write
DocumentTransform
WriteResult
DocumentChange
DocumentDelete
DocumentRemove
ExistenceFilter
*/
package firestore
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// A set of field paths on a document.
// Used to restrict a get or update operation on a document to a subset of its
// fields.
// This is different from standard field masks, as this is always scoped to a
// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
type DocumentMask struct {
// The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
// path syntax reference.
FieldPaths []string `protobuf:"bytes,1,rep,name=field_paths,json=fieldPaths" json:"field_paths,omitempty"`
}
func (m *DocumentMask) Reset() { *m = DocumentMask{} }
func (m *DocumentMask) String() string { return proto.CompactTextString(m) }
func (*DocumentMask) ProtoMessage() {}
func (*DocumentMask) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *DocumentMask) GetFieldPaths() []string {
if m != nil {
return m.FieldPaths
}
return nil
}
// A precondition on a document, used for conditional operations.
type Precondition struct {
// The type of precondition.
//
// Types that are valid to be assigned to ConditionType:
// *Precondition_Exists
// *Precondition_UpdateTime
ConditionType isPrecondition_ConditionType `protobuf_oneof:"condition_type"`
}
func (m *Precondition) Reset() { *m = Precondition{} }
func (m *Precondition) String() string { return proto.CompactTextString(m) }
func (*Precondition) ProtoMessage() {}
func (*Precondition) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
type isPrecondition_ConditionType interface {
isPrecondition_ConditionType()
}
type Precondition_Exists struct {
Exists bool `protobuf:"varint,1,opt,name=exists,oneof"`
}
type Precondition_UpdateTime struct {
UpdateTime *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,oneof"`
}
func (*Precondition_Exists) isPrecondition_ConditionType() {}
func (*Precondition_UpdateTime) isPrecondition_ConditionType() {}
func (m *Precondition) GetConditionType() isPrecondition_ConditionType {
if m != nil {
return m.ConditionType
}
return nil
}
func (m *Precondition) GetExists() bool {
if x, ok := m.GetConditionType().(*Precondition_Exists); ok {
return x.Exists
}
return false
}
func (m *Precondition) GetUpdateTime() *google_protobuf1.Timestamp {
if x, ok := m.GetConditionType().(*Precondition_UpdateTime); ok {
return x.UpdateTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Precondition) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Precondition_OneofMarshaler, _Precondition_OneofUnmarshaler, _Precondition_OneofSizer, []interface{}{
(*Precondition_Exists)(nil),
(*Precondition_UpdateTime)(nil),
}
}
func _Precondition_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Precondition)
// condition_type
switch x := m.ConditionType.(type) {
case *Precondition_Exists:
t := uint64(0)
if x.Exists {
t = 1
}
b.EncodeVarint(1<<3 | proto.WireVarint)
b.EncodeVarint(t)
case *Precondition_UpdateTime:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.UpdateTime); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Precondition.ConditionType has unexpected type %T", x)
}
return nil
}
func _Precondition_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Precondition)
switch tag {
case 1: // condition_type.exists
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ConditionType = &Precondition_Exists{x != 0}
return true, err
case 2: // condition_type.update_time
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
err := b.DecodeMessage(msg)
m.ConditionType = &Precondition_UpdateTime{msg}
return true, err
default:
return false, nil
}
}
func _Precondition_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Precondition)
// condition_type
switch x := m.ConditionType.(type) {
case *Precondition_Exists:
n += proto.SizeVarint(1<<3 | proto.WireVarint)
n += 1
case *Precondition_UpdateTime:
s := proto.Size(x.UpdateTime)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Options for creating a new transaction.
type TransactionOptions struct {
// The mode of the transaction.
//
// Types that are valid to be assigned to Mode:
// *TransactionOptions_ReadOnly_
// *TransactionOptions_ReadWrite_
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
}
func (m *TransactionOptions) Reset() { *m = TransactionOptions{} }
func (m *TransactionOptions) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions) ProtoMessage() {}
func (*TransactionOptions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
type isTransactionOptions_Mode interface {
isTransactionOptions_Mode()
}
type TransactionOptions_ReadOnly_ struct {
ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,oneof"`
}
type TransactionOptions_ReadWrite_ struct {
ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,3,opt,name=read_write,json=readWrite,oneof"`
}
func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {}
func (m *TransactionOptions) GetMode() isTransactionOptions_Mode {
if m != nil {
return m.Mode
}
return nil
}
func (m *TransactionOptions) GetReadOnly() *TransactionOptions_ReadOnly {
if x, ok := m.GetMode().(*TransactionOptions_ReadOnly_); ok {
return x.ReadOnly
}
return nil
}
func (m *TransactionOptions) GetReadWrite() *TransactionOptions_ReadWrite {
if x, ok := m.GetMode().(*TransactionOptions_ReadWrite_); ok {
return x.ReadWrite
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TransactionOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TransactionOptions_OneofMarshaler, _TransactionOptions_OneofUnmarshaler, _TransactionOptions_OneofSizer, []interface{}{
(*TransactionOptions_ReadOnly_)(nil),
(*TransactionOptions_ReadWrite_)(nil),
}
}
func _TransactionOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TransactionOptions)
// mode
switch x := m.Mode.(type) {
case *TransactionOptions_ReadOnly_:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadOnly); err != nil {
return err
}
case *TransactionOptions_ReadWrite_:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadWrite); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TransactionOptions.Mode has unexpected type %T", x)
}
return nil
}
func _TransactionOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TransactionOptions)
switch tag {
case 2: // mode.read_only
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions_ReadOnly)
err := b.DecodeMessage(msg)
m.Mode = &TransactionOptions_ReadOnly_{msg}
return true, err
case 3: // mode.read_write
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TransactionOptions_ReadWrite)
err := b.DecodeMessage(msg)
m.Mode = &TransactionOptions_ReadWrite_{msg}
return true, err
default:
return false, nil
}
}
func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TransactionOptions)
// mode
switch x := m.Mode.(type) {
case *TransactionOptions_ReadOnly_:
s := proto.Size(x.ReadOnly)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadWrite_:
s := proto.Size(x.ReadWrite)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Options for a transaction that can be used to read and write documents.
type TransactionOptions_ReadWrite struct {
// An optional transaction to retry.
RetryTransaction []byte `protobuf:"bytes,1,opt,name=retry_transaction,json=retryTransaction,proto3" json:"retry_transaction,omitempty"`
}
func (m *TransactionOptions_ReadWrite) Reset() { *m = TransactionOptions_ReadWrite{} }
func (m *TransactionOptions_ReadWrite) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions_ReadWrite) ProtoMessage() {}
func (*TransactionOptions_ReadWrite) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
func (m *TransactionOptions_ReadWrite) GetRetryTransaction() []byte {
if m != nil {
return m.RetryTransaction
}
return nil
}
// Options for a transaction that can only be used to read documents.
type TransactionOptions_ReadOnly struct {
// The consistency mode for this transaction. If not set, defaults to strong
// consistency.
//
// Types that are valid to be assigned to ConsistencySelector:
// *TransactionOptions_ReadOnly_ReadTime
ConsistencySelector isTransactionOptions_ReadOnly_ConsistencySelector `protobuf_oneof:"consistency_selector"`
}
func (m *TransactionOptions_ReadOnly) Reset() { *m = TransactionOptions_ReadOnly{} }
func (m *TransactionOptions_ReadOnly) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions_ReadOnly) ProtoMessage() {}
func (*TransactionOptions_ReadOnly) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} }
type isTransactionOptions_ReadOnly_ConsistencySelector interface {
isTransactionOptions_ReadOnly_ConsistencySelector()
}
type TransactionOptions_ReadOnly_ReadTime struct {
ReadTime *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,oneof"`
}
func (*TransactionOptions_ReadOnly_ReadTime) isTransactionOptions_ReadOnly_ConsistencySelector() {}
func (m *TransactionOptions_ReadOnly) GetConsistencySelector() isTransactionOptions_ReadOnly_ConsistencySelector {
if m != nil {
return m.ConsistencySelector
}
return nil
}
func (m *TransactionOptions_ReadOnly) GetReadTime() *google_protobuf1.Timestamp {
if x, ok := m.GetConsistencySelector().(*TransactionOptions_ReadOnly_ReadTime); ok {
return x.ReadTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*TransactionOptions_ReadOnly) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _TransactionOptions_ReadOnly_OneofMarshaler, _TransactionOptions_ReadOnly_OneofUnmarshaler, _TransactionOptions_ReadOnly_OneofSizer, []interface{}{
(*TransactionOptions_ReadOnly_ReadTime)(nil),
}
}
func _TransactionOptions_ReadOnly_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*TransactionOptions_ReadOnly)
// consistency_selector
switch x := m.ConsistencySelector.(type) {
case *TransactionOptions_ReadOnly_ReadTime:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ReadTime); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("TransactionOptions_ReadOnly.ConsistencySelector has unexpected type %T", x)
}
return nil
}
func _TransactionOptions_ReadOnly_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*TransactionOptions_ReadOnly)
switch tag {
case 2: // consistency_selector.read_time
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
err := b.DecodeMessage(msg)
m.ConsistencySelector = &TransactionOptions_ReadOnly_ReadTime{msg}
return true, err
default:
return false, nil
}
}
func _TransactionOptions_ReadOnly_OneofSizer(msg proto.Message) (n int) {
m := msg.(*TransactionOptions_ReadOnly)
// consistency_selector
switch x := m.ConsistencySelector.(type) {
case *TransactionOptions_ReadOnly_ReadTime:
s := proto.Size(x.ReadTime)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*DocumentMask)(nil), "google.firestore.v1beta1.DocumentMask")
proto.RegisterType((*Precondition)(nil), "google.firestore.v1beta1.Precondition")
proto.RegisterType((*TransactionOptions)(nil), "google.firestore.v1beta1.TransactionOptions")
proto.RegisterType((*TransactionOptions_ReadWrite)(nil), "google.firestore.v1beta1.TransactionOptions.ReadWrite")
proto.RegisterType((*TransactionOptions_ReadOnly)(nil), "google.firestore.v1beta1.TransactionOptions.ReadOnly")
}
func init() { proto.RegisterFile("google/firestore/v1beta1/common.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 468 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xef, 0x8a, 0xd3, 0x40,
0x10, 0x6f, 0x7a, 0xc7, 0xd1, 0x4e, 0x8b, 0x9c, 0x41, 0x24, 0x84, 0xc3, 0x3b, 0x0a, 0x42, 0x41,
0xd8, 0x50, 0x45, 0x51, 0xc4, 0x0f, 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xdf, 0xfc, 0xe1, 0x2f, 0xbb, 0xce, 0xb7, 0xfe,
0xe1, 0xc5, 0xfc, 0xfc, 0xdd, 0xf7, 0xfe, 0x83, 0x8b, 0x86, 0x6a, 0x9e, 0xd3, 0x2e, 0x65, 0xe7,
0x9d, 0xf2, 0xd5, 0x2c, 0xac, 0x37, 0x7e, 0xee, 0x01, 0x6b, 0x0b, 0x58, 0x77, 0x80, 0xf5, 0x55,
0x43, 0xb9, 0x39, 0xb2, 0xb2, 0x4f, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, 0x06, 0xe4, 0x5b,
0x57, 0x03, 0x00, 0x00,
}

View File

@ -0,0 +1,566 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/document.proto
package firestore
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf2 "github.com/golang/protobuf/ptypes/struct"
import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
import google_type "google.golang.org/genproto/googleapis/type/latlng"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A Firestore document.
//
// Must not exceed 1 MiB - 4 bytes.
type Document struct {
// The resource name of the document, for example
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The document's fields.
//
// The map keys represent field names.
//
// A simple field name contains only characters `a` to `z`, `A` to `Z`,
// `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
// `foo_bar_17`.
//
// Field names matching the regular expression `__.*__` are reserved. Reserved
// field names are forbidden except in certain documented contexts. The map
// keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
// empty.
//
// Field paths may be used in other contexts to refer to structured fields
// defined here. For `map_value`, the field path is represented by the simple
// or quoted field names of the containing fields, delimited by `.`. For
// example, the structured field
// `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
// represented by the field path `foo.x&y`.
//
// Within a field path, a quoted field name starts and ends with `` ` `` and
// may contain any character. Some characters, including `` ` ``, must be
// escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
// `` `bak\`tik` `` represents `` bak`tik ``.
Fields map[string]*Value `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Output only. The time at which the document was created.
//
// This value increases monotonically when a document is deleted then
// recreated. It can also be compared to values from other documents and
// the `read_time` of a query.
CreateTime *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
// Output only. The time at which the document was last changed.
//
// This value is initally set to the `create_time` then increases
// monotonically with each change to the document. It can also be
// compared to values from other documents and the `read_time` of a query.
UpdateTime *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime" json:"update_time,omitempty"`
}
func (m *Document) Reset() { *m = Document{} }
func (m *Document) String() string { return proto.CompactTextString(m) }
func (*Document) ProtoMessage() {}
func (*Document) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *Document) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Document) GetFields() map[string]*Value {
if m != nil {
return m.Fields
}
return nil
}
func (m *Document) GetCreateTime() *google_protobuf1.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Document) GetUpdateTime() *google_protobuf1.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
// A message that can hold any of the supported value types.
type Value struct {
// Must have a value set.
//
// Types that are valid to be assigned to ValueType:
// *Value_NullValue
// *Value_BooleanValue
// *Value_IntegerValue
// *Value_DoubleValue
// *Value_TimestampValue
// *Value_StringValue
// *Value_BytesValue
// *Value_ReferenceValue
// *Value_GeoPointValue
// *Value_ArrayValue
// *Value_MapValue
ValueType isValue_ValueType `protobuf_oneof:"value_type"`
}
func (m *Value) Reset() { *m = Value{} }
func (m *Value) String() string { return proto.CompactTextString(m) }
func (*Value) ProtoMessage() {}
func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
type isValue_ValueType interface {
isValue_ValueType()
}
type Value_NullValue struct {
NullValue google_protobuf2.NullValue `protobuf:"varint,11,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
}
type Value_BooleanValue struct {
BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,oneof"`
}
type Value_IntegerValue struct {
IntegerValue int64 `protobuf:"varint,2,opt,name=integer_value,json=integerValue,oneof"`
}
type Value_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,oneof"`
}
type Value_TimestampValue struct {
TimestampValue *google_protobuf1.Timestamp `protobuf:"bytes,10,opt,name=timestamp_value,json=timestampValue,oneof"`
}
type Value_StringValue struct {
StringValue string `protobuf:"bytes,17,opt,name=string_value,json=stringValue,oneof"`
}
type Value_BytesValue struct {
BytesValue []byte `protobuf:"bytes,18,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}
type Value_ReferenceValue struct {
ReferenceValue string `protobuf:"bytes,5,opt,name=reference_value,json=referenceValue,oneof"`
}
type Value_GeoPointValue struct {
GeoPointValue *google_type.LatLng `protobuf:"bytes,8,opt,name=geo_point_value,json=geoPointValue,oneof"`
}
type Value_ArrayValue struct {
ArrayValue *ArrayValue `protobuf:"bytes,9,opt,name=array_value,json=arrayValue,oneof"`
}
type Value_MapValue struct {
MapValue *MapValue `protobuf:"bytes,6,opt,name=map_value,json=mapValue,oneof"`
}
func (*Value_NullValue) isValue_ValueType() {}
func (*Value_BooleanValue) isValue_ValueType() {}
func (*Value_IntegerValue) isValue_ValueType() {}
func (*Value_DoubleValue) isValue_ValueType() {}
func (*Value_TimestampValue) isValue_ValueType() {}
func (*Value_StringValue) isValue_ValueType() {}
func (*Value_BytesValue) isValue_ValueType() {}
func (*Value_ReferenceValue) isValue_ValueType() {}
func (*Value_GeoPointValue) isValue_ValueType() {}
func (*Value_ArrayValue) isValue_ValueType() {}
func (*Value_MapValue) isValue_ValueType() {}
func (m *Value) GetValueType() isValue_ValueType {
if m != nil {
return m.ValueType
}
return nil
}
func (m *Value) GetNullValue() google_protobuf2.NullValue {
if x, ok := m.GetValueType().(*Value_NullValue); ok {
return x.NullValue
}
return google_protobuf2.NullValue_NULL_VALUE
}
func (m *Value) GetBooleanValue() bool {
if x, ok := m.GetValueType().(*Value_BooleanValue); ok {
return x.BooleanValue
}
return false
}
func (m *Value) GetIntegerValue() int64 {
if x, ok := m.GetValueType().(*Value_IntegerValue); ok {
return x.IntegerValue
}
return 0
}
func (m *Value) GetDoubleValue() float64 {
if x, ok := m.GetValueType().(*Value_DoubleValue); ok {
return x.DoubleValue
}
return 0
}
func (m *Value) GetTimestampValue() *google_protobuf1.Timestamp {
if x, ok := m.GetValueType().(*Value_TimestampValue); ok {
return x.TimestampValue
}
return nil
}
func (m *Value) GetStringValue() string {
if x, ok := m.GetValueType().(*Value_StringValue); ok {
return x.StringValue
}
return ""
}
func (m *Value) GetBytesValue() []byte {
if x, ok := m.GetValueType().(*Value_BytesValue); ok {
return x.BytesValue
}
return nil
}
func (m *Value) GetReferenceValue() string {
if x, ok := m.GetValueType().(*Value_ReferenceValue); ok {
return x.ReferenceValue
}
return ""
}
func (m *Value) GetGeoPointValue() *google_type.LatLng {
if x, ok := m.GetValueType().(*Value_GeoPointValue); ok {
return x.GeoPointValue
}
return nil
}
func (m *Value) GetArrayValue() *ArrayValue {
if x, ok := m.GetValueType().(*Value_ArrayValue); ok {
return x.ArrayValue
}
return nil
}
func (m *Value) GetMapValue() *MapValue {
if x, ok := m.GetValueType().(*Value_MapValue); ok {
return x.MapValue
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
(*Value_NullValue)(nil),
(*Value_BooleanValue)(nil),
(*Value_IntegerValue)(nil),
(*Value_DoubleValue)(nil),
(*Value_TimestampValue)(nil),
(*Value_StringValue)(nil),
(*Value_BytesValue)(nil),
(*Value_ReferenceValue)(nil),
(*Value_GeoPointValue)(nil),
(*Value_ArrayValue)(nil),
(*Value_MapValue)(nil),
}
}
func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Value)
// value_type
switch x := m.ValueType.(type) {
case *Value_NullValue:
b.EncodeVarint(11<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.NullValue))
case *Value_BooleanValue:
t := uint64(0)
if x.BooleanValue {
t = 1
}
b.EncodeVarint(1<<3 | proto.WireVarint)
b.EncodeVarint(t)
case *Value_IntegerValue:
b.EncodeVarint(2<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.IntegerValue))
case *Value_DoubleValue:
b.EncodeVarint(3<<3 | proto.WireFixed64)
b.EncodeFixed64(math.Float64bits(x.DoubleValue))
case *Value_TimestampValue:
b.EncodeVarint(10<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TimestampValue); err != nil {
return err
}
case *Value_StringValue:
b.EncodeVarint(17<<3 | proto.WireBytes)
b.EncodeStringBytes(x.StringValue)
case *Value_BytesValue:
b.EncodeVarint(18<<3 | proto.WireBytes)
b.EncodeRawBytes(x.BytesValue)
case *Value_ReferenceValue:
b.EncodeVarint(5<<3 | proto.WireBytes)
b.EncodeStringBytes(x.ReferenceValue)
case *Value_GeoPointValue:
b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GeoPointValue); err != nil {
return err
}
case *Value_ArrayValue:
b.EncodeVarint(9<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ArrayValue); err != nil {
return err
}
case *Value_MapValue:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MapValue); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Value.ValueType has unexpected type %T", x)
}
return nil
}
func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Value)
switch tag {
case 11: // value_type.null_value
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ValueType = &Value_NullValue{google_protobuf2.NullValue(x)}
return true, err
case 1: // value_type.boolean_value
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ValueType = &Value_BooleanValue{x != 0}
return true, err
case 2: // value_type.integer_value
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ValueType = &Value_IntegerValue{int64(x)}
return true, err
case 3: // value_type.double_value
if wire != proto.WireFixed64 {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeFixed64()
m.ValueType = &Value_DoubleValue{math.Float64frombits(x)}
return true, err
case 10: // value_type.timestamp_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
err := b.DecodeMessage(msg)
m.ValueType = &Value_TimestampValue{msg}
return true, err
case 17: // value_type.string_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.ValueType = &Value_StringValue{x}
return true, err
case 18: // value_type.bytes_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.ValueType = &Value_BytesValue{x}
return true, err
case 5: // value_type.reference_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.ValueType = &Value_ReferenceValue{x}
return true, err
case 8: // value_type.geo_point_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_type.LatLng)
err := b.DecodeMessage(msg)
m.ValueType = &Value_GeoPointValue{msg}
return true, err
case 9: // value_type.array_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ArrayValue)
err := b.DecodeMessage(msg)
m.ValueType = &Value_ArrayValue{msg}
return true, err
case 6: // value_type.map_value
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(MapValue)
err := b.DecodeMessage(msg)
m.ValueType = &Value_MapValue{msg}
return true, err
default:
return false, nil
}
}
func _Value_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Value)
// value_type
switch x := m.ValueType.(type) {
case *Value_NullValue:
n += proto.SizeVarint(11<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.NullValue))
case *Value_BooleanValue:
n += proto.SizeVarint(1<<3 | proto.WireVarint)
n += 1
case *Value_IntegerValue:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.IntegerValue))
case *Value_DoubleValue:
n += proto.SizeVarint(3<<3 | proto.WireFixed64)
n += 8
case *Value_TimestampValue:
s := proto.Size(x.TimestampValue)
n += proto.SizeVarint(10<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Value_StringValue:
n += proto.SizeVarint(17<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.StringValue)))
n += len(x.StringValue)
case *Value_BytesValue:
n += proto.SizeVarint(18<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.BytesValue)))
n += len(x.BytesValue)
case *Value_ReferenceValue:
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.ReferenceValue)))
n += len(x.ReferenceValue)
case *Value_GeoPointValue:
s := proto.Size(x.GeoPointValue)
n += proto.SizeVarint(8<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Value_ArrayValue:
s := proto.Size(x.ArrayValue)
n += proto.SizeVarint(9<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Value_MapValue:
s := proto.Size(x.MapValue)
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// An array value.
type ArrayValue struct {
// Values in the array.
Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}
func (m *ArrayValue) Reset() { *m = ArrayValue{} }
func (m *ArrayValue) String() string { return proto.CompactTextString(m) }
func (*ArrayValue) ProtoMessage() {}
func (*ArrayValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
func (m *ArrayValue) GetValues() []*Value {
if m != nil {
return m.Values
}
return nil
}
// A map value.
type MapValue struct {
// The map's fields.
//
// The map keys represent field names. Field names matching the regular
// expression `__.*__` are reserved. Reserved field names are forbidden except
// in certain documented contexts. The map keys, represented as UTF-8, must
// not exceed 1,500 bytes and cannot be empty.
Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *MapValue) Reset() { *m = MapValue{} }
func (m *MapValue) String() string { return proto.CompactTextString(m) }
func (*MapValue) ProtoMessage() {}
func (*MapValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (m *MapValue) GetFields() map[string]*Value {
if m != nil {
return m.Fields
}
return nil
}
func init() {
proto.RegisterType((*Document)(nil), "google.firestore.v1beta1.Document")
proto.RegisterType((*Value)(nil), "google.firestore.v1beta1.Value")
proto.RegisterType((*ArrayValue)(nil), "google.firestore.v1beta1.ArrayValue")
proto.RegisterType((*MapValue)(nil), "google.firestore.v1beta1.MapValue")
}
func init() { proto.RegisterFile("google/firestore/v1beta1/document.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 655 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0xcf, 0x6e, 0xd3, 0x4c,
0x14, 0xc5, 0xe3, 0x24, 0x8d, 0x92, 0xeb, 0xb4, 0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77,
0x75, 0x6c, 0xd0, 0x94, 0x11, 0x44, 0xd3, 0x90, 0xf1, 0x34, 0x4a, 0x31, 0x55, 0x07, 0x36, 0xd2,
0x2d, 0x54, 0x64, 0xe5, 0xdf, 0xbf, 0xe3, 0x23, 0x57, 0xf9, 0x56, 0x6f, 0x9e, 0x9d, 0x4c, 0x3e,
0x7f, 0xaf, 0x3f, 0x3e, 0xd3, 0x56, 0x27, 0x84, 0x55, 0x8b, 0x70, 0xe2, 0x66, 0x5f, 0x1e, 0x8c,
0xa5, 0xe2, 0xd6, 0x02, 0xd7, 0x0a, 0xb8, 0x76, 0xc0, 0xf5, 0xa5, 0xb6, 0x4c, 0x5a, 0x6a, 0xec,
0xab, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x27, 0x82, 0xde, 0x04, 0x06, 0x00, 0x00,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,783 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/query.proto
package firestore
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf3 "github.com/golang/protobuf/ptypes/wrappers"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A sort direction.
type StructuredQuery_Direction int32
const (
// Unspecified.
StructuredQuery_DIRECTION_UNSPECIFIED StructuredQuery_Direction = 0
// Ascending.
StructuredQuery_ASCENDING StructuredQuery_Direction = 1
// Descending.
StructuredQuery_DESCENDING StructuredQuery_Direction = 2
)
var StructuredQuery_Direction_name = map[int32]string{
0: "DIRECTION_UNSPECIFIED",
1: "ASCENDING",
2: "DESCENDING",
}
var StructuredQuery_Direction_value = map[string]int32{
"DIRECTION_UNSPECIFIED": 0,
"ASCENDING": 1,
"DESCENDING": 2,
}
func (x StructuredQuery_Direction) String() string {
return proto.EnumName(StructuredQuery_Direction_name, int32(x))
}
func (StructuredQuery_Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} }
// A composite filter operator.
type StructuredQuery_CompositeFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_CompositeFilter_OPERATOR_UNSPECIFIED StructuredQuery_CompositeFilter_Operator = 0
// The results are required to satisfy each of the combined filters.
StructuredQuery_CompositeFilter_AND StructuredQuery_CompositeFilter_Operator = 1
)
var StructuredQuery_CompositeFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "AND",
}
var StructuredQuery_CompositeFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"AND": 1,
}
func (x StructuredQuery_CompositeFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_CompositeFilter_Operator_name, int32(x))
}
func (StructuredQuery_CompositeFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 2, 0}
}
// A field filter operator.
type StructuredQuery_FieldFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_FieldFilter_OPERATOR_UNSPECIFIED StructuredQuery_FieldFilter_Operator = 0
// Less than. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_LESS_THAN StructuredQuery_FieldFilter_Operator = 1
// Less than or equal. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_LESS_THAN_OR_EQUAL StructuredQuery_FieldFilter_Operator = 2
// Greater than. Requires that the field come first in `order_by`.
StructuredQuery_FieldFilter_GREATER_THAN StructuredQuery_FieldFilter_Operator = 3
// Greater than or equal. Requires that the field come first in
// `order_by`.
StructuredQuery_FieldFilter_GREATER_THAN_OR_EQUAL StructuredQuery_FieldFilter_Operator = 4
// Equal.
StructuredQuery_FieldFilter_EQUAL StructuredQuery_FieldFilter_Operator = 5
)
var StructuredQuery_FieldFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
1: "LESS_THAN",
2: "LESS_THAN_OR_EQUAL",
3: "GREATER_THAN",
4: "GREATER_THAN_OR_EQUAL",
5: "EQUAL",
}
var StructuredQuery_FieldFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"LESS_THAN": 1,
"LESS_THAN_OR_EQUAL": 2,
"GREATER_THAN": 3,
"GREATER_THAN_OR_EQUAL": 4,
"EQUAL": 5,
}
func (x StructuredQuery_FieldFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_FieldFilter_Operator_name, int32(x))
}
func (StructuredQuery_FieldFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 3, 0}
}
// A unary operator.
type StructuredQuery_UnaryFilter_Operator int32
const (
// Unspecified. This value must not be used.
StructuredQuery_UnaryFilter_OPERATOR_UNSPECIFIED StructuredQuery_UnaryFilter_Operator = 0
// Test if a field is equal to NaN.
StructuredQuery_UnaryFilter_IS_NAN StructuredQuery_UnaryFilter_Operator = 2
// Test if an exprestion evaluates to Null.
StructuredQuery_UnaryFilter_IS_NULL StructuredQuery_UnaryFilter_Operator = 3
)
var StructuredQuery_UnaryFilter_Operator_name = map[int32]string{
0: "OPERATOR_UNSPECIFIED",
2: "IS_NAN",
3: "IS_NULL",
}
var StructuredQuery_UnaryFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"IS_NAN": 2,
"IS_NULL": 3,
}
func (x StructuredQuery_UnaryFilter_Operator) String() string {
return proto.EnumName(StructuredQuery_UnaryFilter_Operator_name, int32(x))
}
func (StructuredQuery_UnaryFilter_Operator) EnumDescriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 4, 0}
}
// A Firestore query.
type StructuredQuery struct {
// The projection to return.
Select *StructuredQuery_Projection `protobuf:"bytes,1,opt,name=select" json:"select,omitempty"`
// The collections to query.
From []*StructuredQuery_CollectionSelector `protobuf:"bytes,2,rep,name=from" json:"from,omitempty"`
// The filter to apply.
Where *StructuredQuery_Filter `protobuf:"bytes,3,opt,name=where" json:"where,omitempty"`
// The order to apply to the query results.
//
// Firestore guarantees a stable ordering through the following rules:
//
// * Any field required to appear in `order_by`, that is not already
// specified in `order_by`, is appended to the order in field name order
// by default.
// * If an order on `__name__` is not specified, it is appended by default.
//
// Fields are appended with the same sort direction as the last order
// specified, or 'ASCENDING' if no order was specified. For example:
//
// * `SELECT * FROM Foo ORDER BY A` becomes
// `SELECT * FROM Foo ORDER BY A, __name__`
// * `SELECT * FROM Foo ORDER BY A DESC` becomes
// `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
// * `SELECT * FROM Foo WHERE A > 1` becomes
// `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
OrderBy []*StructuredQuery_Order `protobuf:"bytes,4,rep,name=order_by,json=orderBy" json:"order_by,omitempty"`
// A starting point for the query results.
StartAt *Cursor `protobuf:"bytes,7,opt,name=start_at,json=startAt" json:"start_at,omitempty"`
// A end point for the query results.
EndAt *Cursor `protobuf:"bytes,8,opt,name=end_at,json=endAt" json:"end_at,omitempty"`
// The number of results to skip.
//
// Applies before limit, but after all other constraints. Must be >= 0 if
// specified.
Offset int32 `protobuf:"varint,6,opt,name=offset" json:"offset,omitempty"`
// The maximum number of results to return.
//
// Applies after all other constraints.
// Must be >= 0 if specified.
Limit *google_protobuf3.Int32Value `protobuf:"bytes,5,opt,name=limit" json:"limit,omitempty"`
}
func (m *StructuredQuery) Reset() { *m = StructuredQuery{} }
func (m *StructuredQuery) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery) ProtoMessage() {}
func (*StructuredQuery) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *StructuredQuery) GetSelect() *StructuredQuery_Projection {
if m != nil {
return m.Select
}
return nil
}
func (m *StructuredQuery) GetFrom() []*StructuredQuery_CollectionSelector {
if m != nil {
return m.From
}
return nil
}
func (m *StructuredQuery) GetWhere() *StructuredQuery_Filter {
if m != nil {
return m.Where
}
return nil
}
func (m *StructuredQuery) GetOrderBy() []*StructuredQuery_Order {
if m != nil {
return m.OrderBy
}
return nil
}
func (m *StructuredQuery) GetStartAt() *Cursor {
if m != nil {
return m.StartAt
}
return nil
}
func (m *StructuredQuery) GetEndAt() *Cursor {
if m != nil {
return m.EndAt
}
return nil
}
func (m *StructuredQuery) GetOffset() int32 {
if m != nil {
return m.Offset
}
return 0
}
func (m *StructuredQuery) GetLimit() *google_protobuf3.Int32Value {
if m != nil {
return m.Limit
}
return nil
}
// A selection of a collection, such as `messages as m1`.
type StructuredQuery_CollectionSelector struct {
// The collection ID.
// When set, selects only collections with this ID.
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId" json:"collection_id,omitempty"`
// When false, selects only collections that are immediate children of
// the `parent` specified in the containing `RunQueryRequest`.
// When true, selects all descendant collections.
AllDescendants bool `protobuf:"varint,3,opt,name=all_descendants,json=allDescendants" json:"all_descendants,omitempty"`
}
func (m *StructuredQuery_CollectionSelector) Reset() { *m = StructuredQuery_CollectionSelector{} }
func (m *StructuredQuery_CollectionSelector) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_CollectionSelector) ProtoMessage() {}
func (*StructuredQuery_CollectionSelector) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 0}
}
func (m *StructuredQuery_CollectionSelector) GetCollectionId() string {
if m != nil {
return m.CollectionId
}
return ""
}
func (m *StructuredQuery_CollectionSelector) GetAllDescendants() bool {
if m != nil {
return m.AllDescendants
}
return false
}
// A filter.
type StructuredQuery_Filter struct {
// The type of filter.
//
// Types that are valid to be assigned to FilterType:
// *StructuredQuery_Filter_CompositeFilter
// *StructuredQuery_Filter_FieldFilter
// *StructuredQuery_Filter_UnaryFilter
FilterType isStructuredQuery_Filter_FilterType `protobuf_oneof:"filter_type"`
}
func (m *StructuredQuery_Filter) Reset() { *m = StructuredQuery_Filter{} }
func (m *StructuredQuery_Filter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Filter) ProtoMessage() {}
func (*StructuredQuery_Filter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 1} }
type isStructuredQuery_Filter_FilterType interface {
isStructuredQuery_Filter_FilterType()
}
type StructuredQuery_Filter_CompositeFilter struct {
CompositeFilter *StructuredQuery_CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter,json=compositeFilter,oneof"`
}
type StructuredQuery_Filter_FieldFilter struct {
FieldFilter *StructuredQuery_FieldFilter `protobuf:"bytes,2,opt,name=field_filter,json=fieldFilter,oneof"`
}
type StructuredQuery_Filter_UnaryFilter struct {
UnaryFilter *StructuredQuery_UnaryFilter `protobuf:"bytes,3,opt,name=unary_filter,json=unaryFilter,oneof"`
}
func (*StructuredQuery_Filter_CompositeFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_FieldFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_UnaryFilter) isStructuredQuery_Filter_FilterType() {}
func (m *StructuredQuery_Filter) GetFilterType() isStructuredQuery_Filter_FilterType {
if m != nil {
return m.FilterType
}
return nil
}
func (m *StructuredQuery_Filter) GetCompositeFilter() *StructuredQuery_CompositeFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_CompositeFilter); ok {
return x.CompositeFilter
}
return nil
}
func (m *StructuredQuery_Filter) GetFieldFilter() *StructuredQuery_FieldFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_FieldFilter); ok {
return x.FieldFilter
}
return nil
}
func (m *StructuredQuery_Filter) GetUnaryFilter() *StructuredQuery_UnaryFilter {
if x, ok := m.GetFilterType().(*StructuredQuery_Filter_UnaryFilter); ok {
return x.UnaryFilter
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*StructuredQuery_Filter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _StructuredQuery_Filter_OneofMarshaler, _StructuredQuery_Filter_OneofUnmarshaler, _StructuredQuery_Filter_OneofSizer, []interface{}{
(*StructuredQuery_Filter_CompositeFilter)(nil),
(*StructuredQuery_Filter_FieldFilter)(nil),
(*StructuredQuery_Filter_UnaryFilter)(nil),
}
}
func _StructuredQuery_Filter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*StructuredQuery_Filter)
// filter_type
switch x := m.FilterType.(type) {
case *StructuredQuery_Filter_CompositeFilter:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CompositeFilter); err != nil {
return err
}
case *StructuredQuery_Filter_FieldFilter:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.FieldFilter); err != nil {
return err
}
case *StructuredQuery_Filter_UnaryFilter:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.UnaryFilter); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("StructuredQuery_Filter.FilterType has unexpected type %T", x)
}
return nil
}
func _StructuredQuery_Filter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*StructuredQuery_Filter)
switch tag {
case 1: // filter_type.composite_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_CompositeFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_CompositeFilter{msg}
return true, err
case 2: // filter_type.field_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_FieldFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_FieldFilter{msg}
return true, err
case 3: // filter_type.unary_filter
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_UnaryFilter)
err := b.DecodeMessage(msg)
m.FilterType = &StructuredQuery_Filter_UnaryFilter{msg}
return true, err
default:
return false, nil
}
}
func _StructuredQuery_Filter_OneofSizer(msg proto.Message) (n int) {
m := msg.(*StructuredQuery_Filter)
// filter_type
switch x := m.FilterType.(type) {
case *StructuredQuery_Filter_CompositeFilter:
s := proto.Size(x.CompositeFilter)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_FieldFilter:
s := proto.Size(x.FieldFilter)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_UnaryFilter:
s := proto.Size(x.UnaryFilter)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A filter that merges multiple other filters using the given operator.
type StructuredQuery_CompositeFilter struct {
// The operator for combining multiple filters.
Op StructuredQuery_CompositeFilter_Operator `protobuf:"varint,1,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_CompositeFilter_Operator" json:"op,omitempty"`
// The list of filters to combine.
// Must contain at least one filter.
Filters []*StructuredQuery_Filter `protobuf:"bytes,2,rep,name=filters" json:"filters,omitempty"`
}
func (m *StructuredQuery_CompositeFilter) Reset() { *m = StructuredQuery_CompositeFilter{} }
func (m *StructuredQuery_CompositeFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_CompositeFilter) ProtoMessage() {}
func (*StructuredQuery_CompositeFilter) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 2}
}
func (m *StructuredQuery_CompositeFilter) GetOp() StructuredQuery_CompositeFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_CompositeFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_CompositeFilter) GetFilters() []*StructuredQuery_Filter {
if m != nil {
return m.Filters
}
return nil
}
// A filter on a specific field.
type StructuredQuery_FieldFilter struct {
// The field to filter by.
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
// The operator to filter by.
Op StructuredQuery_FieldFilter_Operator `protobuf:"varint,2,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_FieldFilter_Operator" json:"op,omitempty"`
// The value to compare to.
Value *Value `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}
func (m *StructuredQuery_FieldFilter) Reset() { *m = StructuredQuery_FieldFilter{} }
func (m *StructuredQuery_FieldFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_FieldFilter) ProtoMessage() {}
func (*StructuredQuery_FieldFilter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 3} }
func (m *StructuredQuery_FieldFilter) GetField() *StructuredQuery_FieldReference {
if m != nil {
return m.Field
}
return nil
}
func (m *StructuredQuery_FieldFilter) GetOp() StructuredQuery_FieldFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_FieldFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_FieldFilter) GetValue() *Value {
if m != nil {
return m.Value
}
return nil
}
// A filter with a single operand.
type StructuredQuery_UnaryFilter struct {
// The unary operator to apply.
Op StructuredQuery_UnaryFilter_Operator `protobuf:"varint,1,opt,name=op,enum=google.firestore.v1beta1.StructuredQuery_UnaryFilter_Operator" json:"op,omitempty"`
// The argument to the filter.
//
// Types that are valid to be assigned to OperandType:
// *StructuredQuery_UnaryFilter_Field
OperandType isStructuredQuery_UnaryFilter_OperandType `protobuf_oneof:"operand_type"`
}
func (m *StructuredQuery_UnaryFilter) Reset() { *m = StructuredQuery_UnaryFilter{} }
func (m *StructuredQuery_UnaryFilter) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_UnaryFilter) ProtoMessage() {}
func (*StructuredQuery_UnaryFilter) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 4} }
type isStructuredQuery_UnaryFilter_OperandType interface {
isStructuredQuery_UnaryFilter_OperandType()
}
type StructuredQuery_UnaryFilter_Field struct {
Field *StructuredQuery_FieldReference `protobuf:"bytes,2,opt,name=field,oneof"`
}
func (*StructuredQuery_UnaryFilter_Field) isStructuredQuery_UnaryFilter_OperandType() {}
func (m *StructuredQuery_UnaryFilter) GetOperandType() isStructuredQuery_UnaryFilter_OperandType {
if m != nil {
return m.OperandType
}
return nil
}
func (m *StructuredQuery_UnaryFilter) GetOp() StructuredQuery_UnaryFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_UnaryFilter_OPERATOR_UNSPECIFIED
}
func (m *StructuredQuery_UnaryFilter) GetField() *StructuredQuery_FieldReference {
if x, ok := m.GetOperandType().(*StructuredQuery_UnaryFilter_Field); ok {
return x.Field
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*StructuredQuery_UnaryFilter) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _StructuredQuery_UnaryFilter_OneofMarshaler, _StructuredQuery_UnaryFilter_OneofUnmarshaler, _StructuredQuery_UnaryFilter_OneofSizer, []interface{}{
(*StructuredQuery_UnaryFilter_Field)(nil),
}
}
func _StructuredQuery_UnaryFilter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*StructuredQuery_UnaryFilter)
// operand_type
switch x := m.OperandType.(type) {
case *StructuredQuery_UnaryFilter_Field:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Field); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("StructuredQuery_UnaryFilter.OperandType has unexpected type %T", x)
}
return nil
}
func _StructuredQuery_UnaryFilter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*StructuredQuery_UnaryFilter)
switch tag {
case 2: // operand_type.field
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(StructuredQuery_FieldReference)
err := b.DecodeMessage(msg)
m.OperandType = &StructuredQuery_UnaryFilter_Field{msg}
return true, err
default:
return false, nil
}
}
func _StructuredQuery_UnaryFilter_OneofSizer(msg proto.Message) (n int) {
m := msg.(*StructuredQuery_UnaryFilter)
// operand_type
switch x := m.OperandType.(type) {
case *StructuredQuery_UnaryFilter_Field:
s := proto.Size(x.Field)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// An order on a field.
type StructuredQuery_Order struct {
// The field to order by.
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
// The direction to order by. Defaults to `ASCENDING`.
Direction StructuredQuery_Direction `protobuf:"varint,2,opt,name=direction,enum=google.firestore.v1beta1.StructuredQuery_Direction" json:"direction,omitempty"`
}
func (m *StructuredQuery_Order) Reset() { *m = StructuredQuery_Order{} }
func (m *StructuredQuery_Order) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Order) ProtoMessage() {}
func (*StructuredQuery_Order) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 5} }
func (m *StructuredQuery_Order) GetField() *StructuredQuery_FieldReference {
if m != nil {
return m.Field
}
return nil
}
func (m *StructuredQuery_Order) GetDirection() StructuredQuery_Direction {
if m != nil {
return m.Direction
}
return StructuredQuery_DIRECTION_UNSPECIFIED
}
// A reference to a field, such as `max(messages.time) as max_time`.
type StructuredQuery_FieldReference struct {
FieldPath string `protobuf:"bytes,2,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"`
}
func (m *StructuredQuery_FieldReference) Reset() { *m = StructuredQuery_FieldReference{} }
func (m *StructuredQuery_FieldReference) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_FieldReference) ProtoMessage() {}
func (*StructuredQuery_FieldReference) Descriptor() ([]byte, []int) {
return fileDescriptor3, []int{0, 6}
}
func (m *StructuredQuery_FieldReference) GetFieldPath() string {
if m != nil {
return m.FieldPath
}
return ""
}
// The projection of document's fields to return.
type StructuredQuery_Projection struct {
// The fields to return.
//
// If empty, all fields are returned. To only return the name
// of the document, use `['__name__']`.
Fields []*StructuredQuery_FieldReference `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
}
func (m *StructuredQuery_Projection) Reset() { *m = StructuredQuery_Projection{} }
func (m *StructuredQuery_Projection) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery_Projection) ProtoMessage() {}
func (*StructuredQuery_Projection) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 7} }
func (m *StructuredQuery_Projection) GetFields() []*StructuredQuery_FieldReference {
if m != nil {
return m.Fields
}
return nil
}
// A position in a query result set.
type Cursor struct {
// The values that represent a position, in the order they appear in
// the order by clause of a query.
//
// Can contain fewer values than specified in the order by clause.
Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
// If the position is just before or just after the given values, relative
// to the sort order defined by the query.
Before bool `protobuf:"varint,2,opt,name=before" json:"before,omitempty"`
}
func (m *Cursor) Reset() { *m = Cursor{} }
func (m *Cursor) String() string { return proto.CompactTextString(m) }
func (*Cursor) ProtoMessage() {}
func (*Cursor) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
func (m *Cursor) GetValues() []*Value {
if m != nil {
return m.Values
}
return nil
}
func (m *Cursor) GetBefore() bool {
if m != nil {
return m.Before
}
return false
}
func init() {
proto.RegisterType((*StructuredQuery)(nil), "google.firestore.v1beta1.StructuredQuery")
proto.RegisterType((*StructuredQuery_CollectionSelector)(nil), "google.firestore.v1beta1.StructuredQuery.CollectionSelector")
proto.RegisterType((*StructuredQuery_Filter)(nil), "google.firestore.v1beta1.StructuredQuery.Filter")
proto.RegisterType((*StructuredQuery_CompositeFilter)(nil), "google.firestore.v1beta1.StructuredQuery.CompositeFilter")
proto.RegisterType((*StructuredQuery_FieldFilter)(nil), "google.firestore.v1beta1.StructuredQuery.FieldFilter")
proto.RegisterType((*StructuredQuery_UnaryFilter)(nil), "google.firestore.v1beta1.StructuredQuery.UnaryFilter")
proto.RegisterType((*StructuredQuery_Order)(nil), "google.firestore.v1beta1.StructuredQuery.Order")
proto.RegisterType((*StructuredQuery_FieldReference)(nil), "google.firestore.v1beta1.StructuredQuery.FieldReference")
proto.RegisterType((*StructuredQuery_Projection)(nil), "google.firestore.v1beta1.StructuredQuery.Projection")
proto.RegisterType((*Cursor)(nil), "google.firestore.v1beta1.Cursor")
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_Direction", StructuredQuery_Direction_name, StructuredQuery_Direction_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_CompositeFilter_Operator", StructuredQuery_CompositeFilter_Operator_name, StructuredQuery_CompositeFilter_Operator_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_FieldFilter_Operator", StructuredQuery_FieldFilter_Operator_name, StructuredQuery_FieldFilter_Operator_value)
proto.RegisterEnum("google.firestore.v1beta1.StructuredQuery_UnaryFilter_Operator", StructuredQuery_UnaryFilter_Operator_name, StructuredQuery_UnaryFilter_Operator_value)
}
func init() { proto.RegisterFile("google/firestore/v1beta1/query.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{
// 970 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xc7, 0xd7, 0x4e, 0xf3, 0x75, 0xd2, 0x0f, 0x6b, 0x04, 0x2b, 0x13, 0x96, 0xa5, 0x0a, 0x48,
0xdb, 0x1b, 0x1c, 0xda, 0xb2, 0x02, 0xb4, 0x80, 0xe4, 0x24, 0x6e, 0x9b, 0x55, 0xe5, 0xa4, 0x93,
0xb6, 0x12, 0xab, 0x0a, 0xcb, 0xb1, 0xc7, 0xa9, 0x91, 0xeb, 0x31, 0xe3, 0xf1, 0xae, 0x7a, 0xcd,
0x9b, 0x70, 0xb9, 0x2f, 0x00, 0xcf, 0xc0, 0x53, 0x70, 0xcd, 0x23, 0x70, 0x81, 0x90, 0xc7, 0xe3,
0xa4, 0xdd, 0xaa, 0x22, 0x29, 0xdc, 0xe5, 0x1c, 0x9f, 0xf3, 0x9b, 0xe3, 0xff, 0x39, 0xc7, 0x13,
0xf8, 0x74, 0x46,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6, 0xb6, 0xda, 0xf9, 0x1e, 0x6a, 0xc5, 0x7d, 0x96, 0xdf, 0x80, 0x62, 0x3d,
0x52, 0x5d, 0x11, 0x25, 0xfe, 0xeb, 0x36, 0xc9, 0xf0, 0xfc, 0x06, 0x9c, 0x92, 0x80, 0x32, 0x22,
0x44, 0x68, 0x60, 0x69, 0xf5, 0x7e, 0x53, 0xe0, 0x89, 0x47, 0xaf, 0xee, 0xc5, 0xf4, 0x40, 0xbc,
0xe0, 0x38, 0xbf, 0x10, 0xc7, 0xca, 0x2b, 0x53, 0xc6, 0xcd, 0x68, 0xe4, 0xc6, 0x33, 0x83, 0xb2,
0x59, 0x77, 0x46, 0x62, 0x71, 0x5d, 0x76, 0x8b, 0x47, 0x6e, 0x12, 0xa6, 0x77, 0xff, 0x6e, 0xbd,
0x98, 0x7b, 0x7e, 0x51, 0xd7, 0x0e, 0xfb, 0x07, 0x93, 0xb7, 0xea, 0xd3, 0xc3, 0x02, 0xd5, 0x8f,
0x68, 0xe6, 0x1b, 0x07, 0xf3, 0x83, 0xcf, 0x77, 0x7b, 0x79, 0xc6, 0xef, 0x65, 0xc0, 0x85, 0x08,
0xb8, 0x98, 0x07, 0x5c, 0x9c, 0x17, 0xc8, 0x69, 0x4d, 0x1c, 0xbb, 0xff, 0x4f, 0x00, 0x00, 0x00,
0xff, 0xff, 0x4c, 0xc9, 0x73, 0x9b, 0x42, 0x0a, 0x00, 0x00,
}

View File

@ -0,0 +1,612 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/write.proto
package firestore
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// A value that is calculated by the server.
type DocumentTransform_FieldTransform_ServerValue int32
const (
// Unspecified. This value must not be used.
DocumentTransform_FieldTransform_SERVER_VALUE_UNSPECIFIED DocumentTransform_FieldTransform_ServerValue = 0
// The time at which the server processed the request, with millisecond
// precision.
DocumentTransform_FieldTransform_REQUEST_TIME DocumentTransform_FieldTransform_ServerValue = 1
)
var DocumentTransform_FieldTransform_ServerValue_name = map[int32]string{
0: "SERVER_VALUE_UNSPECIFIED",
1: "REQUEST_TIME",
}
var DocumentTransform_FieldTransform_ServerValue_value = map[string]int32{
"SERVER_VALUE_UNSPECIFIED": 0,
"REQUEST_TIME": 1,
}
func (x DocumentTransform_FieldTransform_ServerValue) String() string {
return proto.EnumName(DocumentTransform_FieldTransform_ServerValue_name, int32(x))
}
func (DocumentTransform_FieldTransform_ServerValue) EnumDescriptor() ([]byte, []int) {
return fileDescriptor4, []int{1, 0, 0}
}
// A write on a document.
type Write struct {
// The operation to execute.
//
// Types that are valid to be assigned to Operation:
// *Write_Update
// *Write_Delete
// *Write_Transform
Operation isWrite_Operation `protobuf_oneof:"operation"`
// The fields to update in this write.
//
// This field can be set only when the operation is `update`.
// None of the field paths in the mask may contain a reserved name.
// If the document exists on the server and has fields not referenced in the
// mask, they are left unchanged.
// Fields referenced in the mask, but not present in the input document, are
// deleted from the document on the server.
// The field paths in this mask must not contain a reserved field name.
UpdateMask *DocumentMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
// An optional precondition on the document.
//
// The write will fail if this is set and not met by the target document.
CurrentDocument *Precondition `protobuf:"bytes,4,opt,name=current_document,json=currentDocument" json:"current_document,omitempty"`
}
func (m *Write) Reset() { *m = Write{} }
func (m *Write) String() string { return proto.CompactTextString(m) }
func (*Write) ProtoMessage() {}
func (*Write) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
type isWrite_Operation interface {
isWrite_Operation()
}
type Write_Update struct {
Update *Document `protobuf:"bytes,1,opt,name=update,oneof"`
}
type Write_Delete struct {
Delete string `protobuf:"bytes,2,opt,name=delete,oneof"`
}
type Write_Transform struct {
Transform *DocumentTransform `protobuf:"bytes,6,opt,name=transform,oneof"`
}
func (*Write_Update) isWrite_Operation() {}
func (*Write_Delete) isWrite_Operation() {}
func (*Write_Transform) isWrite_Operation() {}
func (m *Write) GetOperation() isWrite_Operation {
if m != nil {
return m.Operation
}
return nil
}
func (m *Write) GetUpdate() *Document {
if x, ok := m.GetOperation().(*Write_Update); ok {
return x.Update
}
return nil
}
func (m *Write) GetDelete() string {
if x, ok := m.GetOperation().(*Write_Delete); ok {
return x.Delete
}
return ""
}
func (m *Write) GetTransform() *DocumentTransform {
if x, ok := m.GetOperation().(*Write_Transform); ok {
return x.Transform
}
return nil
}
func (m *Write) GetUpdateMask() *DocumentMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func (m *Write) GetCurrentDocument() *Precondition {
if m != nil {
return m.CurrentDocument
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Write) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Write_OneofMarshaler, _Write_OneofUnmarshaler, _Write_OneofSizer, []interface{}{
(*Write_Update)(nil),
(*Write_Delete)(nil),
(*Write_Transform)(nil),
}
}
func _Write_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Write)
// operation
switch x := m.Operation.(type) {
case *Write_Update:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Update); err != nil {
return err
}
case *Write_Delete:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Delete)
case *Write_Transform:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Transform); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Write.Operation has unexpected type %T", x)
}
return nil
}
func _Write_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Write)
switch tag {
case 1: // operation.update
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Document)
err := b.DecodeMessage(msg)
m.Operation = &Write_Update{msg}
return true, err
case 2: // operation.delete
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Operation = &Write_Delete{x}
return true, err
case 6: // operation.transform
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(DocumentTransform)
err := b.DecodeMessage(msg)
m.Operation = &Write_Transform{msg}
return true, err
default:
return false, nil
}
}
func _Write_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Write)
// operation
switch x := m.Operation.(type) {
case *Write_Update:
s := proto.Size(x.Update)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Write_Delete:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(len(x.Delete)))
n += len(x.Delete)
case *Write_Transform:
s := proto.Size(x.Transform)
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A transformation of a document.
type DocumentTransform struct {
// The name of the document to transform.
Document string `protobuf:"bytes,1,opt,name=document" json:"document,omitempty"`
// The list of transformations to apply to the fields of the document, in
// order.
// This must not be empty.
FieldTransforms []*DocumentTransform_FieldTransform `protobuf:"bytes,2,rep,name=field_transforms,json=fieldTransforms" json:"field_transforms,omitempty"`
}
func (m *DocumentTransform) Reset() { *m = DocumentTransform{} }
func (m *DocumentTransform) String() string { return proto.CompactTextString(m) }
func (*DocumentTransform) ProtoMessage() {}
func (*DocumentTransform) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
func (m *DocumentTransform) GetDocument() string {
if m != nil {
return m.Document
}
return ""
}
func (m *DocumentTransform) GetFieldTransforms() []*DocumentTransform_FieldTransform {
if m != nil {
return m.FieldTransforms
}
return nil
}
// A transformation of a field of the document.
type DocumentTransform_FieldTransform struct {
// The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
// reference.
FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath" json:"field_path,omitempty"`
// The transformation to apply on the field.
//
// Types that are valid to be assigned to TransformType:
// *DocumentTransform_FieldTransform_SetToServerValue
TransformType isDocumentTransform_FieldTransform_TransformType `protobuf_oneof:"transform_type"`
}
func (m *DocumentTransform_FieldTransform) Reset() { *m = DocumentTransform_FieldTransform{} }
func (m *DocumentTransform_FieldTransform) String() string { return proto.CompactTextString(m) }
func (*DocumentTransform_FieldTransform) ProtoMessage() {}
func (*DocumentTransform_FieldTransform) Descriptor() ([]byte, []int) {
return fileDescriptor4, []int{1, 0}
}
type isDocumentTransform_FieldTransform_TransformType interface {
isDocumentTransform_FieldTransform_TransformType()
}
type DocumentTransform_FieldTransform_SetToServerValue struct {
SetToServerValue DocumentTransform_FieldTransform_ServerValue `protobuf:"varint,2,opt,name=set_to_server_value,json=setToServerValue,enum=google.firestore.v1beta1.DocumentTransform_FieldTransform_ServerValue,oneof"`
}
func (*DocumentTransform_FieldTransform_SetToServerValue) isDocumentTransform_FieldTransform_TransformType() {
}
func (m *DocumentTransform_FieldTransform) GetTransformType() isDocumentTransform_FieldTransform_TransformType {
if m != nil {
return m.TransformType
}
return nil
}
func (m *DocumentTransform_FieldTransform) GetFieldPath() string {
if m != nil {
return m.FieldPath
}
return ""
}
func (m *DocumentTransform_FieldTransform) GetSetToServerValue() DocumentTransform_FieldTransform_ServerValue {
if x, ok := m.GetTransformType().(*DocumentTransform_FieldTransform_SetToServerValue); ok {
return x.SetToServerValue
}
return DocumentTransform_FieldTransform_SERVER_VALUE_UNSPECIFIED
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*DocumentTransform_FieldTransform) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _DocumentTransform_FieldTransform_OneofMarshaler, _DocumentTransform_FieldTransform_OneofUnmarshaler, _DocumentTransform_FieldTransform_OneofSizer, []interface{}{
(*DocumentTransform_FieldTransform_SetToServerValue)(nil),
}
}
func _DocumentTransform_FieldTransform_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*DocumentTransform_FieldTransform)
// transform_type
switch x := m.TransformType.(type) {
case *DocumentTransform_FieldTransform_SetToServerValue:
b.EncodeVarint(2<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.SetToServerValue))
case nil:
default:
return fmt.Errorf("DocumentTransform_FieldTransform.TransformType has unexpected type %T", x)
}
return nil
}
func _DocumentTransform_FieldTransform_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*DocumentTransform_FieldTransform)
switch tag {
case 2: // transform_type.set_to_server_value
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.TransformType = &DocumentTransform_FieldTransform_SetToServerValue{DocumentTransform_FieldTransform_ServerValue(x)}
return true, err
default:
return false, nil
}
}
func _DocumentTransform_FieldTransform_OneofSizer(msg proto.Message) (n int) {
m := msg.(*DocumentTransform_FieldTransform)
// transform_type
switch x := m.TransformType.(type) {
case *DocumentTransform_FieldTransform_SetToServerValue:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += proto.SizeVarint(uint64(x.SetToServerValue))
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The result of applying a write.
type WriteResult struct {
// The last update time of the document after applying the write. Not set
// after a `delete`.
//
// If the write did not actually change the document, this will be the
// previous update_time.
UpdateTime *google_protobuf1.Timestamp `protobuf:"bytes,1,opt,name=update_time,json=updateTime" json:"update_time,omitempty"`
// The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
// same order.
TransformResults []*Value `protobuf:"bytes,2,rep,name=transform_results,json=transformResults" json:"transform_results,omitempty"`
}
func (m *WriteResult) Reset() { *m = WriteResult{} }
func (m *WriteResult) String() string { return proto.CompactTextString(m) }
func (*WriteResult) ProtoMessage() {}
func (*WriteResult) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} }
func (m *WriteResult) GetUpdateTime() *google_protobuf1.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *WriteResult) GetTransformResults() []*Value {
if m != nil {
return m.TransformResults
}
return nil
}
// A [Document][google.firestore.v1beta1.Document] has changed.
//
// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
//
// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
// change, if multiple targets are affected.
type DocumentChange struct {
// The new state of the [Document][google.firestore.v1beta1.Document].
//
// If `mask` is set, contains only fields that were updated or added.
Document *Document `protobuf:"bytes,1,opt,name=document" json:"document,omitempty"`
// A set of target IDs of targets that match this document.
TargetIds []int32 `protobuf:"varint,5,rep,packed,name=target_ids,json=targetIds" json:"target_ids,omitempty"`
// A set of target IDs for targets that no longer match this document.
RemovedTargetIds []int32 `protobuf:"varint,6,rep,packed,name=removed_target_ids,json=removedTargetIds" json:"removed_target_ids,omitempty"`
}
func (m *DocumentChange) Reset() { *m = DocumentChange{} }
func (m *DocumentChange) String() string { return proto.CompactTextString(m) }
func (*DocumentChange) ProtoMessage() {}
func (*DocumentChange) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} }
func (m *DocumentChange) GetDocument() *Document {
if m != nil {
return m.Document
}
return nil
}
func (m *DocumentChange) GetTargetIds() []int32 {
if m != nil {
return m.TargetIds
}
return nil
}
func (m *DocumentChange) GetRemovedTargetIds() []int32 {
if m != nil {
return m.RemovedTargetIds
}
return nil
}
// A [Document][google.firestore.v1beta1.Document] has been deleted.
//
// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
// last of which deleted the [Document][google.firestore.v1beta1.Document].
//
// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
// delete, if multiple targets are affected.
type DocumentDelete struct {
// The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
Document string `protobuf:"bytes,1,opt,name=document" json:"document,omitempty"`
// A set of target IDs for targets that previously matched this entity.
RemovedTargetIds []int32 `protobuf:"varint,6,rep,packed,name=removed_target_ids,json=removedTargetIds" json:"removed_target_ids,omitempty"`
// The read timestamp at which the delete was observed.
//
// Greater or equal to the `commit_time` of the delete.
ReadTime *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=read_time,json=readTime" json:"read_time,omitempty"`
}
func (m *DocumentDelete) Reset() { *m = DocumentDelete{} }
func (m *DocumentDelete) String() string { return proto.CompactTextString(m) }
func (*DocumentDelete) ProtoMessage() {}
func (*DocumentDelete) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} }
func (m *DocumentDelete) GetDocument() string {
if m != nil {
return m.Document
}
return ""
}
func (m *DocumentDelete) GetRemovedTargetIds() []int32 {
if m != nil {
return m.RemovedTargetIds
}
return nil
}
func (m *DocumentDelete) GetReadTime() *google_protobuf1.Timestamp {
if m != nil {
return m.ReadTime
}
return nil
}
// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
//
// Sent if the document is no longer relevant to a target and is out of view.
// Can be sent instead of a DocumentDelete or a DocumentChange if the server
// can not send the new value of the document.
//
// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
// write or delete, if multiple targets are affected.
type DocumentRemove struct {
// The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
Document string `protobuf:"bytes,1,opt,name=document" json:"document,omitempty"`
// A set of target IDs for targets that previously matched this document.
RemovedTargetIds []int32 `protobuf:"varint,2,rep,packed,name=removed_target_ids,json=removedTargetIds" json:"removed_target_ids,omitempty"`
// The read timestamp at which the remove was observed.
//
// Greater or equal to the `commit_time` of the change/delete/remove.
ReadTime *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=read_time,json=readTime" json:"read_time,omitempty"`
}
func (m *DocumentRemove) Reset() { *m = DocumentRemove{} }
func (m *DocumentRemove) String() string { return proto.CompactTextString(m) }
func (*DocumentRemove) ProtoMessage() {}
func (*DocumentRemove) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} }
func (m *DocumentRemove) GetDocument() string {
if m != nil {
return m.Document
}
return ""
}
func (m *DocumentRemove) GetRemovedTargetIds() []int32 {
if m != nil {
return m.RemovedTargetIds
}
return nil
}
func (m *DocumentRemove) GetReadTime() *google_protobuf1.Timestamp {
if m != nil {
return m.ReadTime
}
return nil
}
// A digest of all the documents that match a given target.
type ExistenceFilter struct {
// The target ID to which this filter applies.
TargetId int32 `protobuf:"varint,1,opt,name=target_id,json=targetId" json:"target_id,omitempty"`
// The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
//
// If different from the count of documents in the client that match, the
// client must manually determine which documents no longer match the target.
Count int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
}
func (m *ExistenceFilter) Reset() { *m = ExistenceFilter{} }
func (m *ExistenceFilter) String() string { return proto.CompactTextString(m) }
func (*ExistenceFilter) ProtoMessage() {}
func (*ExistenceFilter) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} }
func (m *ExistenceFilter) GetTargetId() int32 {
if m != nil {
return m.TargetId
}
return 0
}
func (m *ExistenceFilter) GetCount() int32 {
if m != nil {
return m.Count
}
return 0
}
func init() {
proto.RegisterType((*Write)(nil), "google.firestore.v1beta1.Write")
proto.RegisterType((*DocumentTransform)(nil), "google.firestore.v1beta1.DocumentTransform")
proto.RegisterType((*DocumentTransform_FieldTransform)(nil), "google.firestore.v1beta1.DocumentTransform.FieldTransform")
proto.RegisterType((*WriteResult)(nil), "google.firestore.v1beta1.WriteResult")
proto.RegisterType((*DocumentChange)(nil), "google.firestore.v1beta1.DocumentChange")
proto.RegisterType((*DocumentDelete)(nil), "google.firestore.v1beta1.DocumentDelete")
proto.RegisterType((*DocumentRemove)(nil), "google.firestore.v1beta1.DocumentRemove")
proto.RegisterType((*ExistenceFilter)(nil), "google.firestore.v1beta1.ExistenceFilter")
proto.RegisterEnum("google.firestore.v1beta1.DocumentTransform_FieldTransform_ServerValue", DocumentTransform_FieldTransform_ServerValue_name, DocumentTransform_FieldTransform_ServerValue_value)
}
func init() { proto.RegisterFile("google/firestore/v1beta1/write.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 756 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x8e, 0xe3, 0x44,
0x10, 0x8e, 0x93, 0x49, 0x34, 0xae, 0xa0, 0x8c, 0xb7, 0xe1, 0x60, 0x85, 0x59, 0x36, 0x8a, 0xf8,
0x89, 0x04, 0x72, 0x34, 0xc3, 0x01, 0x89, 0x05, 0xa4, 0x4d, 0xe2, 0xcc, 0x44, 0xec, 0xa2, 0x6c,
0x27, 0x13, 0x24, 0x34, 0x92, 0xd5, 0x13, 0x77, 0x3c, 0xd6, 0xda, 0x6e, 0xab, 0xbb, 0x9d, 0x85,
0xd7, 0x80, 0x0b, 0x17, 0x2e, 0x1c, 0x79, 0x02, 0x9e, 0x81, 0x3b, 0x0f, 0xc3, 0x0d, 0xb9, 0xdb,
0xf6, 0x66, 0x58, 0x85, 0xb0, 0x23, 0x6e, 0xae, 0xea, 0xaf, 0xbe, 0xfa, 0xea, 0x4f, 0x86, 0xf7,
0x03, 0xc6, 0x82, 0x88, 0x0e, 0x37, 0x21, 0xa7, 0x42, 0x32, 0x4e, 0x87, 0xdb, 0xb3, 0x1b, 0x2a,
0xc9, 0xd9, 0xf0, 0x25, 0x0f, 0x25, 0x75, 0x52, 0xce, 0x24, 0x43, 0xb6, 0x46, 0x39, 0x15, 0xca,
0x29, 0x50, 0xdd, 0xd3, 0x22, 0x9e, 0xa4, 0xe1, 0x90, 0x24, 0x09, 0x93, 0x44, 0x86,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