|
| 1 | +// Copyright 2021 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.datastore.admin.v1; |
| 18 | + |
| 19 | +option csharp_namespace = "Google.Cloud.Datastore.Admin.V1"; |
| 20 | +option go_package = "google.golang.org/genproto/googleapis/datastore/admin/v1;admin"; |
| 21 | +option java_multiple_files = true; |
| 22 | +option java_outer_classname = "MigrationProto"; |
| 23 | +option java_package = "com.google.datastore.admin.v1"; |
| 24 | +option php_namespace = "Google\\Cloud\\Datastore\\Admin\\V1"; |
| 25 | +option ruby_package = "Google::Cloud::Datastore::Admin::V1"; |
| 26 | + |
| 27 | +// An event signifying a change in state of a [migration from Cloud Datastore to |
| 28 | +// Cloud Firestore in Datastore |
| 29 | +// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore). |
| 30 | +message MigrationStateEvent { |
| 31 | + // The new state of the migration. |
| 32 | + MigrationState state = 1; |
| 33 | +} |
| 34 | + |
| 35 | +// An event signifying the start of a new step in a [migration from Cloud |
| 36 | +// Datastore to Cloud Firestore in Datastore |
| 37 | +// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore). |
| 38 | +message MigrationProgressEvent { |
| 39 | + // The step that is starting. |
| 40 | + // |
| 41 | + // An event with step set to `START` indicates that the migration |
| 42 | + // has been reverted back to the initial pre-migration state. |
| 43 | + MigrationStep step = 1; |
| 44 | +} |
| 45 | + |
| 46 | +// States for a migration. |
| 47 | +enum MigrationState { |
| 48 | + // Unspecified. |
| 49 | + MIGRATION_STATE_UNSPECIFIED = 0; |
| 50 | + |
| 51 | + // The migration is running. |
| 52 | + RUNNING = 1; |
| 53 | + |
| 54 | + // The migration is paused. |
| 55 | + PAUSED = 2; |
| 56 | + |
| 57 | + // The migration is complete. |
| 58 | + COMPLETE = 3; |
| 59 | +} |
| 60 | + |
| 61 | +// Steps in a migration. |
| 62 | +enum MigrationStep { |
| 63 | + // Unspecified. |
| 64 | + MIGRATION_STEP_UNSPECIFIED = 0; |
| 65 | + |
| 66 | + // Start of migration. |
| 67 | + START = 1; |
| 68 | + |
| 69 | + // Data is copied to Cloud Firestore and then verified to match the data in |
| 70 | + // Cloud Datastore. |
| 71 | + COPY_AND_VERIFY = 2; |
| 72 | + |
| 73 | + // Eventually-consistent reads are redirected to Cloud Firestore. |
| 74 | + REDIRECT_EVENTUALLY_CONSISTENT_READS = 3; |
| 75 | + |
| 76 | + // Strongly-consistent reads are redirected to Cloud Firestore. |
| 77 | + REDIRECT_STRONGLY_CONSISTENT_READS = 4; |
| 78 | + |
| 79 | + // Writes are redirected to Cloud Firestore. |
| 80 | + REDIRECT_WRITES = 5; |
| 81 | +} |
0 commit comments