vendor update for CSI 0.3.0

This commit is contained in:
gman
2018-07-18 16:47:22 +02:00
parent 6f484f92fc
commit 8ea659f0d5
6810 changed files with 438061 additions and 193861 deletions

View File

@ -1,33 +1,15 @@
// 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
package admin // import "google.golang.org/genproto/googleapis/firestore/admin/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
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 longrunning "google.golang.org/genproto/googleapis/longrunning"
import (
context "golang.org/x/net/context"
@ -68,43 +50,65 @@ 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}
return fileDescriptor_firestore_admin_4aed9459ad95e423, []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"`
StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" 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"`
EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" 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"`
Index string `protobuf:"bytes,3,opt,name=index,proto3" 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"`
OperationType IndexOperationMetadata_OperationType `protobuf:"varint,4,opt,name=operation_type,json=operationType,proto3,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"`
Cancelled bool `protobuf:"varint,5,opt,name=cancelled,proto3" 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"`
DocumentProgress *Progress `protobuf:"bytes,6,opt,name=document_progress,json=documentProgress,proto3" json:"document_progress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = IndexOperationMetadata{} }
func (m *IndexOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*IndexOperationMetadata) ProtoMessage() {}
func (*IndexOperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{0}
}
func (m *IndexOperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexOperationMetadata.Unmarshal(m, b)
}
func (m *IndexOperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexOperationMetadata.Marshal(b, m, deterministic)
}
func (dst *IndexOperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexOperationMetadata.Merge(dst, src)
}
func (m *IndexOperationMetadata) XXX_Size() int {
return xxx_messageInfo_IndexOperationMetadata.Size(m)
}
func (m *IndexOperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_IndexOperationMetadata.DiscardUnknown(m)
}
func (m *IndexOperationMetadata) GetStartTime() *google_protobuf3.Timestamp {
var xxx_messageInfo_IndexOperationMetadata proto.InternalMessageInfo
func (m *IndexOperationMetadata) GetStartTime() *timestamp.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *IndexOperationMetadata) GetEndTime() *google_protobuf3.Timestamp {
func (m *IndexOperationMetadata) GetEndTime() *timestamp.Timestamp {
if m != nil {
return m.EndTime
}
@ -143,16 +147,38 @@ func (m *IndexOperationMetadata) GetDocumentProgress() *Progress {
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"`
WorkCompleted int64 `protobuf:"varint,1,opt,name=work_completed,json=workCompleted,proto3" 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"`
WorkEstimated int64 `protobuf:"varint,2,opt,name=work_estimated,json=workEstimated,proto3" json:"work_estimated,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = Progress{} }
func (m *Progress) String() string { return proto.CompactTextString(m) }
func (*Progress) ProtoMessage() {}
func (*Progress) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{1}
}
func (m *Progress) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Progress.Unmarshal(m, b)
}
func (m *Progress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Progress.Marshal(b, m, deterministic)
}
func (dst *Progress) XXX_Merge(src proto.Message) {
xxx_messageInfo_Progress.Merge(dst, src)
}
func (m *Progress) XXX_Size() int {
return xxx_messageInfo_Progress.Size(m)
}
func (m *Progress) XXX_DiscardUnknown() {
xxx_messageInfo_Progress.DiscardUnknown(m)
}
var xxx_messageInfo_Progress proto.InternalMessageInfo
func (m *Progress) GetWorkCompleted() int64 {
if m != nil {
@ -172,16 +198,38 @@ func (m *Progress) GetWorkEstimated() int64 {
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"`
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" 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"`
Index *Index `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = CreateIndexRequest{} }
func (m *CreateIndexRequest) String() string { return proto.CompactTextString(m) }
func (*CreateIndexRequest) ProtoMessage() {}
func (*CreateIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{2}
}
func (m *CreateIndexRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateIndexRequest.Unmarshal(m, b)
}
func (m *CreateIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateIndexRequest.Marshal(b, m, deterministic)
}
func (dst *CreateIndexRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateIndexRequest.Merge(dst, src)
}
func (m *CreateIndexRequest) XXX_Size() int {
return xxx_messageInfo_CreateIndexRequest.Size(m)
}
func (m *CreateIndexRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateIndexRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateIndexRequest proto.InternalMessageInfo
func (m *CreateIndexRequest) GetParent() string {
if m != nil {
@ -201,13 +249,35 @@ func (m *CreateIndexRequest) GetIndex() *Index {
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"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = GetIndexRequest{} }
func (m *GetIndexRequest) String() string { return proto.CompactTextString(m) }
func (*GetIndexRequest) ProtoMessage() {}
func (*GetIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{3}
}
func (m *GetIndexRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetIndexRequest.Unmarshal(m, b)
}
func (m *GetIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetIndexRequest.Marshal(b, m, deterministic)
}
func (dst *GetIndexRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetIndexRequest.Merge(dst, src)
}
func (m *GetIndexRequest) XXX_Size() int {
return xxx_messageInfo_GetIndexRequest.Size(m)
}
func (m *GetIndexRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetIndexRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetIndexRequest proto.InternalMessageInfo
func (m *GetIndexRequest) GetName() string {
if m != nil {
@ -220,18 +290,40 @@ func (m *GetIndexRequest) GetName() string {
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"`
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// The standard List page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The standard List page token.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = ListIndexesRequest{} }
func (m *ListIndexesRequest) String() string { return proto.CompactTextString(m) }
func (*ListIndexesRequest) ProtoMessage() {}
func (*ListIndexesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{4}
}
func (m *ListIndexesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListIndexesRequest.Unmarshal(m, b)
}
func (m *ListIndexesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListIndexesRequest.Marshal(b, m, deterministic)
}
func (dst *ListIndexesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListIndexesRequest.Merge(dst, src)
}
func (m *ListIndexesRequest) XXX_Size() int {
return xxx_messageInfo_ListIndexesRequest.Size(m)
}
func (m *ListIndexesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListIndexesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListIndexesRequest proto.InternalMessageInfo
func (m *ListIndexesRequest) GetParent() string {
if m != nil {
@ -265,13 +357,35 @@ func (m *ListIndexesRequest) GetPageToken() string {
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"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DeleteIndexRequest{} }
func (m *DeleteIndexRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteIndexRequest) ProtoMessage() {}
func (*DeleteIndexRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{5}
}
func (m *DeleteIndexRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteIndexRequest.Unmarshal(m, b)
}
func (m *DeleteIndexRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteIndexRequest.Marshal(b, m, deterministic)
}
func (dst *DeleteIndexRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteIndexRequest.Merge(dst, src)
}
func (m *DeleteIndexRequest) XXX_Size() int {
return xxx_messageInfo_DeleteIndexRequest.Size(m)
}
func (m *DeleteIndexRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteIndexRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteIndexRequest proto.InternalMessageInfo
func (m *DeleteIndexRequest) GetName() string {
if m != nil {
@ -283,15 +397,37 @@ func (m *DeleteIndexRequest) GetName() string {
// 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"`
Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" 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"`
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = ListIndexesResponse{} }
func (m *ListIndexesResponse) String() string { return proto.CompactTextString(m) }
func (*ListIndexesResponse) ProtoMessage() {}
func (*ListIndexesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_firestore_admin_4aed9459ad95e423, []int{6}
}
func (m *ListIndexesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListIndexesResponse.Unmarshal(m, b)
}
func (m *ListIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListIndexesResponse.Marshal(b, m, deterministic)
}
func (dst *ListIndexesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListIndexesResponse.Merge(dst, src)
}
func (m *ListIndexesResponse) XXX_Size() int {
return xxx_messageInfo_ListIndexesResponse.Size(m)
}
func (m *ListIndexesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListIndexesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListIndexesResponse proto.InternalMessageInfo
func (m *ListIndexesResponse) GetIndexes() []*Index {
if m != nil {
@ -326,8 +462,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for FirestoreAdmin service
// FirestoreAdminClient is the client API for FirestoreAdmin service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type FirestoreAdminClient interface {
// Creates the specified index.
// A newly created index's initial state is `CREATING`. On completion of the
@ -342,13 +479,13 @@ type FirestoreAdminClient interface {
// [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)
CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*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)
DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type firestoreAdminClient struct {
@ -359,9 +496,9 @@ 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...)
func (c *firestoreAdminClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
out := new(longrunning.Operation)
err := c.cc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/CreateIndex", in, out, opts...)
if err != nil {
return nil, err
}
@ -370,7 +507,7 @@ func (c *firestoreAdminClient) CreateIndex(ctx context.Context, in *CreateIndexR
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...)
err := c.cc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/ListIndexes", in, out, opts...)
if err != nil {
return nil, err
}
@ -379,24 +516,23 @@ func (c *firestoreAdminClient) ListIndexes(ctx context.Context, in *ListIndexesR
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...)
err := c.cc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/GetIndex", in, out, 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...)
func (c *firestoreAdminClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.firestore.admin.v1beta1.FirestoreAdmin/DeleteIndex", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for FirestoreAdmin service
// FirestoreAdminServer is the 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
@ -411,13 +547,13 @@ type FirestoreAdminServer interface {
// [create][google.firestore.admin.v1beta1.FirestoreAdmin.CreateIndex].
//
// Indexes with a single field cannot be created.
CreateIndex(context.Context, *CreateIndexRequest) (*google_longrunning.Operation, error)
CreateIndex(context.Context, *CreateIndexRequest) (*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)
DeleteIndex(context.Context, *DeleteIndexRequest) (*empty.Empty, error)
}
func RegisterFirestoreAdminServer(s *grpc.Server, srv FirestoreAdminServer) {
@ -522,10 +658,10 @@ var _FirestoreAdmin_serviceDesc = grpc.ServiceDesc{
}
func init() {
proto.RegisterFile("google/firestore/admin/v1beta1/firestore_admin.proto", fileDescriptor0)
proto.RegisterFile("google/firestore/admin/v1beta1/firestore_admin.proto", fileDescriptor_firestore_admin_4aed9459ad95e423)
}
var fileDescriptor0 = []byte{
var fileDescriptor_firestore_admin_4aed9459ad95e423 = []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,

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/admin/v1beta1/index.proto
package admin
package admin // import "google.golang.org/genproto/googleapis/firestore/admin/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
@ -13,6 +13,12 @@ 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 mode determines how a field is indexed.
type IndexField_Mode int32
@ -41,7 +47,9 @@ var IndexField_Mode_value = map[string]int32{
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} }
func (IndexField_Mode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_index_8502697994912cbb, []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
@ -85,7 +93,9 @@ var Index_State_value = map[string]int32{
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} }
func (Index_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_index_8502697994912cbb, []int{1, 0}
}
// A field of an index.
type IndexField struct {
@ -93,15 +103,37 @@ type IndexField struct {
// 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"`
FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" 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"`
Mode IndexField_Mode `protobuf:"varint,2,opt,name=mode,proto3,enum=google.firestore.admin.v1beta1.IndexField_Mode" json:"mode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = IndexField{} }
func (m *IndexField) String() string { return proto.CompactTextString(m) }
func (*IndexField) ProtoMessage() {}
func (*IndexField) Descriptor() ([]byte, []int) {
return fileDescriptor_index_8502697994912cbb, []int{0}
}
func (m *IndexField) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IndexField.Unmarshal(m, b)
}
func (m *IndexField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IndexField.Marshal(b, m, deterministic)
}
func (dst *IndexField) XXX_Merge(src proto.Message) {
xxx_messageInfo_IndexField.Merge(dst, src)
}
func (m *IndexField) XXX_Size() int {
return xxx_messageInfo_IndexField.Size(m)
}
func (m *IndexField) XXX_DiscardUnknown() {
xxx_messageInfo_IndexField.DiscardUnknown(m)
}
var xxx_messageInfo_IndexField proto.InternalMessageInfo
func (m *IndexField) GetFieldPath() string {
if m != nil {
@ -121,20 +153,42 @@ func (m *IndexField) GetMode() IndexField_Mode {
type Index struct {
// The resource name of the index.
// Output only.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" 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"`
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" json:"collection_id,omitempty"`
// The fields to index.
Fields []*IndexField `protobuf:"bytes,3,rep,name=fields" json:"fields,omitempty"`
Fields []*IndexField `protobuf:"bytes,3,rep,name=fields,proto3" 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"`
State Index_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.firestore.admin.v1beta1.Index_State" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = Index{} }
func (m *Index) String() string { return proto.CompactTextString(m) }
func (*Index) ProtoMessage() {}
func (*Index) Descriptor() ([]byte, []int) {
return fileDescriptor_index_8502697994912cbb, []int{1}
}
func (m *Index) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Index.Unmarshal(m, b)
}
func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Index.Marshal(b, m, deterministic)
}
func (dst *Index) XXX_Merge(src proto.Message) {
xxx_messageInfo_Index.Merge(dst, src)
}
func (m *Index) XXX_Size() int {
return xxx_messageInfo_Index.Size(m)
}
func (m *Index) XXX_DiscardUnknown() {
xxx_messageInfo_Index.DiscardUnknown(m)
}
var xxx_messageInfo_Index proto.InternalMessageInfo
func (m *Index) GetName() string {
if m != nil {
@ -171,9 +225,11 @@ func init() {
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) }
func init() {
proto.RegisterFile("google/firestore/admin/v1beta1/index.proto", fileDescriptor_index_8502697994912cbb)
}
var fileDescriptor1 = []byte{
var fileDescriptor_index_8502697994912cbb = []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,

View File

@ -1,64 +1,13 @@
// 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
package firestore // import "google.golang.org/genproto/googleapis/firestore/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
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
@ -79,13 +28,35 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
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"`
FieldPaths []string `protobuf:"bytes,1,rep,name=field_paths,json=fieldPaths,proto3" json:"field_paths,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DocumentMask{} }
func (m *DocumentMask) String() string { return proto.CompactTextString(m) }
func (*DocumentMask) ProtoMessage() {}
func (*DocumentMask) Descriptor() ([]byte, []int) {
return fileDescriptor_common_0837eaa712bfb362, []int{0}
}
func (m *DocumentMask) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentMask.Unmarshal(m, b)
}
func (m *DocumentMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentMask.Marshal(b, m, deterministic)
}
func (dst *DocumentMask) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentMask.Merge(dst, src)
}
func (m *DocumentMask) XXX_Size() int {
return xxx_messageInfo_DocumentMask.Size(m)
}
func (m *DocumentMask) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentMask.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentMask proto.InternalMessageInfo
func (m *DocumentMask) GetFieldPaths() []string {
if m != nil {
@ -101,26 +72,50 @@ type Precondition struct {
// Types that are valid to be assigned to ConditionType:
// *Precondition_Exists
// *Precondition_UpdateTime
ConditionType isPrecondition_ConditionType `protobuf_oneof:"condition_type"`
ConditionType isPrecondition_ConditionType `protobuf_oneof:"condition_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
func (m *Precondition) Reset() { *m = Precondition{} }
func (m *Precondition) String() string { return proto.CompactTextString(m) }
func (*Precondition) ProtoMessage() {}
func (*Precondition) Descriptor() ([]byte, []int) {
return fileDescriptor_common_0837eaa712bfb362, []int{1}
}
func (m *Precondition) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Precondition.Unmarshal(m, b)
}
func (m *Precondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Precondition.Marshal(b, m, deterministic)
}
func (dst *Precondition) XXX_Merge(src proto.Message) {
xxx_messageInfo_Precondition.Merge(dst, src)
}
func (m *Precondition) XXX_Size() int {
return xxx_messageInfo_Precondition.Size(m)
}
func (m *Precondition) XXX_DiscardUnknown() {
xxx_messageInfo_Precondition.DiscardUnknown(m)
}
var xxx_messageInfo_Precondition proto.InternalMessageInfo
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"`
Exists bool `protobuf:"varint,1,opt,name=exists,proto3,oneof"`
}
func (*Precondition_Exists) isPrecondition_ConditionType() {}
type Precondition_UpdateTime struct {
UpdateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=update_time,json=updateTime,proto3,oneof"`
}
func (*Precondition_Exists) isPrecondition_ConditionType() {}
func (*Precondition_UpdateTime) isPrecondition_ConditionType() {}
func (m *Precondition) GetConditionType() isPrecondition_ConditionType {
@ -137,7 +132,7 @@ func (m *Precondition) GetExists() bool {
return false
}
func (m *Precondition) GetUpdateTime() *google_protobuf1.Timestamp {
func (m *Precondition) GetUpdateTime() *timestamp.Timestamp {
if x, ok := m.GetConditionType().(*Precondition_UpdateTime); ok {
return x.UpdateTime
}
@ -189,7 +184,7 @@ func _Precondition_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.B
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
msg := new(timestamp.Timestamp)
err := b.DecodeMessage(msg)
m.ConditionType = &Precondition_UpdateTime{msg}
return true, err
@ -203,11 +198,11 @@ func _Precondition_OneofSizer(msg proto.Message) (n int) {
// condition_type
switch x := m.ConditionType.(type) {
case *Precondition_Exists:
n += proto.SizeVarint(1<<3 | proto.WireVarint)
n += 1 // tag and wire
n += 1
case *Precondition_UpdateTime:
s := proto.Size(x.UpdateTime)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -224,26 +219,50 @@ type TransactionOptions struct {
// Types that are valid to be assigned to Mode:
// *TransactionOptions_ReadOnly_
// *TransactionOptions_ReadWrite_
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
Mode isTransactionOptions_Mode `protobuf_oneof:"mode"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
func (m *TransactionOptions) Reset() { *m = TransactionOptions{} }
func (m *TransactionOptions) String() string { return proto.CompactTextString(m) }
func (*TransactionOptions) ProtoMessage() {}
func (*TransactionOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_common_0837eaa712bfb362, []int{2}
}
func (m *TransactionOptions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransactionOptions.Unmarshal(m, b)
}
func (m *TransactionOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransactionOptions.Marshal(b, m, deterministic)
}
func (dst *TransactionOptions) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransactionOptions.Merge(dst, src)
}
func (m *TransactionOptions) XXX_Size() int {
return xxx_messageInfo_TransactionOptions.Size(m)
}
func (m *TransactionOptions) XXX_DiscardUnknown() {
xxx_messageInfo_TransactionOptions.DiscardUnknown(m)
}
var xxx_messageInfo_TransactionOptions proto.InternalMessageInfo
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"`
ReadOnly *TransactionOptions_ReadOnly `protobuf:"bytes,2,opt,name=read_only,json=readOnly,proto3,oneof"`
}
func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
type TransactionOptions_ReadWrite_ struct {
ReadWrite *TransactionOptions_ReadWrite `protobuf:"bytes,3,opt,name=read_write,json=readWrite,proto3,oneof"`
}
func (*TransactionOptions_ReadOnly_) isTransactionOptions_Mode() {}
func (*TransactionOptions_ReadWrite_) isTransactionOptions_Mode() {}
func (m *TransactionOptions) GetMode() isTransactionOptions_Mode {
@ -326,12 +345,12 @@ func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
switch x := m.Mode.(type) {
case *TransactionOptions_ReadOnly_:
s := proto.Size(x.ReadOnly)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *TransactionOptions_ReadWrite_:
s := proto.Size(x.ReadWrite)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -344,13 +363,35 @@ func _TransactionOptions_OneofSizer(msg proto.Message) (n int) {
// 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"`
RetryTransaction []byte `protobuf:"bytes,1,opt,name=retry_transaction,json=retryTransaction,proto3" json:"retry_transaction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) 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 fileDescriptor_common_0837eaa712bfb362, []int{2, 0}
}
func (m *TransactionOptions_ReadWrite) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransactionOptions_ReadWrite.Unmarshal(m, b)
}
func (m *TransactionOptions_ReadWrite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransactionOptions_ReadWrite.Marshal(b, m, deterministic)
}
func (dst *TransactionOptions_ReadWrite) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransactionOptions_ReadWrite.Merge(dst, src)
}
func (m *TransactionOptions_ReadWrite) XXX_Size() int {
return xxx_messageInfo_TransactionOptions_ReadWrite.Size(m)
}
func (m *TransactionOptions_ReadWrite) XXX_DiscardUnknown() {
xxx_messageInfo_TransactionOptions_ReadWrite.DiscardUnknown(m)
}
var xxx_messageInfo_TransactionOptions_ReadWrite proto.InternalMessageInfo
func (m *TransactionOptions_ReadWrite) GetRetryTransaction() []byte {
if m != nil {
@ -366,20 +407,42 @@ type TransactionOptions_ReadOnly struct {
//
// Types that are valid to be assigned to ConsistencySelector:
// *TransactionOptions_ReadOnly_ReadTime
ConsistencySelector isTransactionOptions_ReadOnly_ConsistencySelector `protobuf_oneof:"consistency_selector"`
ConsistencySelector isTransactionOptions_ReadOnly_ConsistencySelector `protobuf_oneof:"consistency_selector"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
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 fileDescriptor_common_0837eaa712bfb362, []int{2, 1}
}
func (m *TransactionOptions_ReadOnly) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransactionOptions_ReadOnly.Unmarshal(m, b)
}
func (m *TransactionOptions_ReadOnly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransactionOptions_ReadOnly.Marshal(b, m, deterministic)
}
func (dst *TransactionOptions_ReadOnly) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransactionOptions_ReadOnly.Merge(dst, src)
}
func (m *TransactionOptions_ReadOnly) XXX_Size() int {
return xxx_messageInfo_TransactionOptions_ReadOnly.Size(m)
}
func (m *TransactionOptions_ReadOnly) XXX_DiscardUnknown() {
xxx_messageInfo_TransactionOptions_ReadOnly.DiscardUnknown(m)
}
var xxx_messageInfo_TransactionOptions_ReadOnly proto.InternalMessageInfo
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"`
ReadTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3,oneof"`
}
func (*TransactionOptions_ReadOnly_ReadTime) isTransactionOptions_ReadOnly_ConsistencySelector() {}
@ -391,7 +454,7 @@ func (m *TransactionOptions_ReadOnly) GetConsistencySelector() isTransactionOpti
return nil
}
func (m *TransactionOptions_ReadOnly) GetReadTime() *google_protobuf1.Timestamp {
func (m *TransactionOptions_ReadOnly) GetReadTime() *timestamp.Timestamp {
if x, ok := m.GetConsistencySelector().(*TransactionOptions_ReadOnly_ReadTime); ok {
return x.ReadTime
}
@ -428,7 +491,7 @@ func _TransactionOptions_ReadOnly_OneofUnmarshaler(msg proto.Message, tag, wire
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
msg := new(timestamp.Timestamp)
err := b.DecodeMessage(msg)
m.ConsistencySelector = &TransactionOptions_ReadOnly_ReadTime{msg}
return true, err
@ -443,7 +506,7 @@ func _TransactionOptions_ReadOnly_OneofSizer(msg proto.Message) (n int) {
switch x := m.ConsistencySelector.(type) {
case *TransactionOptions_ReadOnly_ReadTime:
s := proto.Size(x.ReadTime)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -461,9 +524,11 @@ func init() {
proto.RegisterType((*TransactionOptions_ReadOnly)(nil), "google.firestore.v1beta1.TransactionOptions.ReadOnly")
}
func init() { proto.RegisterFile("google/firestore/v1beta1/common.proto", fileDescriptor0) }
func init() {
proto.RegisterFile("google/firestore/v1beta1/common.proto", fileDescriptor_common_0837eaa712bfb362)
}
var fileDescriptor0 = []byte{
var fileDescriptor_common_0837eaa712bfb362 = []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,

View File

@ -1,28 +1,34 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/document.proto
package firestore
package firestore // import "google.golang.org/genproto/googleapis/firestore/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _struct "github.com/golang/protobuf/ptypes/struct"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
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"
import latlng "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
// 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 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"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The document's fields.
//
// The map keys represent field names.
@ -47,25 +53,47 @@ type Document struct {
// 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"`
Fields map[string]*Value `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// 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"`
CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" 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"`
UpdateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = Document{} }
func (m *Document) String() string { return proto.CompactTextString(m) }
func (*Document) ProtoMessage() {}
func (*Document) Descriptor() ([]byte, []int) {
return fileDescriptor_document_0cab453ff2a9f3d2, []int{0}
}
func (m *Document) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Document.Unmarshal(m, b)
}
func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Document.Marshal(b, m, deterministic)
}
func (dst *Document) XXX_Merge(src proto.Message) {
xxx_messageInfo_Document.Merge(dst, src)
}
func (m *Document) XXX_Size() int {
return xxx_messageInfo_Document.Size(m)
}
func (m *Document) XXX_DiscardUnknown() {
xxx_messageInfo_Document.DiscardUnknown(m)
}
var xxx_messageInfo_Document proto.InternalMessageInfo
func (m *Document) GetName() string {
if m != nil {
@ -81,14 +109,14 @@ func (m *Document) GetFields() map[string]*Value {
return nil
}
func (m *Document) GetCreateTime() *google_protobuf1.Timestamp {
func (m *Document) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Document) GetUpdateTime() *google_protobuf1.Timestamp {
func (m *Document) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
@ -111,63 +139,105 @@ type Value struct {
// *Value_GeoPointValue
// *Value_ArrayValue
// *Value_MapValue
ValueType isValue_ValueType `protobuf_oneof:"value_type"`
ValueType isValue_ValueType `protobuf_oneof:"value_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
func (m *Value) Reset() { *m = Value{} }
func (m *Value) String() string { return proto.CompactTextString(m) }
func (*Value) ProtoMessage() {}
func (*Value) Descriptor() ([]byte, []int) {
return fileDescriptor_document_0cab453ff2a9f3d2, []int{1}
}
func (m *Value) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Value.Unmarshal(m, b)
}
func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Value.Marshal(b, m, deterministic)
}
func (dst *Value) XXX_Merge(src proto.Message) {
xxx_messageInfo_Value.Merge(dst, src)
}
func (m *Value) XXX_Size() int {
return xxx_messageInfo_Value.Size(m)
}
func (m *Value) XXX_DiscardUnknown() {
xxx_messageInfo_Value.DiscardUnknown(m)
}
var xxx_messageInfo_Value proto.InternalMessageInfo
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"`
NullValue _struct.NullValue `protobuf:"varint,11,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"`
}
type Value_BooleanValue struct {
BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,oneof"`
BooleanValue bool `protobuf:"varint,1,opt,name=boolean_value,json=booleanValue,proto3,oneof"`
}
type Value_IntegerValue struct {
IntegerValue int64 `protobuf:"varint,2,opt,name=integer_value,json=integerValue,oneof"`
IntegerValue int64 `protobuf:"varint,2,opt,name=integer_value,json=integerValue,proto3,oneof"`
}
type Value_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,oneof"`
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type Value_TimestampValue struct {
TimestampValue *google_protobuf1.Timestamp `protobuf:"bytes,10,opt,name=timestamp_value,json=timestampValue,oneof"`
TimestampValue *timestamp.Timestamp `protobuf:"bytes,10,opt,name=timestamp_value,json=timestampValue,proto3,oneof"`
}
type Value_StringValue struct {
StringValue string `protobuf:"bytes,17,opt,name=string_value,json=stringValue,oneof"`
StringValue string `protobuf:"bytes,17,opt,name=string_value,json=stringValue,proto3,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"`
ReferenceValue string `protobuf:"bytes,5,opt,name=reference_value,json=referenceValue,proto3,oneof"`
}
func (*Value_NullValue) isValue_ValueType() {}
func (*Value_BooleanValue) isValue_ValueType() {}
func (*Value_IntegerValue) isValue_ValueType() {}
func (*Value_DoubleValue) isValue_ValueType() {}
type Value_GeoPointValue struct {
GeoPointValue *latlng.LatLng `protobuf:"bytes,8,opt,name=geo_point_value,json=geoPointValue,proto3,oneof"`
}
type Value_ArrayValue struct {
ArrayValue *ArrayValue `protobuf:"bytes,9,opt,name=array_value,json=arrayValue,proto3,oneof"`
}
type Value_MapValue struct {
MapValue *MapValue `protobuf:"bytes,6,opt,name=map_value,json=mapValue,proto3,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_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 (*Value_GeoPointValue) isValue_ValueType() {}
func (*Value_ArrayValue) isValue_ValueType() {}
func (*Value_MapValue) isValue_ValueType() {}
func (m *Value) GetValueType() isValue_ValueType {
if m != nil {
@ -176,11 +246,11 @@ func (m *Value) GetValueType() isValue_ValueType {
return nil
}
func (m *Value) GetNullValue() google_protobuf2.NullValue {
func (m *Value) GetNullValue() _struct.NullValue {
if x, ok := m.GetValueType().(*Value_NullValue); ok {
return x.NullValue
}
return google_protobuf2.NullValue_NULL_VALUE
return _struct.NullValue_NULL_VALUE
}
func (m *Value) GetBooleanValue() bool {
@ -204,7 +274,7 @@ func (m *Value) GetDoubleValue() float64 {
return 0
}
func (m *Value) GetTimestampValue() *google_protobuf1.Timestamp {
func (m *Value) GetTimestampValue() *timestamp.Timestamp {
if x, ok := m.GetValueType().(*Value_TimestampValue); ok {
return x.TimestampValue
}
@ -232,7 +302,7 @@ func (m *Value) GetReferenceValue() string {
return ""
}
func (m *Value) GetGeoPointValue() *google_type.LatLng {
func (m *Value) GetGeoPointValue() *latlng.LatLng {
if x, ok := m.GetValueType().(*Value_GeoPointValue); ok {
return x.GeoPointValue
}
@ -334,7 +404,7 @@ func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer)
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.ValueType = &Value_NullValue{google_protobuf2.NullValue(x)}
m.ValueType = &Value_NullValue{_struct.NullValue(x)}
return true, err
case 1: // value_type.boolean_value
if wire != proto.WireVarint {
@ -361,7 +431,7 @@ func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer)
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_protobuf1.Timestamp)
msg := new(timestamp.Timestamp)
err := b.DecodeMessage(msg)
m.ValueType = &Value_TimestampValue{msg}
return true, err
@ -390,7 +460,7 @@ func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer)
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(google_type.LatLng)
msg := new(latlng.LatLng)
err := b.DecodeMessage(msg)
m.ValueType = &Value_GeoPointValue{msg}
return true, err
@ -420,47 +490,47 @@ func _Value_OneofSizer(msg proto.Message) (n int) {
// value_type
switch x := m.ValueType.(type) {
case *Value_NullValue:
n += proto.SizeVarint(11<<3 | proto.WireVarint)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.NullValue))
case *Value_BooleanValue:
n += proto.SizeVarint(1<<3 | proto.WireVarint)
n += 1 // tag and wire
n += 1
case *Value_IntegerValue:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.IntegerValue))
case *Value_DoubleValue:
n += proto.SizeVarint(3<<3 | proto.WireFixed64)
n += 1 // tag and wire
n += 8
case *Value_TimestampValue:
s := proto.Size(x.TimestampValue)
n += proto.SizeVarint(10<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Value_StringValue:
n += proto.SizeVarint(17<<3 | proto.WireBytes)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(len(x.StringValue)))
n += len(x.StringValue)
case *Value_BytesValue:
n += proto.SizeVarint(18<<3 | proto.WireBytes)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(len(x.BytesValue)))
n += len(x.BytesValue)
case *Value_ReferenceValue:
n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += 1 // tag and wire
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 += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Value_ArrayValue:
s := proto.Size(x.ArrayValue)
n += proto.SizeVarint(9<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Value_MapValue:
s := proto.Size(x.MapValue)
n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -473,13 +543,35 @@ func _Value_OneofSizer(msg proto.Message) (n int) {
// An array value.
type ArrayValue struct {
// Values in the array.
Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = ArrayValue{} }
func (m *ArrayValue) String() string { return proto.CompactTextString(m) }
func (*ArrayValue) ProtoMessage() {}
func (*ArrayValue) Descriptor() ([]byte, []int) {
return fileDescriptor_document_0cab453ff2a9f3d2, []int{2}
}
func (m *ArrayValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ArrayValue.Unmarshal(m, b)
}
func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic)
}
func (dst *ArrayValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_ArrayValue.Merge(dst, src)
}
func (m *ArrayValue) XXX_Size() int {
return xxx_messageInfo_ArrayValue.Size(m)
}
func (m *ArrayValue) XXX_DiscardUnknown() {
xxx_messageInfo_ArrayValue.DiscardUnknown(m)
}
var xxx_messageInfo_ArrayValue proto.InternalMessageInfo
func (m *ArrayValue) GetValues() []*Value {
if m != nil {
@ -496,13 +588,35 @@ type MapValue struct {
// 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"`
Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = MapValue{} }
func (m *MapValue) String() string { return proto.CompactTextString(m) }
func (*MapValue) ProtoMessage() {}
func (*MapValue) Descriptor() ([]byte, []int) {
return fileDescriptor_document_0cab453ff2a9f3d2, []int{3}
}
func (m *MapValue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MapValue.Unmarshal(m, b)
}
func (m *MapValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MapValue.Marshal(b, m, deterministic)
}
func (dst *MapValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_MapValue.Merge(dst, src)
}
func (m *MapValue) XXX_Size() int {
return xxx_messageInfo_MapValue.Size(m)
}
func (m *MapValue) XXX_DiscardUnknown() {
xxx_messageInfo_MapValue.DiscardUnknown(m)
}
var xxx_messageInfo_MapValue proto.InternalMessageInfo
func (m *MapValue) GetFields() map[string]*Value {
if m != nil {
@ -513,14 +627,18 @@ func (m *MapValue) GetFields() map[string]*Value {
func init() {
proto.RegisterType((*Document)(nil), "google.firestore.v1beta1.Document")
proto.RegisterMapType((map[string]*Value)(nil), "google.firestore.v1beta1.Document.FieldsEntry")
proto.RegisterType((*Value)(nil), "google.firestore.v1beta1.Value")
proto.RegisterType((*ArrayValue)(nil), "google.firestore.v1beta1.ArrayValue")
proto.RegisterType((*MapValue)(nil), "google.firestore.v1beta1.MapValue")
proto.RegisterMapType((map[string]*Value)(nil), "google.firestore.v1beta1.MapValue.FieldsEntry")
}
func init() { proto.RegisterFile("google/firestore/v1beta1/document.proto", fileDescriptor1) }
func init() {
proto.RegisterFile("google/firestore/v1beta1/document.proto", fileDescriptor_document_0cab453ff2a9f3d2)
}
var fileDescriptor1 = []byte{
var fileDescriptor_document_0cab453ff2a9f3d2 = []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, 0xfd, 0x3e, 0xb3, 0x89, 0xa2, 0x8a, 0x86, 0x00,

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,25 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/query.proto
package firestore
package firestore // import "google.golang.org/genproto/googleapis/firestore/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
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
// 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 sort direction.
type StructuredQuery_Direction int32
@ -40,7 +46,9 @@ var StructuredQuery_Direction_value = map[string]int32{
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} }
func (StructuredQuery_Direction) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 0}
}
// A composite filter operator.
type StructuredQuery_CompositeFilter_Operator int32
@ -58,14 +66,14 @@ var StructuredQuery_CompositeFilter_Operator_name = map[int32]string{
}
var StructuredQuery_CompositeFilter_Operator_value = map[string]int32{
"OPERATOR_UNSPECIFIED": 0,
"AND": 1,
"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}
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 2, 0}
}
// A field filter operator.
@ -108,7 +116,7 @@ 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}
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 3, 0}
}
// A unary operator.
@ -138,17 +146,17 @@ 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}
return fileDescriptor_query_d85ba3a0f0a37b11, []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"`
Select *StructuredQuery_Projection `protobuf:"bytes,1,opt,name=select,proto3" json:"select,omitempty"`
// The collections to query.
From []*StructuredQuery_CollectionSelector `protobuf:"bytes,2,rep,name=from" json:"from,omitempty"`
From []*StructuredQuery_CollectionSelector `protobuf:"bytes,2,rep,name=from,proto3" json:"from,omitempty"`
// The filter to apply.
Where *StructuredQuery_Filter `protobuf:"bytes,3,opt,name=where" json:"where,omitempty"`
Where *StructuredQuery_Filter `protobuf:"bytes,3,opt,name=where,proto3" json:"where,omitempty"`
// The order to apply to the query results.
//
// Firestore guarantees a stable ordering through the following rules:
@ -167,27 +175,49 @@ type StructuredQuery struct {
// `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"`
OrderBy []*StructuredQuery_Order `protobuf:"bytes,4,rep,name=order_by,json=orderBy,proto3" 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"`
StartAt *Cursor `protobuf:"bytes,7,opt,name=start_at,json=startAt,proto3" 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"`
EndAt *Cursor `protobuf:"bytes,8,opt,name=end_at,json=endAt,proto3" 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"`
Offset int32 `protobuf:"varint,6,opt,name=offset,proto3" 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"`
Limit *wrappers.Int32Value `protobuf:"bytes,5,opt,name=limit,proto3" json:"limit,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = StructuredQuery{} }
func (m *StructuredQuery) String() string { return proto.CompactTextString(m) }
func (*StructuredQuery) ProtoMessage() {}
func (*StructuredQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0}
}
func (m *StructuredQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery.Unmarshal(m, b)
}
func (m *StructuredQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery.Merge(dst, src)
}
func (m *StructuredQuery) XXX_Size() int {
return xxx_messageInfo_StructuredQuery.Size(m)
}
func (m *StructuredQuery) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery proto.InternalMessageInfo
func (m *StructuredQuery) GetSelect() *StructuredQuery_Projection {
if m != nil {
@ -238,7 +268,7 @@ func (m *StructuredQuery) GetOffset() int32 {
return 0
}
func (m *StructuredQuery) GetLimit() *google_protobuf3.Int32Value {
func (m *StructuredQuery) GetLimit() *wrappers.Int32Value {
if m != nil {
return m.Limit
}
@ -249,19 +279,39 @@ func (m *StructuredQuery) GetLimit() *google_protobuf3.Int32Value {
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"`
CollectionId string `protobuf:"bytes,2,opt,name=collection_id,json=collectionId,proto3" 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"`
AllDescendants bool `protobuf:"varint,3,opt,name=all_descendants,json=allDescendants,proto3" json:"all_descendants,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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}
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 0}
}
func (m *StructuredQuery_CollectionSelector) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_CollectionSelector.Unmarshal(m, b)
}
func (m *StructuredQuery_CollectionSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_CollectionSelector.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_CollectionSelector) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_CollectionSelector.Merge(dst, src)
}
func (m *StructuredQuery_CollectionSelector) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_CollectionSelector.Size(m)
}
func (m *StructuredQuery_CollectionSelector) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_CollectionSelector.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_CollectionSelector proto.InternalMessageInfo
func (m *StructuredQuery_CollectionSelector) GetCollectionId() string {
if m != nil {
@ -285,31 +335,57 @@ type StructuredQuery_Filter struct {
// *StructuredQuery_Filter_CompositeFilter
// *StructuredQuery_Filter_FieldFilter
// *StructuredQuery_Filter_UnaryFilter
FilterType isStructuredQuery_Filter_FilterType `protobuf_oneof:"filter_type"`
FilterType isStructuredQuery_Filter_FilterType `protobuf_oneof:"filter_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
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 fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 1}
}
func (m *StructuredQuery_Filter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_Filter.Unmarshal(m, b)
}
func (m *StructuredQuery_Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_Filter.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_Filter) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_Filter.Merge(dst, src)
}
func (m *StructuredQuery_Filter) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_Filter.Size(m)
}
func (m *StructuredQuery_Filter) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_Filter.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_Filter proto.InternalMessageInfo
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"`
CompositeFilter *StructuredQuery_CompositeFilter `protobuf:"bytes,1,opt,name=composite_filter,json=compositeFilter,proto3,oneof"`
}
type StructuredQuery_Filter_FieldFilter struct {
FieldFilter *StructuredQuery_FieldFilter `protobuf:"bytes,2,opt,name=field_filter,json=fieldFilter,oneof"`
FieldFilter *StructuredQuery_FieldFilter `protobuf:"bytes,2,opt,name=field_filter,json=fieldFilter,proto3,oneof"`
}
type StructuredQuery_Filter_UnaryFilter struct {
UnaryFilter *StructuredQuery_UnaryFilter `protobuf:"bytes,3,opt,name=unary_filter,json=unaryFilter,oneof"`
UnaryFilter *StructuredQuery_UnaryFilter `protobuf:"bytes,3,opt,name=unary_filter,json=unaryFilter,proto3,oneof"`
}
func (*StructuredQuery_Filter_CompositeFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_FieldFilter) isStructuredQuery_Filter_FilterType() {}
func (*StructuredQuery_Filter_UnaryFilter) 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 {
@ -412,17 +488,17 @@ func _StructuredQuery_Filter_OneofSizer(msg proto.Message) (n int) {
switch x := m.FilterType.(type) {
case *StructuredQuery_Filter_CompositeFilter:
s := proto.Size(x.CompositeFilter)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_FieldFilter:
s := proto.Size(x.FieldFilter)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StructuredQuery_Filter_UnaryFilter:
s := proto.Size(x.UnaryFilter)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -435,18 +511,38 @@ func _StructuredQuery_Filter_OneofSizer(msg proto.Message) (n int) {
// 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"`
Op StructuredQuery_CompositeFilter_Operator `protobuf:"varint,1,opt,name=op,proto3,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"`
Filters []*StructuredQuery_Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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}
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 2}
}
func (m *StructuredQuery_CompositeFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_CompositeFilter.Unmarshal(m, b)
}
func (m *StructuredQuery_CompositeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_CompositeFilter.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_CompositeFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_CompositeFilter.Merge(dst, src)
}
func (m *StructuredQuery_CompositeFilter) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_CompositeFilter.Size(m)
}
func (m *StructuredQuery_CompositeFilter) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_CompositeFilter.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_CompositeFilter proto.InternalMessageInfo
func (m *StructuredQuery_CompositeFilter) GetOp() StructuredQuery_CompositeFilter_Operator {
if m != nil {
@ -465,17 +561,39 @@ func (m *StructuredQuery_CompositeFilter) GetFilters() []*StructuredQuery_Filter
// 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"`
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field,proto3" 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"`
Op StructuredQuery_FieldFilter_Operator `protobuf:"varint,2,opt,name=op,proto3,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"`
Value *Value `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) 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 fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 3}
}
func (m *StructuredQuery_FieldFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_FieldFilter.Unmarshal(m, b)
}
func (m *StructuredQuery_FieldFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_FieldFilter.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_FieldFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_FieldFilter.Merge(dst, src)
}
func (m *StructuredQuery_FieldFilter) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_FieldFilter.Size(m)
}
func (m *StructuredQuery_FieldFilter) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_FieldFilter.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_FieldFilter proto.InternalMessageInfo
func (m *StructuredQuery_FieldFilter) GetField() *StructuredQuery_FieldReference {
if m != nil {
@ -501,25 +619,54 @@ func (m *StructuredQuery_FieldFilter) GetValue() *Value {
// 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"`
Op StructuredQuery_UnaryFilter_Operator `protobuf:"varint,1,opt,name=op,proto3,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"`
OperandType isStructuredQuery_UnaryFilter_OperandType `protobuf_oneof:"operand_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
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 fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 4}
}
func (m *StructuredQuery_UnaryFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_UnaryFilter.Unmarshal(m, b)
}
func (m *StructuredQuery_UnaryFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_UnaryFilter.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_UnaryFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_UnaryFilter.Merge(dst, src)
}
func (m *StructuredQuery_UnaryFilter) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_UnaryFilter.Size(m)
}
func (m *StructuredQuery_UnaryFilter) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_UnaryFilter.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_UnaryFilter proto.InternalMessageInfo
func (m *StructuredQuery_UnaryFilter) GetOp() StructuredQuery_UnaryFilter_Operator {
if m != nil {
return m.Op
}
return StructuredQuery_UnaryFilter_OPERATOR_UNSPECIFIED
}
type isStructuredQuery_UnaryFilter_OperandType interface {
isStructuredQuery_UnaryFilter_OperandType()
}
type StructuredQuery_UnaryFilter_Field struct {
Field *StructuredQuery_FieldReference `protobuf:"bytes,2,opt,name=field,oneof"`
Field *StructuredQuery_FieldReference `protobuf:"bytes,2,opt,name=field,proto3,oneof"`
}
func (*StructuredQuery_UnaryFilter_Field) isStructuredQuery_UnaryFilter_OperandType() {}
@ -531,13 +678,6 @@ func (m *StructuredQuery_UnaryFilter) GetOperandType() isStructuredQuery_UnaryFi
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
@ -590,7 +730,7 @@ func _StructuredQuery_UnaryFilter_OneofSizer(msg proto.Message) (n int) {
switch x := m.OperandType.(type) {
case *StructuredQuery_UnaryFilter_Field:
s := proto.Size(x.Field)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -603,15 +743,37 @@ func _StructuredQuery_UnaryFilter_OneofSizer(msg proto.Message) (n int) {
// 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"`
Field *StructuredQuery_FieldReference `protobuf:"bytes,1,opt,name=field,proto3" 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"`
Direction StructuredQuery_Direction `protobuf:"varint,2,opt,name=direction,proto3,enum=google.firestore.v1beta1.StructuredQuery_Direction" json:"direction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) 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 fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 5}
}
func (m *StructuredQuery_Order) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_Order.Unmarshal(m, b)
}
func (m *StructuredQuery_Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_Order.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_Order) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_Order.Merge(dst, src)
}
func (m *StructuredQuery_Order) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_Order.Size(m)
}
func (m *StructuredQuery_Order) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_Order.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_Order proto.InternalMessageInfo
func (m *StructuredQuery_Order) GetField() *StructuredQuery_FieldReference {
if m != nil {
@ -629,15 +791,35 @@ func (m *StructuredQuery_Order) GetDirection() StructuredQuery_Direction {
// 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"`
FieldPath string `protobuf:"bytes,2,opt,name=field_path,json=fieldPath,proto3" json:"field_path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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}
return fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 6}
}
func (m *StructuredQuery_FieldReference) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_FieldReference.Unmarshal(m, b)
}
func (m *StructuredQuery_FieldReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_FieldReference.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_FieldReference) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_FieldReference.Merge(dst, src)
}
func (m *StructuredQuery_FieldReference) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_FieldReference.Size(m)
}
func (m *StructuredQuery_FieldReference) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_FieldReference.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_FieldReference proto.InternalMessageInfo
func (m *StructuredQuery_FieldReference) GetFieldPath() string {
if m != nil {
@ -652,13 +834,35 @@ type StructuredQuery_Projection struct {
//
// 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"`
Fields []*StructuredQuery_FieldReference `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) 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 fileDescriptor_query_d85ba3a0f0a37b11, []int{0, 7}
}
func (m *StructuredQuery_Projection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StructuredQuery_Projection.Unmarshal(m, b)
}
func (m *StructuredQuery_Projection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StructuredQuery_Projection.Marshal(b, m, deterministic)
}
func (dst *StructuredQuery_Projection) XXX_Merge(src proto.Message) {
xxx_messageInfo_StructuredQuery_Projection.Merge(dst, src)
}
func (m *StructuredQuery_Projection) XXX_Size() int {
return xxx_messageInfo_StructuredQuery_Projection.Size(m)
}
func (m *StructuredQuery_Projection) XXX_DiscardUnknown() {
xxx_messageInfo_StructuredQuery_Projection.DiscardUnknown(m)
}
var xxx_messageInfo_StructuredQuery_Projection proto.InternalMessageInfo
func (m *StructuredQuery_Projection) GetFields() []*StructuredQuery_FieldReference {
if m != nil {
@ -673,16 +877,38 @@ type Cursor struct {
// 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"`
Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" 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"`
Before bool `protobuf:"varint,2,opt,name=before,proto3" json:"before,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = Cursor{} }
func (m *Cursor) String() string { return proto.CompactTextString(m) }
func (*Cursor) ProtoMessage() {}
func (*Cursor) Descriptor() ([]byte, []int) {
return fileDescriptor_query_d85ba3a0f0a37b11, []int{1}
}
func (m *Cursor) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Cursor.Unmarshal(m, b)
}
func (m *Cursor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Cursor.Marshal(b, m, deterministic)
}
func (dst *Cursor) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cursor.Merge(dst, src)
}
func (m *Cursor) XXX_Size() int {
return xxx_messageInfo_Cursor.Size(m)
}
func (m *Cursor) XXX_DiscardUnknown() {
xxx_messageInfo_Cursor.DiscardUnknown(m)
}
var xxx_messageInfo_Cursor proto.InternalMessageInfo
func (m *Cursor) GetValues() []*Value {
if m != nil {
@ -715,9 +941,11 @@ func init() {
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) }
func init() {
proto.RegisterFile("google/firestore/v1beta1/query.proto", fileDescriptor_query_d85ba3a0f0a37b11)
}
var fileDescriptor3 = []byte{
var fileDescriptor_query_d85ba3a0f0a37b11 = []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,

View File

@ -1,19 +1,25 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/firestore/v1beta1/write.proto
package firestore
package firestore // import "google.golang.org/genproto/googleapis/firestore/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
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 value that is calculated by the server.
type DocumentTransform_FieldTransform_ServerValue int32
@ -38,7 +44,7 @@ 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}
return fileDescriptor_write_9914518038802de9, []int{1, 0, 0}
}
// A write on a document.
@ -59,34 +65,60 @@ type Write struct {
// 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"`
UpdateMask *DocumentMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" 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"`
CurrentDocument *Precondition `protobuf:"bytes,4,opt,name=current_document,json=currentDocument,proto3" json:"current_document,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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} }
func (m *Write) Reset() { *m = Write{} }
func (m *Write) String() string { return proto.CompactTextString(m) }
func (*Write) ProtoMessage() {}
func (*Write) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{0}
}
func (m *Write) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Write.Unmarshal(m, b)
}
func (m *Write) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Write.Marshal(b, m, deterministic)
}
func (dst *Write) XXX_Merge(src proto.Message) {
xxx_messageInfo_Write.Merge(dst, src)
}
func (m *Write) XXX_Size() int {
return xxx_messageInfo_Write.Size(m)
}
func (m *Write) XXX_DiscardUnknown() {
xxx_messageInfo_Write.DiscardUnknown(m)
}
var xxx_messageInfo_Write proto.InternalMessageInfo
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"`
Update *Document `protobuf:"bytes,1,opt,name=update,proto3,oneof"`
}
func (*Write_Update) isWrite_Operation() {}
func (*Write_Delete) isWrite_Operation() {}
type Write_Delete struct {
Delete string `protobuf:"bytes,2,opt,name=delete,proto3,oneof"`
}
type Write_Transform struct {
Transform *DocumentTransform `protobuf:"bytes,6,opt,name=transform,proto3,oneof"`
}
func (*Write_Update) isWrite_Operation() {}
func (*Write_Delete) isWrite_Operation() {}
func (*Write_Transform) isWrite_Operation() {}
func (m *Write) GetOperation() isWrite_Operation {
@ -201,16 +233,16 @@ func _Write_OneofSizer(msg proto.Message) (n int) {
switch x := m.Operation.(type) {
case *Write_Update:
s := proto.Size(x.Update)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Write_Delete:
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += 1 // tag and wire
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 += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@ -223,17 +255,39 @@ func _Write_OneofSizer(msg proto.Message) (n int) {
// 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"`
Document string `protobuf:"bytes,1,opt,name=document,proto3" 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"`
FieldTransforms []*DocumentTransform_FieldTransform `protobuf:"bytes,2,rep,name=field_transforms,json=fieldTransforms,proto3" json:"field_transforms,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DocumentTransform{} }
func (m *DocumentTransform) String() string { return proto.CompactTextString(m) }
func (*DocumentTransform) ProtoMessage() {}
func (*DocumentTransform) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{1}
}
func (m *DocumentTransform) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentTransform.Unmarshal(m, b)
}
func (m *DocumentTransform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentTransform.Marshal(b, m, deterministic)
}
func (dst *DocumentTransform) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentTransform.Merge(dst, src)
}
func (m *DocumentTransform) XXX_Size() int {
return xxx_messageInfo_DocumentTransform.Size(m)
}
func (m *DocumentTransform) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentTransform.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentTransform proto.InternalMessageInfo
func (m *DocumentTransform) GetDocument() string {
if m != nil {
@ -253,19 +307,46 @@ func (m *DocumentTransform) GetFieldTransforms() []*DocumentTransform_FieldTrans
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"`
FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" 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"`
TransformType isDocumentTransform_FieldTransform_TransformType `protobuf_oneof:"transform_type"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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}
return fileDescriptor_write_9914518038802de9, []int{1, 0}
}
func (m *DocumentTransform_FieldTransform) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentTransform_FieldTransform.Unmarshal(m, b)
}
func (m *DocumentTransform_FieldTransform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentTransform_FieldTransform.Marshal(b, m, deterministic)
}
func (dst *DocumentTransform_FieldTransform) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentTransform_FieldTransform.Merge(dst, src)
}
func (m *DocumentTransform_FieldTransform) XXX_Size() int {
return xxx_messageInfo_DocumentTransform_FieldTransform.Size(m)
}
func (m *DocumentTransform_FieldTransform) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentTransform_FieldTransform.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentTransform_FieldTransform proto.InternalMessageInfo
func (m *DocumentTransform_FieldTransform) GetFieldPath() string {
if m != nil {
return m.FieldPath
}
return ""
}
type isDocumentTransform_FieldTransform_TransformType interface {
@ -273,7 +354,7 @@ type isDocumentTransform_FieldTransform_TransformType interface {
}
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"`
SetToServerValue DocumentTransform_FieldTransform_ServerValue `protobuf:"varint,2,opt,name=set_to_server_value,json=setToServerValue,proto3,enum=google.firestore.v1beta1.DocumentTransform_FieldTransform_ServerValue,oneof"`
}
func (*DocumentTransform_FieldTransform_SetToServerValue) isDocumentTransform_FieldTransform_TransformType() {
@ -286,13 +367,6 @@ func (m *DocumentTransform_FieldTransform) GetTransformType() isDocumentTransfor
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
@ -341,7 +415,7 @@ func _DocumentTransform_FieldTransform_OneofSizer(msg proto.Message) (n int) {
// transform_type
switch x := m.TransformType.(type) {
case *DocumentTransform_FieldTransform_SetToServerValue:
n += proto.SizeVarint(2<<3 | proto.WireVarint)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.SetToServerValue))
case nil:
default:
@ -357,18 +431,40 @@ type WriteResult struct {
//
// 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"`
UpdateTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=update_time,json=updateTime,proto3" 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"`
TransformResults []*Value `protobuf:"bytes,2,rep,name=transform_results,json=transformResults,proto3" json:"transform_results,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = WriteResult{} }
func (m *WriteResult) String() string { return proto.CompactTextString(m) }
func (*WriteResult) ProtoMessage() {}
func (*WriteResult) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{2}
}
func (m *WriteResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WriteResult.Unmarshal(m, b)
}
func (m *WriteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WriteResult.Marshal(b, m, deterministic)
}
func (dst *WriteResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_WriteResult.Merge(dst, src)
}
func (m *WriteResult) XXX_Size() int {
return xxx_messageInfo_WriteResult.Size(m)
}
func (m *WriteResult) XXX_DiscardUnknown() {
xxx_messageInfo_WriteResult.DiscardUnknown(m)
}
func (m *WriteResult) GetUpdateTime() *google_protobuf1.Timestamp {
var xxx_messageInfo_WriteResult proto.InternalMessageInfo
func (m *WriteResult) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
@ -393,17 +489,39 @@ 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"`
Document *Document `protobuf:"bytes,1,opt,name=document,proto3" 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"`
TargetIds []int32 `protobuf:"varint,5,rep,packed,name=target_ids,json=targetIds,proto3" 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"`
RemovedTargetIds []int32 `protobuf:"varint,6,rep,packed,name=removed_target_ids,json=removedTargetIds,proto3" json:"removed_target_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DocumentChange{} }
func (m *DocumentChange) String() string { return proto.CompactTextString(m) }
func (*DocumentChange) ProtoMessage() {}
func (*DocumentChange) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{3}
}
func (m *DocumentChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentChange.Unmarshal(m, b)
}
func (m *DocumentChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentChange.Marshal(b, m, deterministic)
}
func (dst *DocumentChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentChange.Merge(dst, src)
}
func (m *DocumentChange) XXX_Size() int {
return xxx_messageInfo_DocumentChange.Size(m)
}
func (m *DocumentChange) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentChange.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentChange proto.InternalMessageInfo
func (m *DocumentChange) GetDocument() *Document {
if m != nil {
@ -435,19 +553,41 @@ func (m *DocumentChange) GetRemovedTargetIds() []int32 {
// 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"`
Document string `protobuf:"bytes,1,opt,name=document,proto3" 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"`
RemovedTargetIds []int32 `protobuf:"varint,6,rep,packed,name=removed_target_ids,json=removedTargetIds,proto3" 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"`
ReadTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DocumentDelete{} }
func (m *DocumentDelete) String() string { return proto.CompactTextString(m) }
func (*DocumentDelete) ProtoMessage() {}
func (*DocumentDelete) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{4}
}
func (m *DocumentDelete) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentDelete.Unmarshal(m, b)
}
func (m *DocumentDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentDelete.Marshal(b, m, deterministic)
}
func (dst *DocumentDelete) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentDelete.Merge(dst, src)
}
func (m *DocumentDelete) XXX_Size() int {
return xxx_messageInfo_DocumentDelete.Size(m)
}
func (m *DocumentDelete) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentDelete.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentDelete proto.InternalMessageInfo
func (m *DocumentDelete) GetDocument() string {
if m != nil {
@ -463,7 +603,7 @@ func (m *DocumentDelete) GetRemovedTargetIds() []int32 {
return nil
}
func (m *DocumentDelete) GetReadTime() *google_protobuf1.Timestamp {
func (m *DocumentDelete) GetReadTime() *timestamp.Timestamp {
if m != nil {
return m.ReadTime
}
@ -480,19 +620,41 @@ func (m *DocumentDelete) GetReadTime() *google_protobuf1.Timestamp {
// 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"`
Document string `protobuf:"bytes,1,opt,name=document,proto3" 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"`
RemovedTargetIds []int32 `protobuf:"varint,2,rep,packed,name=removed_target_ids,json=removedTargetIds,proto3" 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"`
ReadTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = DocumentRemove{} }
func (m *DocumentRemove) String() string { return proto.CompactTextString(m) }
func (*DocumentRemove) ProtoMessage() {}
func (*DocumentRemove) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{5}
}
func (m *DocumentRemove) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DocumentRemove.Unmarshal(m, b)
}
func (m *DocumentRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DocumentRemove.Marshal(b, m, deterministic)
}
func (dst *DocumentRemove) XXX_Merge(src proto.Message) {
xxx_messageInfo_DocumentRemove.Merge(dst, src)
}
func (m *DocumentRemove) XXX_Size() int {
return xxx_messageInfo_DocumentRemove.Size(m)
}
func (m *DocumentRemove) XXX_DiscardUnknown() {
xxx_messageInfo_DocumentRemove.DiscardUnknown(m)
}
var xxx_messageInfo_DocumentRemove proto.InternalMessageInfo
func (m *DocumentRemove) GetDocument() string {
if m != nil {
@ -508,7 +670,7 @@ func (m *DocumentRemove) GetRemovedTargetIds() []int32 {
return nil
}
func (m *DocumentRemove) GetReadTime() *google_protobuf1.Timestamp {
func (m *DocumentRemove) GetReadTime() *timestamp.Timestamp {
if m != nil {
return m.ReadTime
}
@ -518,18 +680,40 @@ func (m *DocumentRemove) GetReadTime() *google_protobuf1.Timestamp {
// 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"`
TargetId int32 `protobuf:"varint,1,opt,name=target_id,json=targetId,proto3" 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"`
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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) Reset() { *m = ExistenceFilter{} }
func (m *ExistenceFilter) String() string { return proto.CompactTextString(m) }
func (*ExistenceFilter) ProtoMessage() {}
func (*ExistenceFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_write_9914518038802de9, []int{6}
}
func (m *ExistenceFilter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExistenceFilter.Unmarshal(m, b)
}
func (m *ExistenceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExistenceFilter.Marshal(b, m, deterministic)
}
func (dst *ExistenceFilter) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExistenceFilter.Merge(dst, src)
}
func (m *ExistenceFilter) XXX_Size() int {
return xxx_messageInfo_ExistenceFilter.Size(m)
}
func (m *ExistenceFilter) XXX_DiscardUnknown() {
xxx_messageInfo_ExistenceFilter.DiscardUnknown(m)
}
var xxx_messageInfo_ExistenceFilter proto.InternalMessageInfo
func (m *ExistenceFilter) GetTargetId() int32 {
if m != nil {
@ -557,9 +741,11 @@ func init() {
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) }
func init() {
proto.RegisterFile("google/firestore/v1beta1/write.proto", fileDescriptor_write_9914518038802de9)
}
var fileDescriptor4 = []byte{
var fileDescriptor_write_9914518038802de9 = []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,