aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos/protos/google/firestore
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Protos/protos/google/firestore')
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/common.proto3
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/document.proto7
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto76
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/query.proto6
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/write.proto45
5 files changed, 106 insertions, 31 deletions
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/common.proto b/Firestore/Protos/protos/google/firestore/v1beta1/common.proto
index e624323..5ceb7b9 100644
--- a/Firestore/Protos/protos/google/firestore/v1beta1/common.proto
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/common.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.firestore.v1beta1";
option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
// A set of field paths on a document.
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/document.proto b/Firestore/Protos/protos/google/firestore/v1beta1/document.proto
index cf6001d..cd84c7a 100644
--- a/Firestore/Protos/protos/google/firestore/v1beta1/document.proto
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/document.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ option java_multiple_files = true;
option java_outer_classname = "DocumentProto";
option java_package = "com.google.firestore.v1beta1";
option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
// A Firestore document.
@@ -42,7 +43,7 @@ message Document {
// The map keys represent field names.
//
// A simple field name contains only characters `a` to `z`, `A` to `Z`,
- // `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
+ // `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
// `foo_bar_17`.
//
// Field names matching the regular expression `__.*__` are reserved. Reserved
@@ -72,7 +73,7 @@ message Document {
// Output only. The time at which the document was last changed.
//
- // This value is initally set to the `create_time` then increases
+ // This value is initially 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.
google.protobuf.Timestamp update_time = 4;
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto
index 3939caa..c7e8561 100644
--- a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -31,6 +31,7 @@ option java_multiple_files = true;
option java_outer_classname = "FirestoreProto";
option java_package = "com.google.firestore.v1beta1";
option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
// Specification of the Firestore API.
@@ -55,27 +56,39 @@ option objc_class_prefix = "GCFS";
service Firestore {
// Gets a single document.
rpc GetDocument(GetDocumentRequest) returns (Document) {
- option (google.api.http) = { get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" };
+ option (google.api.http) = {
+ get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}"
+ };
}
// Lists documents.
rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
- option (google.api.http) = { get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" };
+ option (google.api.http) = {
+ get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}"
+ };
}
// Creates a new document.
rpc CreateDocument(CreateDocumentRequest) returns (Document) {
- option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}" body: "document" };
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}"
+ body: "document"
+ };
}
// Updates or inserts a document.
rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
- option (google.api.http) = { patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" };
+ option (google.api.http) = {
+ patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}"
+ body: "document"
+ };
}
// Deletes a document.
rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = { delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" };
+ option (google.api.http) = {
+ delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}"
+ };
}
// Gets multiple documents.
@@ -83,42 +96,74 @@ service Firestore {
// Documents returned by this method are not guaranteed to be returned in the
// same order that they were requested.
rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet"
+ body: "*"
+ };
}
// Starts a new transaction.
rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction"
+ body: "*"
+ };
}
// Commits a transaction, while optionally updating documents.
rpc Commit(CommitRequest) returns (CommitResponse) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:commit"
+ body: "*"
+ };
}
// Rolls back a transaction.
rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback"
+ body: "*"
+ };
}
// Runs a query.
rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) {
- option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:runQuery"
+ body: "*"
+ }
+ };
}
// Streams batches of document updates and deletes, in order.
rpc Write(stream WriteRequest) returns (stream WriteResponse) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:write" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:write"
+ body: "*"
+ };
}
// Listens to changes.
rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
- option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:listen" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{database=projects/*/databases/*}/documents:listen"
+ body: "*"
+ };
}
// Lists all the collection IDs underneath a document.
rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) {
- option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" };
+ option (google.api.http) = {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds"
+ body: "*"
+ additional_bindings {
+ post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds"
+ body: "*"
+ }
+ };
}
}
@@ -356,8 +401,7 @@ message CommitRequest {
// Always executed atomically and in order.
repeated Write writes = 2;
- // If non-empty, applies all writes in this transaction, and commits it.
- // Otherwise, applies the writes as if they were in their own transaction.
+ // If set, applies all writes in this transaction, and commits it.
bytes transaction = 3;
}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/query.proto b/Firestore/Protos/protos/google/firestore/v1beta1/query.proto
index d19b022..5f5b0cf 100644
--- a/Firestore/Protos/protos/google/firestore/v1beta1/query.proto
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/query.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ option java_multiple_files = true;
option java_outer_classname = "QueryProto";
option java_package = "com.google.firestore.v1beta1";
option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
// A Firestore query.
@@ -98,6 +99,9 @@ message StructuredQuery {
// Equal.
EQUAL = 5;
+
+ // Contains. Requires that the field is an array.
+ ARRAY_CONTAINS = 7;
}
// The field to filter by.
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/write.proto b/Firestore/Protos/protos/google/firestore/v1beta1/write.proto
index b6e9d5f..3f4732b 100644
--- a/Firestore/Protos/protos/google/firestore/v1beta1/write.proto
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/write.proto
@@ -1,4 +1,4 @@
-// Copyright 2017 Google Inc.
+// Copyright 2018 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ option java_multiple_files = true;
option java_outer_classname = "WriteProto";
option java_package = "com.google.firestore.v1beta1";
option objc_class_prefix = "GCFS";
+option php_namespace = "Google\\Cloud\\Firestore\\V1beta1";
// A write on a document.
@@ -40,11 +41,6 @@ message Write {
// `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
string delete = 2;
- // The name of a document on which to verify the `current_document`
- // precondition.
- // This only requires read access to the document.
- string verify = 5;
-
// Applies a tranformation to a document.
// At most one `transform` per document is allowed in a given request.
// An `update` cannot follow a `transform` on the same document in a given
@@ -55,9 +51,10 @@ message Write {
// The fields to update in this write.
//
// This field can be set only when the operation is `update`.
- // None of the field paths in the mask may contain a reserved name.
- // If the document exists on the server and has fields not referenced in the
- // mask, they are left unchanged.
+ // If the mask is not set for an `update` and the document exists, any
+ // existing data will be overwritten.
+ // If the mask is set and the document on the server has fields not covered by
+ // the mask, they are left unchanged.
// Fields referenced in the mask, but not present in the input document, are
// deleted from the document on the server.
// The field paths in this mask must not contain a reserved field name.
@@ -78,7 +75,8 @@ message DocumentTransform {
// Unspecified. This value must not be used.
SERVER_VALUE_UNSPECIFIED = 0;
- // The time at which the server processed the request.
+ // The time at which the server processed the request, with millisecond
+ // precision.
REQUEST_TIME = 1;
}
@@ -90,6 +88,32 @@ message DocumentTransform {
oneof transform_type {
// Sets the field to the given server value.
ServerValue set_to_server_value = 2;
+
+ // Append the given elements in order if they are not already present in
+ // the current field value.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // first set to the empty array.
+ //
+ // Equivalent numbers of different types (e.g. 3L and 3.0) are
+ // considered equal when checking if a value is missing.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // If the input contains multiple equivalent values, only the first will
+ // be considered.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue append_missing_elements = 6;
+
+ // Remove all of the given elements from the array in the field.
+ // If the field is not an array, or if the field does not yet exist, it is
+ // set to the empty array.
+ //
+ // Equivalent numbers of the different types (e.g. 3L and 3.0) are
+ // considered equal when deciding whether an element should be removed.
+ // NaN is equal to NaN, and Null is equal to Null.
+ // This will remove all equivalent values if there are duplicates.
+ //
+ // The corresponding transform_result will be the null value.
+ ArrayValue remove_all_from_array = 7;
}
}
@@ -98,6 +122,7 @@ message DocumentTransform {
// The list of transformations to apply to the fields of the document, in
// order.
+ // This must not be empty.
repeated FieldTransform field_transforms = 2;
}