Skip to content

Commit

Permalink
Synchronize new proto/yaml changes.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 235605853
  • Loading branch information
Google APIs authored and Copybara-Service committed Feb 25, 2019
1 parent 1c32fb1 commit 58ac033
Show file tree
Hide file tree
Showing 17 changed files with 406 additions and 299 deletions.
14 changes: 9 additions & 5 deletions google/datastore/admin/v1/datastore_admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ service DatastoreAdmin {
// used once the associated operation is done. If an export operation is
// cancelled before completion it may leave partial data behind in Google
// Cloud Storage.
rpc ExportEntities(ExportEntitiesRequest) returns (google.longrunning.Operation) {
rpc ExportEntities(ExportEntitiesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/projects/{project_id}:export"
body: "*"
Expand All @@ -108,7 +109,8 @@ service DatastoreAdmin {
// progress can be monitored and managed via the Operation resource that is
// created. If an ImportEntities operation is cancelled, it is possible
// that a subset of the data has already been imported to Cloud Datastore.
rpc ImportEntities(ImportEntitiesRequest) returns (google.longrunning.Operation) {
rpc ImportEntities(ImportEntitiesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1/projects/{project_id}:import"
body: "*"
Expand Down Expand Up @@ -217,8 +219,8 @@ message ExportEntitiesRequest {
//
// The resulting files will be nested deeper than the specified URL prefix.
// The final output URL will be provided in the
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] field. That
// value should be used for subsequent ImportEntities operations.
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
// field. That value should be used for subsequent ImportEntities operations.
//
// By nesting the data files deeper, the same Cloud Storage bucket can be used
// in multiple ExportEntities operations without conflict.
Expand Down Expand Up @@ -303,7 +305,9 @@ message ImportEntitiesMetadata {
EntityFilter entity_filter = 4;

// The location of the import metadata file. This will be the same value as
// the [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url] field.
// the
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
// field.
string input_url = 5;
}

Expand Down
10 changes: 6 additions & 4 deletions google/datastore/admin/v1beta1/datastore_admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ option java_multiple_files = true;
option java_outer_classname = "DatastoreAdminProto";
option java_package = "com.google.datastore.admin.v1beta1";


// Google Cloud Datastore Admin API
//
// The Datastore Admin API provides several admin services for Cloud Datastore.
Expand Down Expand Up @@ -87,7 +86,8 @@ service DatastoreAdmin {
// used once the associated operation is done. If an export operation is
// cancelled before completion it may leave partial data behind in Google
// Cloud Storage.
rpc ExportEntities(ExportEntitiesRequest) returns (google.longrunning.Operation) {
rpc ExportEntities(ExportEntitiesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/projects/{project_id}:export"
body: "*"
Expand All @@ -99,7 +99,8 @@ service DatastoreAdmin {
// progress can be monitored and managed via the Operation resource that is
// created. If an ImportEntities operation is cancelled, it is possible
// that a subset of the data has already been imported to Cloud Datastore.
rpc ImportEntities(ImportEntitiesRequest) returns (google.longrunning.Operation) {
rpc ImportEntities(ImportEntitiesRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/projects/{project_id}:import"
body: "*"
Expand Down Expand Up @@ -278,7 +279,8 @@ message ImportEntitiesMetadata {
EntityFilter entity_filter = 4;

// The location of the import metadata file. This will be the same value as
// the [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url]
// the
// [google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url][google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url]
// field.
string input_url = 5;
}
Expand Down
51 changes: 28 additions & 23 deletions google/datastore/v1/datastore.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ option java_outer_classname = "DatastoreProto";
option java_package = "com.google.datastore.v1";
option php_namespace = "Google\\Cloud\\Datastore\\V1";


// Each RPC normalizes the partition IDs of the keys in its input entities,
// and always returns entities with keys with normalized partition IDs.
// This applies to all keys and entities, including those in values, except keys
Expand All @@ -53,7 +52,8 @@ service Datastore {
}

// Begins a new transaction.
rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
rpc BeginTransaction(BeginTransactionRequest)
returns (BeginTransactionResponse) {
option (google.api.http) = {
post: "/v1/projects/{project_id}:beginTransaction"
body: "*"
Expand Down Expand Up @@ -150,7 +150,8 @@ message RunQueryRequest {
}
}

// The response for [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
// The response for
// [Datastore.RunQuery][google.datastore.v1.Datastore.RunQuery].
message RunQueryResponse {
// A batch of query results (always present).
QueryResultBatch batch = 1;
Expand All @@ -159,7 +160,8 @@ message RunQueryResponse {
Query query = 2;
}

// The request for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
// The request for
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
message BeginTransactionRequest {
// The ID of the project against which to make the request.
string project_id = 8;
Expand All @@ -168,7 +170,8 @@ message BeginTransactionRequest {
TransactionOptions transaction_options = 10;
}

// The response for [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
// The response for
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction].
message BeginTransactionResponse {
// The transaction identifier (always present).
bytes transaction = 1;
Expand All @@ -184,11 +187,10 @@ message RollbackRequest {
bytes transaction = 1;
}

// The response for [Datastore.Rollback][google.datastore.v1.Datastore.Rollback].
// (an empty message).
message RollbackResponse {

}
// The response for
// [Datastore.Rollback][google.datastore.v1.Datastore.Rollback]. (an empty
// message).
message RollbackResponse {}

// The request for [Datastore.Commit][google.datastore.v1.Datastore.Commit].
message CommitRequest {
Expand All @@ -198,7 +200,8 @@ message CommitRequest {
MODE_UNSPECIFIED = 0;

// Transactional: The mutations are either all applied, or none are applied.
// Learn about transactions [here](https://cloud.google.com/datastore/docs/concepts/transactions).
// Learn about transactions
// [here](https://cloud.google.com/datastore/docs/concepts/transactions).
TRANSACTIONAL = 1;

// Non-transactional: The mutations may not apply as all or none.
Expand Down Expand Up @@ -246,7 +249,8 @@ message CommitResponse {
int32 index_updates = 4;
}

// The request for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
// The request for
// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
message AllocateIdsRequest {
// The ID of the project against which to make the request.
string project_id = 8;
Expand All @@ -256,14 +260,16 @@ message AllocateIdsRequest {
repeated Key keys = 1;
}

// The response for [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
// The response for
// [Datastore.AllocateIds][google.datastore.v1.Datastore.AllocateIds].
message AllocateIdsResponse {
// The keys specified in the request (in the same order), each with
// its key path completed with a newly allocated ID.
repeated Key keys = 1;
}

// The request for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
// The request for
// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsRequest {
// The ID of the project against which to make the request.
string project_id = 8;
Expand All @@ -276,10 +282,9 @@ message ReserveIdsRequest {
repeated Key keys = 1;
}

// The response for [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsResponse {

}
// The response for
// [Datastore.ReserveIds][google.datastore.v1.Datastore.ReserveIds].
message ReserveIdsResponse {}

// A mutation to apply to an entity.
message Mutation {
Expand Down Expand Up @@ -369,8 +374,10 @@ message ReadOptions {
// Options for beginning a new transaction.
//
// Transactions can be created explicitly with calls to
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction] or implicitly by setting
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction] in read requests.
// [Datastore.BeginTransaction][google.datastore.v1.Datastore.BeginTransaction]
// or implicitly by setting
// [ReadOptions.new_transaction][google.datastore.v1.ReadOptions.new_transaction]
// in read requests.
message TransactionOptions {
// Options specific to read / write transactions.
message ReadWrite {
Expand All @@ -379,9 +386,7 @@ message TransactionOptions {
}

// Options specific to read-only transactions.
message ReadOnly {

}
message ReadOnly {}

// The `mode` of the transaction, indicating whether write operations are
// supported.
Expand Down
8 changes: 4 additions & 4 deletions google/datastore/v1/entity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ option java_outer_classname = "EntityProto";
option java_package = "com.google.datastore.v1";
option php_namespace = "Google\\Cloud\\Datastore\\V1";


// A partition ID identifies a grouping of entities. The grouping is always
// by project and namespace, however the namespace ID may be empty.
//
Expand All @@ -47,7 +46,8 @@ option php_namespace = "Google\\Cloud\\Datastore\\V1";
//
// Foreign partition IDs (in which the project ID does
// not match the context project ID ) are discouraged.
// Reads and writes of foreign partition IDs may fail if the project is not in an active state.
// Reads and writes of foreign partition IDs may fail if the project is not in
// an active state.
message PartitionId {
// The ID of the project to which the entities belong.
string project_id = 2;
Expand Down Expand Up @@ -145,8 +145,8 @@ message Value {
Key key_value = 5;

// A UTF-8 encoded string value.
// When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
// Otherwise, may be set to at least 1,000,000 bytes.
// When `exclude_from_indexes` is false (it is indexed) , may have at most
// 1500 bytes. Otherwise, may be set to at least 1,000,000 bytes.
string string_value = 17;

// A blob value.
Expand Down
20 changes: 11 additions & 9 deletions google/datastore/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ option java_outer_classname = "QueryProto";
option java_package = "com.google.datastore.v1";
option php_namespace = "Google\\Cloud\\Datastore\\V1";


// The result of fetching an entity from Datastore.
message EntityResult {
// Specifies what data the 'entity' field contains.
Expand Down Expand Up @@ -56,12 +55,12 @@ message EntityResult {
// The version of the entity, a strictly positive number that monotonically
// increases with changes to the entity.
//
// This field is set for [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity
// results.
// This field is set for
// [`FULL`][google.datastore.v1.EntityResult.ResultType.FULL] entity results.
//
// For [missing][google.datastore.v1.LookupResponse.missing] entities in `LookupResponse`, this
// is the version of the snapshot that was used to look up the entity, and it
// is always set except for eventually consistent reads.
// For [missing][google.datastore.v1.LookupResponse.missing] entities in
// `LookupResponse`, this is the version of the snapshot that was used to look
// up the entity, and it is always set except for eventually consistent reads.
int64 version = 4;

// A cursor that points to the position after the result entity.
Expand Down Expand Up @@ -91,12 +90,14 @@ message Query {

// A starting point for the query results. Query cursors are
// returned in query result batches and
// [can only be used to continue the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
// [can only be used to continue the same
// query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
bytes start_cursor = 7;

// An ending point for the query results. Query cursors are
// returned in query result batches and
// [can only be used to limit the same query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
// [can only be used to limit the same
// query](https://cloud.google.com/datastore/docs/concepts/queries#cursors_limits_and_offsets).
bytes end_cursor = 8;

// The number of results to skip. Applies before limit, but after all other
Expand Down Expand Up @@ -217,7 +218,8 @@ message PropertyFilter {
Value value = 3;
}

// A [GQL query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
// A [GQL
// query](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
message GqlQuery {
// A string of the format described
// [here](https://cloud.google.com/datastore/docs/apis/gql/gql_reference).
Expand Down
Loading

0 comments on commit 58ac033

Please sign in to comment.