Skip to content

Commit

Permalink
docs: Specify limit for properties in Index message in Datastore …
Browse files Browse the repository at this point in the history
…Admin API

docs: Minor formatting in Datastore Admin API

PiperOrigin-RevId: 551819875
  • Loading branch information
Google APIs authored and Copybara-Service committed Jul 28, 2023
1 parent b6faee8 commit 3db8b01
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 53 deletions.
91 changes: 43 additions & 48 deletions google/datastore/admin/v1/datastore_admin.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,65 +34,51 @@ option ruby_package = "Google::Cloud::Datastore::Admin::V1";

// Google Cloud Datastore Admin API
//
//
// The Datastore Admin API provides several admin services for Cloud Datastore.
//
// -----------------------------------------------------------------------------
// ## Concepts
//
// Project, namespace, kind, and entity as defined in the Google Cloud Datastore
// API.
// Concepts: Project, namespace, kind, and entity as defined in the Google Cloud
// Datastore API.
//
// Operation: An Operation represents work being performed in the background.
//
// EntityFilter: Allows specifying a subset of entities in a project. This is
// specified as a combination of kinds and namespaces (either or both of which
// may be all).
//
// -----------------------------------------------------------------------------
// ## Services
//
// # Export/Import
// Export/Import Service:
//
// The Export/Import service provides the ability to copy all or a subset of
// - The Export/Import service provides the ability to copy all or a subset of
// entities to/from Google Cloud Storage.
//
// Exported data may be imported into Cloud Datastore for any Google Cloud
// - Exported data may be imported into Cloud Datastore for any Google Cloud
// Platform project. It is not restricted to the export source project. It is
// possible to export from one project and then import into another.
//
// Exported data can also be loaded into Google BigQuery for analysis.
//
// Exports and imports are performed asynchronously. An Operation resource is
// - Exported data can also be loaded into Google BigQuery for analysis.
// - Exports and imports are performed asynchronously. An Operation resource is
// created for each export/import. The state (including any errors encountered)
// of the export/import may be queried via the Operation resource.
//
// # Index
// Index Service:
//
// The index service manages Cloud Datastore composite indexes.
//
// Index creation and deletion are performed asynchronously.
// - The index service manages Cloud Datastore composite indexes.
// - Index creation and deletion are performed asynchronously.
// An Operation resource is created for each such asynchronous operation.
// The state of the operation (including any errors encountered)
// may be queried via the Operation resource.
//
// # Operation
// Operation Service:
//
// The Operations collection provides a record of actions performed for the
// - The Operations collection provides a record of actions performed for the
// specified project (including any operations in progress). Operations are not
// created directly but through calls on other collections or resources.
//
// An operation that is not yet done may be cancelled. The request to cancel is
// asynchronous and the operation may continue to run for some time after the
// - An operation that is not yet done may be cancelled. The request to cancel
// is asynchronous and the operation may continue to run for some time after the
// request to cancel is made.
//
// An operation that is done may be deleted so that it is no longer listed as
// - An operation that is done may be deleted so that it is no longer listed as
// part of the Operation collection.
//
// ListOperations returns all pending operations, but not completed operations.
//
// Operations are created by service DatastoreAdmin,
// but are accessed via service google.longrunning.Operations.
// - ListOperations returns all pending operations, but not completed
// operations.
// - Operations are created by service DatastoreAdmin, but are accessed via
// service google.longrunning.Operations.
service DatastoreAdmin {
option (google.api.default_host) = "datastore.googleapis.com";
option (google.api.oauth_scopes) =
Expand All @@ -107,12 +93,14 @@ 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: "*"
};
option (google.api.method_signature) = "project_id,labels,entity_filter,output_url_prefix";
option (google.api.method_signature) =
"project_id,labels,entity_filter,output_url_prefix";
option (google.longrunning.operation_info) = {
response_type: "ExportEntitiesResponse"
metadata_type: "ExportEntitiesMetadata"
Expand All @@ -124,12 +112,14 @@ 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: "*"
};
option (google.api.method_signature) = "project_id,labels,input_url,entity_filter";
option (google.api.method_signature) =
"project_id,labels,input_url,entity_filter";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "ImportEntitiesMetadata"
Expand All @@ -138,9 +128,9 @@ service DatastoreAdmin {

// Creates the specified index.
// A newly created index's initial state is `CREATING`. On completion of the
// returned [google.longrunning.Operation][google.longrunning.Operation], the state will be `READY`.
// If the index already exists, the call will return an `ALREADY_EXISTS`
// status.
// returned [google.longrunning.Operation][google.longrunning.Operation], the
// state will be `READY`. If the index already exists, the call will return an
// `ALREADY_EXISTS` status.
//
// During index creation, the process could result in an error, in which
// case the index will move to the `ERROR` state. The process can be recovered
Expand All @@ -165,7 +155,8 @@ service DatastoreAdmin {
// An index can only be deleted if it is in a `READY` or `ERROR` state. On
// successful execution of the request, the index will be in a `DELETING`
// [state][google.datastore.admin.v1.Index.State]. And on completion of the
// returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.
// returned [google.longrunning.Operation][google.longrunning.Operation], the
// index will be removed.
//
// During index deletion, the process could result in an error, in which
// case the index will move to the `ERROR` state. The process can be recovered
Expand Down Expand Up @@ -283,8 +274,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 All @@ -300,8 +291,9 @@ message ImportEntitiesRequest {
// Client-assigned labels.
map<string, string> labels = 2;

// Required. The full resource URL of the external storage location. Currently, only
// Google Cloud Storage is supported. So input_url should be of the form:
// Required. The full resource URL of the external storage location.
// Currently, only Google Cloud Storage is supported. So input_url should be
// of the form:
// `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
// `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
// an optional Cloud Storage namespace path (this is not a Cloud Datastore
Expand Down Expand Up @@ -369,7 +361,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 Expand Up @@ -427,7 +421,8 @@ message DeleteIndexRequest {
string index_id = 3;
}

// The request for [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex].
// The request for
// [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex].
message GetIndexRequest {
// Project ID against which to make the request.
string project_id = 1;
Expand Down
15 changes: 11 additions & 4 deletions google/datastore/admin/v1/index.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,7 +60,8 @@ message Index {
// Required. The property name to index.
string name = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The indexed property's direction. Must not be DIRECTION_UNSPECIFIED.
// Required. The indexed property's direction. Must not be
// DIRECTION_UNSPECIFIED.
Direction direction = 2 [(google.api.field_behavior) = REQUIRED];
}

Expand Down Expand Up @@ -104,11 +105,17 @@ message Index {
// Required. The entity kind to which this index applies.
string kind = 4 [(google.api.field_behavior) = REQUIRED];

// Required. The index's ancestor mode. Must not be ANCESTOR_MODE_UNSPECIFIED.
// Required. The index's ancestor mode. Must not be
// ANCESTOR_MODE_UNSPECIFIED.
AncestorMode ancestor = 5 [(google.api.field_behavior) = REQUIRED];

// Required. An ordered sequence of property names and their index attributes.
repeated IndexedProperty properties = 6 [(google.api.field_behavior) = REQUIRED];
//
// Requires:
//
// * A maximum of 100 properties.
repeated IndexedProperty properties = 6
[(google.api.field_behavior) = REQUIRED];

// Output only. The state of the index.
State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
Expand Down
2 changes: 1 addition & 1 deletion google/datastore/admin/v1/migration.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 3db8b01

Please sign in to comment.