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// Code generated by protoc-gen-go. DO NOT EDIT.
16// versions:
17// 	protoc-gen-go v1.25.0-devel
18// 	protoc        v3.13.0
19// source: google/datastore/admin/v1/migration.proto
20
21package admin
22
23import (
24	reflect "reflect"
25	sync "sync"
26
27	proto "github.com/golang/protobuf/proto"
28	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30)
31
32const (
33	// Verify that this generated code is sufficiently up-to-date.
34	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35	// Verify that runtime/protoimpl is sufficiently up-to-date.
36	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
38
39// This is a compile-time assertion that a sufficiently up-to-date version
40// of the legacy proto package is being used.
41const _ = proto.ProtoPackageIsVersion4
42
43// States for a migration.
44type MigrationState int32
45
46const (
47	// Unspecified.
48	MigrationState_MIGRATION_STATE_UNSPECIFIED MigrationState = 0
49	// The migration is running.
50	MigrationState_RUNNING MigrationState = 1
51	// The migration is paused.
52	MigrationState_PAUSED MigrationState = 2
53	// The migration is complete.
54	MigrationState_COMPLETE MigrationState = 3
55)
56
57// Enum value maps for MigrationState.
58var (
59	MigrationState_name = map[int32]string{
60		0: "MIGRATION_STATE_UNSPECIFIED",
61		1: "RUNNING",
62		2: "PAUSED",
63		3: "COMPLETE",
64	}
65	MigrationState_value = map[string]int32{
66		"MIGRATION_STATE_UNSPECIFIED": 0,
67		"RUNNING":                     1,
68		"PAUSED":                      2,
69		"COMPLETE":                    3,
70	}
71)
72
73func (x MigrationState) Enum() *MigrationState {
74	p := new(MigrationState)
75	*p = x
76	return p
77}
78
79func (x MigrationState) String() string {
80	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
81}
82
83func (MigrationState) Descriptor() protoreflect.EnumDescriptor {
84	return file_google_datastore_admin_v1_migration_proto_enumTypes[0].Descriptor()
85}
86
87func (MigrationState) Type() protoreflect.EnumType {
88	return &file_google_datastore_admin_v1_migration_proto_enumTypes[0]
89}
90
91func (x MigrationState) Number() protoreflect.EnumNumber {
92	return protoreflect.EnumNumber(x)
93}
94
95// Deprecated: Use MigrationState.Descriptor instead.
96func (MigrationState) EnumDescriptor() ([]byte, []int) {
97	return file_google_datastore_admin_v1_migration_proto_rawDescGZIP(), []int{0}
98}
99
100// Steps in a migration.
101type MigrationStep int32
102
103const (
104	// Unspecified.
105	MigrationStep_MIGRATION_STEP_UNSPECIFIED MigrationStep = 0
106	// Start of migration.
107	MigrationStep_START MigrationStep = 1
108	// Data is copied to Cloud Firestore and then verified to match the data in
109	// Cloud Datastore.
110	MigrationStep_COPY_AND_VERIFY MigrationStep = 2
111	// Eventually-consistent reads are redirected to Cloud Firestore.
112	MigrationStep_REDIRECT_EVENTUALLY_CONSISTENT_READS MigrationStep = 3
113	// Strongly-consistent reads are redirected to Cloud Firestore.
114	MigrationStep_REDIRECT_STRONGLY_CONSISTENT_READS MigrationStep = 4
115	// Writes are redirected to Cloud Firestore.
116	MigrationStep_REDIRECT_WRITES MigrationStep = 5
117)
118
119// Enum value maps for MigrationStep.
120var (
121	MigrationStep_name = map[int32]string{
122		0: "MIGRATION_STEP_UNSPECIFIED",
123		1: "START",
124		2: "COPY_AND_VERIFY",
125		3: "REDIRECT_EVENTUALLY_CONSISTENT_READS",
126		4: "REDIRECT_STRONGLY_CONSISTENT_READS",
127		5: "REDIRECT_WRITES",
128	}
129	MigrationStep_value = map[string]int32{
130		"MIGRATION_STEP_UNSPECIFIED":           0,
131		"START":                                1,
132		"COPY_AND_VERIFY":                      2,
133		"REDIRECT_EVENTUALLY_CONSISTENT_READS": 3,
134		"REDIRECT_STRONGLY_CONSISTENT_READS":   4,
135		"REDIRECT_WRITES":                      5,
136	}
137)
138
139func (x MigrationStep) Enum() *MigrationStep {
140	p := new(MigrationStep)
141	*p = x
142	return p
143}
144
145func (x MigrationStep) String() string {
146	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
147}
148
149func (MigrationStep) Descriptor() protoreflect.EnumDescriptor {
150	return file_google_datastore_admin_v1_migration_proto_enumTypes[1].Descriptor()
151}
152
153func (MigrationStep) Type() protoreflect.EnumType {
154	return &file_google_datastore_admin_v1_migration_proto_enumTypes[1]
155}
156
157func (x MigrationStep) Number() protoreflect.EnumNumber {
158	return protoreflect.EnumNumber(x)
159}
160
161// Deprecated: Use MigrationStep.Descriptor instead.
162func (MigrationStep) EnumDescriptor() ([]byte, []int) {
163	return file_google_datastore_admin_v1_migration_proto_rawDescGZIP(), []int{1}
164}
165
166// An event signifying a change in state of a [migration from Cloud Datastore to
167// Cloud Firestore in Datastore
168// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
169type MigrationStateEvent struct {
170	state         protoimpl.MessageState
171	sizeCache     protoimpl.SizeCache
172	unknownFields protoimpl.UnknownFields
173
174	// The new state of the migration.
175	State MigrationState `protobuf:"varint,1,opt,name=state,proto3,enum=google.datastore.admin.v1.MigrationState" json:"state,omitempty"`
176}
177
178func (x *MigrationStateEvent) Reset() {
179	*x = MigrationStateEvent{}
180	if protoimpl.UnsafeEnabled {
181		mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[0]
182		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
183		ms.StoreMessageInfo(mi)
184	}
185}
186
187func (x *MigrationStateEvent) String() string {
188	return protoimpl.X.MessageStringOf(x)
189}
190
191func (*MigrationStateEvent) ProtoMessage() {}
192
193func (x *MigrationStateEvent) ProtoReflect() protoreflect.Message {
194	mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[0]
195	if protoimpl.UnsafeEnabled && x != nil {
196		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
197		if ms.LoadMessageInfo() == nil {
198			ms.StoreMessageInfo(mi)
199		}
200		return ms
201	}
202	return mi.MessageOf(x)
203}
204
205// Deprecated: Use MigrationStateEvent.ProtoReflect.Descriptor instead.
206func (*MigrationStateEvent) Descriptor() ([]byte, []int) {
207	return file_google_datastore_admin_v1_migration_proto_rawDescGZIP(), []int{0}
208}
209
210func (x *MigrationStateEvent) GetState() MigrationState {
211	if x != nil {
212		return x.State
213	}
214	return MigrationState_MIGRATION_STATE_UNSPECIFIED
215}
216
217// An event signifying the start of a new step in a [migration from Cloud
218// Datastore to Cloud Firestore in Datastore
219// mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
220type MigrationProgressEvent struct {
221	state         protoimpl.MessageState
222	sizeCache     protoimpl.SizeCache
223	unknownFields protoimpl.UnknownFields
224
225	// The step that is starting.
226	//
227	// An event with step set to `START` indicates that the migration
228	// has been reverted back to the initial pre-migration state.
229	Step MigrationStep `protobuf:"varint,1,opt,name=step,proto3,enum=google.datastore.admin.v1.MigrationStep" json:"step,omitempty"`
230}
231
232func (x *MigrationProgressEvent) Reset() {
233	*x = MigrationProgressEvent{}
234	if protoimpl.UnsafeEnabled {
235		mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[1]
236		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
237		ms.StoreMessageInfo(mi)
238	}
239}
240
241func (x *MigrationProgressEvent) String() string {
242	return protoimpl.X.MessageStringOf(x)
243}
244
245func (*MigrationProgressEvent) ProtoMessage() {}
246
247func (x *MigrationProgressEvent) ProtoReflect() protoreflect.Message {
248	mi := &file_google_datastore_admin_v1_migration_proto_msgTypes[1]
249	if protoimpl.UnsafeEnabled && x != nil {
250		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
251		if ms.LoadMessageInfo() == nil {
252			ms.StoreMessageInfo(mi)
253		}
254		return ms
255	}
256	return mi.MessageOf(x)
257}
258
259// Deprecated: Use MigrationProgressEvent.ProtoReflect.Descriptor instead.
260func (*MigrationProgressEvent) Descriptor() ([]byte, []int) {
261	return file_google_datastore_admin_v1_migration_proto_rawDescGZIP(), []int{1}
262}
263
264func (x *MigrationProgressEvent) GetStep() MigrationStep {
265	if x != nil {
266		return x.Step
267	}
268	return MigrationStep_MIGRATION_STEP_UNSPECIFIED
269}
270
271var File_google_datastore_admin_v1_migration_proto protoreflect.FileDescriptor
272
273var file_google_datastore_admin_v1_migration_proto_rawDesc = []byte{
274	0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f,
275	0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x69, 0x67, 0x72,
276	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f,
277	0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64,
278	0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x56, 0x0a, 0x13, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
279	0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a,
280	0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67,
281	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
282	0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69,
283	0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x56,
284	0x0a, 0x16, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72,
285	0x65, 0x73, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70,
286	0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
287	0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
288	0x76, 0x31, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, 0x70,
289	0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x2a, 0x58, 0x0a, 0x0e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
290	0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x49, 0x47, 0x52,
291	0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,
292	0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e,
293	0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x55, 0x53, 0x45, 0x44,
294	0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03,
295	0x2a, 0xb6, 0x01, 0x0a, 0x0d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
296	0x65, 0x70, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x49, 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
297	0x53, 0x54, 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
298	0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x13, 0x0a,
299	0x0f, 0x43, 0x4f, 0x50, 0x59, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59,
300	0x10, 0x02, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x45,
301	0x56, 0x45, 0x4e, 0x54, 0x55, 0x41, 0x4c, 0x4c, 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53,
302	0x54, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x53, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22,
303	0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x4f, 0x4e, 0x47, 0x4c,
304	0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x49, 0x53, 0x54, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x41,
305	0x44, 0x53, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54,
306	0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x53, 0x10, 0x05, 0x42, 0xdb, 0x01, 0x0a, 0x1d, 0x63, 0x6f,
307	0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f,
308	0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4d, 0x69, 0x67,
309	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 0x67,
310	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,
311	0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
312	0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61,
313	0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0xaa, 0x02, 0x1f,
314	0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x44, 0x61, 0x74,
315	0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca,
316	0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x44,
317	0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56,
318	0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75,
319	0x64, 0x3a, 0x3a, 0x44, 0x61, 0x74, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x41, 0x64,
320	0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
321}
322
323var (
324	file_google_datastore_admin_v1_migration_proto_rawDescOnce sync.Once
325	file_google_datastore_admin_v1_migration_proto_rawDescData = file_google_datastore_admin_v1_migration_proto_rawDesc
326)
327
328func file_google_datastore_admin_v1_migration_proto_rawDescGZIP() []byte {
329	file_google_datastore_admin_v1_migration_proto_rawDescOnce.Do(func() {
330		file_google_datastore_admin_v1_migration_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_datastore_admin_v1_migration_proto_rawDescData)
331	})
332	return file_google_datastore_admin_v1_migration_proto_rawDescData
333}
334
335var file_google_datastore_admin_v1_migration_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
336var file_google_datastore_admin_v1_migration_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
337var file_google_datastore_admin_v1_migration_proto_goTypes = []interface{}{
338	(MigrationState)(0),            // 0: google.datastore.admin.v1.MigrationState
339	(MigrationStep)(0),             // 1: google.datastore.admin.v1.MigrationStep
340	(*MigrationStateEvent)(nil),    // 2: google.datastore.admin.v1.MigrationStateEvent
341	(*MigrationProgressEvent)(nil), // 3: google.datastore.admin.v1.MigrationProgressEvent
342}
343var file_google_datastore_admin_v1_migration_proto_depIdxs = []int32{
344	0, // 0: google.datastore.admin.v1.MigrationStateEvent.state:type_name -> google.datastore.admin.v1.MigrationState
345	1, // 1: google.datastore.admin.v1.MigrationProgressEvent.step:type_name -> google.datastore.admin.v1.MigrationStep
346	2, // [2:2] is the sub-list for method output_type
347	2, // [2:2] is the sub-list for method input_type
348	2, // [2:2] is the sub-list for extension type_name
349	2, // [2:2] is the sub-list for extension extendee
350	0, // [0:2] is the sub-list for field type_name
351}
352
353func init() { file_google_datastore_admin_v1_migration_proto_init() }
354func file_google_datastore_admin_v1_migration_proto_init() {
355	if File_google_datastore_admin_v1_migration_proto != nil {
356		return
357	}
358	if !protoimpl.UnsafeEnabled {
359		file_google_datastore_admin_v1_migration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
360			switch v := v.(*MigrationStateEvent); i {
361			case 0:
362				return &v.state
363			case 1:
364				return &v.sizeCache
365			case 2:
366				return &v.unknownFields
367			default:
368				return nil
369			}
370		}
371		file_google_datastore_admin_v1_migration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
372			switch v := v.(*MigrationProgressEvent); i {
373			case 0:
374				return &v.state
375			case 1:
376				return &v.sizeCache
377			case 2:
378				return &v.unknownFields
379			default:
380				return nil
381			}
382		}
383	}
384	type x struct{}
385	out := protoimpl.TypeBuilder{
386		File: protoimpl.DescBuilder{
387			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
388			RawDescriptor: file_google_datastore_admin_v1_migration_proto_rawDesc,
389			NumEnums:      2,
390			NumMessages:   2,
391			NumExtensions: 0,
392			NumServices:   0,
393		},
394		GoTypes:           file_google_datastore_admin_v1_migration_proto_goTypes,
395		DependencyIndexes: file_google_datastore_admin_v1_migration_proto_depIdxs,
396		EnumInfos:         file_google_datastore_admin_v1_migration_proto_enumTypes,
397		MessageInfos:      file_google_datastore_admin_v1_migration_proto_msgTypes,
398	}.Build()
399	File_google_datastore_admin_v1_migration_proto = out.File
400	file_google_datastore_admin_v1_migration_proto_rawDesc = nil
401	file_google_datastore_admin_v1_migration_proto_goTypes = nil
402	file_google_datastore_admin_v1_migration_proto_depIdxs = nil
403}
404