forked from googleapis/java-spanner
/
backup.pb.go
1374 lines (1243 loc) · 57.3 KB
/
backup.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.12.3
// source: google/spanner/admin/database/v1/backup.proto
package database
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
field_mask "google.golang.org/genproto/protobuf/field_mask"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
// Indicates the current state of the backup.
type Backup_State int32
const (
// Not specified.
Backup_STATE_UNSPECIFIED Backup_State = 0
// The pending backup is still being created. Operations on the
// backup may fail with `FAILED_PRECONDITION` in this state.
Backup_CREATING Backup_State = 1
// The backup is complete and ready for use.
Backup_READY Backup_State = 2
)
// Enum value maps for Backup_State.
var (
Backup_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "CREATING",
2: "READY",
}
Backup_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATING": 1,
"READY": 2,
}
)
func (x Backup_State) Enum() *Backup_State {
p := new(Backup_State)
*p = x
return p
}
func (x Backup_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Backup_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_database_v1_backup_proto_enumTypes[0].Descriptor()
}
func (Backup_State) Type() protoreflect.EnumType {
return &file_google_spanner_admin_database_v1_backup_proto_enumTypes[0]
}
func (x Backup_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Backup_State.Descriptor instead.
func (Backup_State) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{0, 0}
}
// A backup of a Cloud Spanner database.
type Backup struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
// Name of the database from which this backup was
// created. This needs to be in the same instance as the backup.
// Values are of the form
// `projects/<project>/instances/<instance>/databases/<database>`.
Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
// Required for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
// operation. The expiration time of the backup, with microseconds
// granularity that must be at least 6 hours and at most 366 days
// from the time the CreateBackup request is processed. Once the `expire_time`
// has passed, the backup is eligible to be automatically deleted by Cloud
// Spanner to free the resources used by the backup.
ExpireTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
// Output only for the [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
// Required for the [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup] operation.
//
// A globally unique identifier for the backup which cannot be
// changed. Values are of the form
// `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]`
// The final segment of the name must be between 2 and 60 characters
// in length.
//
// The backup is stored in the location(s) specified in the instance
// configuration of the instance containing the backup, identified
// by the prefix of the backup name of the form
// `projects/<project>/instances/<instance>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The backup will contain an externally consistent
// copy of the database at the timestamp specified by
// `create_time`. `create_time` is approximately the time the
// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] request is received.
CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. Size of the backup in bytes.
SizeBytes int64 `protobuf:"varint,5,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
// Output only. The current state of the backup.
State Backup_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.spanner.admin.database.v1.Backup_State" json:"state,omitempty"`
// Output only. The names of the restored databases that reference the backup.
// The database names are of
// the form `projects/<project>/instances/<instance>/databases/<database>`.
// Referencing databases may exist in different instances. The existence of
// any referencing database prevents the backup from being deleted. When a
// restored database from the backup enters the `READY` state, the reference
// to the backup is removed.
ReferencingDatabases []string `protobuf:"bytes,7,rep,name=referencing_databases,json=referencingDatabases,proto3" json:"referencing_databases,omitempty"`
}
func (x *Backup) Reset() {
*x = Backup{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Backup) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Backup) ProtoMessage() {}
func (x *Backup) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Backup.ProtoReflect.Descriptor instead.
func (*Backup) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{0}
}
func (x *Backup) GetDatabase() string {
if x != nil {
return x.Database
}
return ""
}
func (x *Backup) GetExpireTime() *timestamp.Timestamp {
if x != nil {
return x.ExpireTime
}
return nil
}
func (x *Backup) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Backup) GetCreateTime() *timestamp.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *Backup) GetSizeBytes() int64 {
if x != nil {
return x.SizeBytes
}
return 0
}
func (x *Backup) GetState() Backup_State {
if x != nil {
return x.State
}
return Backup_STATE_UNSPECIFIED
}
func (x *Backup) GetReferencingDatabases() []string {
if x != nil {
return x.ReferencingDatabases
}
return nil
}
// The request for [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
type CreateBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the instance in which the backup will be
// created. This must be the same instance that contains the database the
// backup will be created from. The backup will be stored in the
// location(s) specified in the instance configuration of this
// instance. Values are of the form
// `projects/<project>/instances/<instance>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The id of the backup to be created. The `backup_id` appended to
// `parent` forms the full backup name of the form
// `projects/<project>/instances/<instance>/backups/<backup_id>`.
BackupId string `protobuf:"bytes,2,opt,name=backup_id,json=backupId,proto3" json:"backup_id,omitempty"`
// Required. The backup to create.
Backup *Backup `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"`
}
func (x *CreateBackupRequest) Reset() {
*x = CreateBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateBackupRequest) ProtoMessage() {}
func (x *CreateBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateBackupRequest.ProtoReflect.Descriptor instead.
func (*CreateBackupRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{1}
}
func (x *CreateBackupRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *CreateBackupRequest) GetBackupId() string {
if x != nil {
return x.BackupId
}
return ""
}
func (x *CreateBackupRequest) GetBackup() *Backup {
if x != nil {
return x.Backup
}
return nil
}
// Metadata type for the operation returned by
// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
type CreateBackupMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The name of the backup being created.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The name of the database the backup is created from.
Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
// The progress of the
// [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup] operation.
Progress *OperationProgress `protobuf:"bytes,3,opt,name=progress,proto3" json:"progress,omitempty"`
// The time at which cancellation of this operation was received.
// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
// starts asynchronous cancellation on a long-running operation. The server
// makes a best effort to cancel the operation, but success is not guaranteed.
// Clients can use
// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
// other methods to check whether the cancellation succeeded or whether the
// operation completed despite cancellation. On successful cancellation,
// the operation is not deleted; instead, it becomes an operation with
// an [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`.
CancelTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=cancel_time,json=cancelTime,proto3" json:"cancel_time,omitempty"`
}
func (x *CreateBackupMetadata) Reset() {
*x = CreateBackupMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateBackupMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateBackupMetadata) ProtoMessage() {}
func (x *CreateBackupMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateBackupMetadata.ProtoReflect.Descriptor instead.
func (*CreateBackupMetadata) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{2}
}
func (x *CreateBackupMetadata) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateBackupMetadata) GetDatabase() string {
if x != nil {
return x.Database
}
return ""
}
func (x *CreateBackupMetadata) GetProgress() *OperationProgress {
if x != nil {
return x.Progress
}
return nil
}
func (x *CreateBackupMetadata) GetCancelTime() *timestamp.Timestamp {
if x != nil {
return x.CancelTime
}
return nil
}
// The request for [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
type UpdateBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The backup to update. `backup.name`, and the fields to be updated
// as specified by `update_mask` are required. Other fields are ignored.
// Update is only supported for the following fields:
// * `backup.expire_time`.
Backup *Backup `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"`
// Required. A mask specifying which fields (e.g. `expire_time`) in the
// Backup resource should be updated. This mask is relative to the Backup
// resource, not to the request message. The field mask must always be
// specified; this prevents any future fields from being erased accidentally
// by clients that do not know about them.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *UpdateBackupRequest) Reset() {
*x = UpdateBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateBackupRequest) ProtoMessage() {}
func (x *UpdateBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateBackupRequest.ProtoReflect.Descriptor instead.
func (*UpdateBackupRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateBackupRequest) GetBackup() *Backup {
if x != nil {
return x.Backup
}
return nil
}
func (x *UpdateBackupRequest) GetUpdateMask() *field_mask.FieldMask {
if x != nil {
return x.UpdateMask
}
return nil
}
// The request for [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
type GetBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Name of the backup.
// Values are of the form
// `projects/<project>/instances/<instance>/backups/<backup>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetBackupRequest) Reset() {
*x = GetBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetBackupRequest) ProtoMessage() {}
func (x *GetBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetBackupRequest.ProtoReflect.Descriptor instead.
func (*GetBackupRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{4}
}
func (x *GetBackupRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// The request for [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
type DeleteBackupRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Name of the backup to delete.
// Values are of the form
// `projects/<project>/instances/<instance>/backups/<backup>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *DeleteBackupRequest) Reset() {
*x = DeleteBackupRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteBackupRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteBackupRequest) ProtoMessage() {}
func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteBackupRequest.ProtoReflect.Descriptor instead.
func (*DeleteBackupRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{5}
}
func (x *DeleteBackupRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
// The request for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
type ListBackupsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The instance to list backups from. Values are of the
// form `projects/<project>/instances/<instance>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// An expression that filters the list of returned backups.
//
// A filter expression consists of a field name, a comparison operator, and a
// value for filtering.
// The value must be a string, a number, or a boolean. The comparison operator
// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
// Colon `:` is the contains operator. Filter rules are not case sensitive.
//
// The following fields in the [Backup][google.spanner.admin.database.v1.Backup] are eligible for filtering:
//
// * `name`
// * `database`
// * `state`
// * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
// * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
// * `size_bytes`
//
// You can combine multiple expressions by enclosing each expression in
// parentheses. By default, expressions are combined with AND logic, but
// you can specify AND, OR, and NOT logic explicitly.
//
// Here are a few examples:
//
// * `name:Howl` - The backup's name contains the string "howl".
// * `database:prod`
// - The database's name contains the string "prod".
// * `state:CREATING` - The backup is pending creation.
// * `state:READY` - The backup is fully created and ready for use.
// * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")`
// - The backup name contains the string "howl" and `create_time`
// of the backup is before 2018-03-28T14:50:00Z.
// * `expire_time < \"2018-03-28T14:50:00Z\"`
// - The backup `expire_time` is before 2018-03-28T14:50:00Z.
// * `size_bytes > 10000000000` - The backup's size is greater than 10GB
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Number of backups to be returned in the response. If 0 or
// less, defaults to the server's maximum allowed page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token] from a
// previous [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse] to the same `parent` and with the same
// `filter`.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
func (x *ListBackupsRequest) Reset() {
*x = ListBackupsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBackupsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBackupsRequest) ProtoMessage() {}
func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListBackupsRequest.ProtoReflect.Descriptor instead.
func (*ListBackupsRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{6}
}
func (x *ListBackupsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ListBackupsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
func (x *ListBackupsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListBackupsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
// The response for [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
type ListBackupsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of matching backups. Backups returned are ordered by `create_time`
// in descending order, starting from the most recent `create_time`.
Backups []*Backup `protobuf:"bytes,1,rep,name=backups,proto3" json:"backups,omitempty"`
// `next_page_token` can be sent in a subsequent
// [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups] call to fetch more
// of the matching backups.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListBackupsResponse) Reset() {
*x = ListBackupsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBackupsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBackupsResponse) ProtoMessage() {}
func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListBackupsResponse.ProtoReflect.Descriptor instead.
func (*ListBackupsResponse) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{7}
}
func (x *ListBackupsResponse) GetBackups() []*Backup {
if x != nil {
return x.Backups
}
return nil
}
func (x *ListBackupsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// The request for
// [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].
type ListBackupOperationsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The instance of the backup operations. Values are of
// the form `projects/<project>/instances/<instance>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// An expression that filters the list of returned backup operations.
//
// A filter expression consists of a field name, a
// comparison operator, and a value for filtering.
// The value must be a string, a number, or a boolean. The comparison operator
// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
// Colon `:` is the contains operator. Filter rules are not case sensitive.
//
// The following fields in the [operation][google.longrunning.Operation]
// are eligible for filtering:
//
// * `name` - The name of the long-running operation
// * `done` - False if the operation is in progress, else true.
// * `metadata.@type` - the type of metadata. For example, the type string
// for [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata] is
// `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
// * `metadata.<field_name>` - any field in metadata.value.
// * `error` - Error associated with the long-running operation.
// * `response.@type` - the type of response.
// * `response.<field_name>` - any field in response.value.
//
// You can combine multiple expressions by enclosing each expression in
// parentheses. By default, expressions are combined with AND logic, but
// you can specify AND, OR, and NOT logic explicitly.
//
// Here are a few examples:
//
// * `done:true` - The operation is complete.
// * `metadata.database:prod` - The database the backup was taken from has
// a name containing the string "prod".
// * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` <br/>
// `(metadata.name:howl) AND` <br/>
// `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
// `(error:*)` - Returns operations where:
// * The operation's metadata type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
// * The backup name contains the string "howl".
// * The operation started before 2018-03-28T14:50:00Z.
// * The operation resulted in an error.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// Number of operations to be returned in the response. If 0 or
// less, defaults to the server's maximum allowed page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// If non-empty, `page_token` should contain a
// [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
// from a previous [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse] to the
// same `parent` and with the same `filter`.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
func (x *ListBackupOperationsRequest) Reset() {
*x = ListBackupOperationsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBackupOperationsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBackupOperationsRequest) ProtoMessage() {}
func (x *ListBackupOperationsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListBackupOperationsRequest.ProtoReflect.Descriptor instead.
func (*ListBackupOperationsRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{8}
}
func (x *ListBackupOperationsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ListBackupOperationsRequest) GetFilter() string {
if x != nil {
return x.Filter
}
return ""
}
func (x *ListBackupOperationsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListBackupOperationsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
// The response for
// [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].
type ListBackupOperationsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of matching backup [long-running
// operations][google.longrunning.Operation]. Each operation's name will be
// prefixed by the backup's name and the operation's
// [metadata][google.longrunning.Operation.metadata] will be of type
// [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. Operations returned include those that are
// pending or have completed/failed/canceled within the last 7 days.
// Operations returned are ordered by
// `operation.metadata.value.progress.start_time` in descending order starting
// from the most recently started operation.
Operations []*longrunning.Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
// `next_page_token` can be sent in a subsequent
// [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
// call to fetch more of the matching metadata.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListBackupOperationsResponse) Reset() {
*x = ListBackupOperationsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListBackupOperationsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListBackupOperationsResponse) ProtoMessage() {}
func (x *ListBackupOperationsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListBackupOperationsResponse.ProtoReflect.Descriptor instead.
func (*ListBackupOperationsResponse) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{9}
}
func (x *ListBackupOperationsResponse) GetOperations() []*longrunning.Operation {
if x != nil {
return x.Operations
}
return nil
}
func (x *ListBackupOperationsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// Information about a backup.
type BackupInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the backup.
Backup string `protobuf:"bytes,1,opt,name=backup,proto3" json:"backup,omitempty"`
// The backup contains an externally consistent copy of `source_database` at
// the timestamp specified by `create_time`.
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Name of the database the backup was created from.
SourceDatabase string `protobuf:"bytes,3,opt,name=source_database,json=sourceDatabase,proto3" json:"source_database,omitempty"`
}
func (x *BackupInfo) Reset() {
*x = BackupInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BackupInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BackupInfo) ProtoMessage() {}
func (x *BackupInfo) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_database_v1_backup_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BackupInfo.ProtoReflect.Descriptor instead.
func (*BackupInfo) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_database_v1_backup_proto_rawDescGZIP(), []int{10}
}
func (x *BackupInfo) GetBackup() string {
if x != nil {
return x.Backup
}
return ""
}
func (x *BackupInfo) GetCreateTime() *timestamp.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *BackupInfo) GetSourceDatabase() string {
if x != nil {
return x.SourceDatabase
}
return ""
}
var File_google_spanner_admin_database_v1_backup_proto protoreflect.FileDescriptor
var file_google_spanner_admin_database_v1_backup_proto_rawDesc = []byte{
0x0a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72,
0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f,
0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x70, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x2e,