/
spanner_instance_admin.pb.go
executable file
·6414 lines (5916 loc) · 309 KB
/
spanner_instance_admin.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 2024 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.32.0
// protoc v4.25.2
// source: google/spanner/admin/instance/v1/spanner_instance_admin.proto
package instancepb
import (
context "context"
reflect "reflect"
sync "sync"
iampb "cloud.google.com/go/iam/apiv1/iampb"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
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)
)
// Indicates the type of replica. See the [replica types
// documentation](https://cloud.google.com/spanner/docs/replication#replica_types)
// for more details.
type ReplicaInfo_ReplicaType int32
const (
// Not specified.
ReplicaInfo_TYPE_UNSPECIFIED ReplicaInfo_ReplicaType = 0
// Read-write replicas support both reads and writes. These replicas:
//
// * Maintain a full copy of your data.
// * Serve reads.
// * Can vote whether to commit a write.
// * Participate in leadership election.
// * Are eligible to become a leader.
ReplicaInfo_READ_WRITE ReplicaInfo_ReplicaType = 1
// Read-only replicas only support reads (not writes). Read-only replicas:
//
// * Maintain a full copy of your data.
// * Serve reads.
// * Do not participate in voting to commit writes.
// * Are not eligible to become a leader.
ReplicaInfo_READ_ONLY ReplicaInfo_ReplicaType = 2
// Witness replicas don't support reads but do participate in voting to
// commit writes. Witness replicas:
//
// * Do not maintain a full copy of data.
// * Do not serve reads.
// * Vote whether to commit writes.
// * Participate in leader election but are not eligible to become leader.
ReplicaInfo_WITNESS ReplicaInfo_ReplicaType = 3
)
// Enum value maps for ReplicaInfo_ReplicaType.
var (
ReplicaInfo_ReplicaType_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "READ_WRITE",
2: "READ_ONLY",
3: "WITNESS",
}
ReplicaInfo_ReplicaType_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"READ_WRITE": 1,
"READ_ONLY": 2,
"WITNESS": 3,
}
)
func (x ReplicaInfo_ReplicaType) Enum() *ReplicaInfo_ReplicaType {
p := new(ReplicaInfo_ReplicaType)
*p = x
return p
}
func (x ReplicaInfo_ReplicaType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReplicaInfo_ReplicaType) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[0].Descriptor()
}
func (ReplicaInfo_ReplicaType) Type() protoreflect.EnumType {
return &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[0]
}
func (x ReplicaInfo_ReplicaType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReplicaInfo_ReplicaType.Descriptor instead.
func (ReplicaInfo_ReplicaType) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{0, 0}
}
// The type of this configuration.
type InstanceConfig_Type int32
const (
// Unspecified.
InstanceConfig_TYPE_UNSPECIFIED InstanceConfig_Type = 0
// Google managed configuration.
InstanceConfig_GOOGLE_MANAGED InstanceConfig_Type = 1
// User managed configuration.
InstanceConfig_USER_MANAGED InstanceConfig_Type = 2
)
// Enum value maps for InstanceConfig_Type.
var (
InstanceConfig_Type_name = map[int32]string{
0: "TYPE_UNSPECIFIED",
1: "GOOGLE_MANAGED",
2: "USER_MANAGED",
}
InstanceConfig_Type_value = map[string]int32{
"TYPE_UNSPECIFIED": 0,
"GOOGLE_MANAGED": 1,
"USER_MANAGED": 2,
}
)
func (x InstanceConfig_Type) Enum() *InstanceConfig_Type {
p := new(InstanceConfig_Type)
*p = x
return p
}
func (x InstanceConfig_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InstanceConfig_Type) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[1].Descriptor()
}
func (InstanceConfig_Type) Type() protoreflect.EnumType {
return &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[1]
}
func (x InstanceConfig_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InstanceConfig_Type.Descriptor instead.
func (InstanceConfig_Type) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{1, 0}
}
// Indicates the current state of the instance config.
type InstanceConfig_State int32
const (
// Not specified.
InstanceConfig_STATE_UNSPECIFIED InstanceConfig_State = 0
// The instance config is still being created.
InstanceConfig_CREATING InstanceConfig_State = 1
// The instance config is fully created and ready to be used to create
// instances.
InstanceConfig_READY InstanceConfig_State = 2
)
// Enum value maps for InstanceConfig_State.
var (
InstanceConfig_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "CREATING",
2: "READY",
}
InstanceConfig_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATING": 1,
"READY": 2,
}
)
func (x InstanceConfig_State) Enum() *InstanceConfig_State {
p := new(InstanceConfig_State)
*p = x
return p
}
func (x InstanceConfig_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InstanceConfig_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[2].Descriptor()
}
func (InstanceConfig_State) Type() protoreflect.EnumType {
return &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[2]
}
func (x InstanceConfig_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InstanceConfig_State.Descriptor instead.
func (InstanceConfig_State) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{1, 1}
}
// Indicates the current state of the instance.
type Instance_State int32
const (
// Not specified.
Instance_STATE_UNSPECIFIED Instance_State = 0
// The instance is still being created. Resources may not be
// available yet, and operations such as database creation may not
// work.
Instance_CREATING Instance_State = 1
// The instance is fully created and ready to do work such as
// creating databases.
Instance_READY Instance_State = 2
)
// Enum value maps for Instance_State.
var (
Instance_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "CREATING",
2: "READY",
}
Instance_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATING": 1,
"READY": 2,
}
)
func (x Instance_State) Enum() *Instance_State {
p := new(Instance_State)
*p = x
return p
}
func (x Instance_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Instance_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[3].Descriptor()
}
func (Instance_State) Type() protoreflect.EnumType {
return &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[3]
}
func (x Instance_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Instance_State.Descriptor instead.
func (Instance_State) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{3, 0}
}
// Indicates the current state of the instance partition.
type InstancePartition_State int32
const (
// Not specified.
InstancePartition_STATE_UNSPECIFIED InstancePartition_State = 0
// The instance partition is still being created. Resources may not be
// available yet, and operations such as creating placements using this
// instance partition may not work.
InstancePartition_CREATING InstancePartition_State = 1
// The instance partition is fully created and ready to do work such as
// creating placements and using in databases.
InstancePartition_READY InstancePartition_State = 2
)
// Enum value maps for InstancePartition_State.
var (
InstancePartition_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "CREATING",
2: "READY",
}
InstancePartition_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"CREATING": 1,
"READY": 2,
}
)
func (x InstancePartition_State) Enum() *InstancePartition_State {
p := new(InstancePartition_State)
*p = x
return p
}
func (x InstancePartition_State) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InstancePartition_State) Descriptor() protoreflect.EnumDescriptor {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[4].Descriptor()
}
func (InstancePartition_State) Type() protoreflect.EnumType {
return &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_enumTypes[4]
}
func (x InstancePartition_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InstancePartition_State.Descriptor instead.
func (InstancePartition_State) EnumDescriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{22, 0}
}
type ReplicaInfo struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The location of the serving resources, e.g. "us-central1".
Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
// The type of replica.
Type ReplicaInfo_ReplicaType `protobuf:"varint,2,opt,name=type,proto3,enum=google.spanner.admin.instance.v1.ReplicaInfo_ReplicaType" json:"type,omitempty"`
// If true, this location is designated as the default leader location where
// leader replicas are placed. See the [region types
// documentation](https://cloud.google.com/spanner/docs/instances#region_types)
// for more details.
DefaultLeaderLocation bool `protobuf:"varint,3,opt,name=default_leader_location,json=defaultLeaderLocation,proto3" json:"default_leader_location,omitempty"`
}
func (x *ReplicaInfo) Reset() {
*x = ReplicaInfo{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReplicaInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReplicaInfo) ProtoMessage() {}
func (x *ReplicaInfo) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 ReplicaInfo.ProtoReflect.Descriptor instead.
func (*ReplicaInfo) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{0}
}
func (x *ReplicaInfo) GetLocation() string {
if x != nil {
return x.Location
}
return ""
}
func (x *ReplicaInfo) GetType() ReplicaInfo_ReplicaType {
if x != nil {
return x.Type
}
return ReplicaInfo_TYPE_UNSPECIFIED
}
func (x *ReplicaInfo) GetDefaultLeaderLocation() bool {
if x != nil {
return x.DefaultLeaderLocation
}
return false
}
// A possible configuration for a Cloud Spanner instance. Configurations
// define the geographic placement of nodes and their replication.
type InstanceConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// A unique identifier for the instance configuration. Values
// are of the form
// `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The name of this instance configuration as it appears in UIs.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Output only. Whether this instance config is a Google or User Managed
// Configuration.
ConfigType InstanceConfig_Type `protobuf:"varint,5,opt,name=config_type,json=configType,proto3,enum=google.spanner.admin.instance.v1.InstanceConfig_Type" json:"config_type,omitempty"`
// The geographic placement of nodes in this instance configuration and their
// replication properties.
Replicas []*ReplicaInfo `protobuf:"bytes,3,rep,name=replicas,proto3" json:"replicas,omitempty"`
// Output only. The available optional replicas to choose from for user
// managed configurations. Populated for Google managed configurations.
OptionalReplicas []*ReplicaInfo `protobuf:"bytes,6,rep,name=optional_replicas,json=optionalReplicas,proto3" json:"optional_replicas,omitempty"`
// Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3,
// based on which this configuration is created. Only set for user managed
// configurations. `base_config` must refer to a configuration of type
// GOOGLE_MANAGED in the same project as this configuration.
BaseConfig string `protobuf:"bytes,7,opt,name=base_config,json=baseConfig,proto3" json:"base_config,omitempty"`
// Cloud Labels are a flexible and lightweight mechanism for organizing cloud
// resources into groups that reflect a customer's organizational needs and
// deployment strategies. Cloud Labels can be used to filter collections of
// resources. They can be used to control how resource metrics are aggregated.
// And they can be used as arguments to policy management rules (e.g. route,
// firewall, load balancing, etc.).
//
// - Label keys must be between 1 and 63 characters long and must conform to
// the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
// - Label values must be between 0 and 63 characters long and must conform
// to the regular expression `[a-z0-9_-]{0,63}`.
// - No more than 64 labels can be associated with a given resource.
//
// See https://goo.gl/xmQnxf for more information on and examples of labels.
//
// If you plan to use labels in your own code, please note that additional
// characters may be allowed in the future. Therefore, you are advised to use
// an internal label representation, such as JSON, which doesn't rely upon
// specific characters being disallowed. For example, representing labels
// as the string: name + "_" + value would prove problematic if we were to
// allow "_" in a future release.
Labels map[string]string `protobuf:"bytes,8,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// etag is used for optimistic concurrency control as a way
// to help prevent simultaneous updates of a instance config from overwriting
// each other. It is strongly suggested that systems make use of the etag in
// the read-modify-write cycle to perform instance config updates in order to
// avoid race conditions: An etag is returned in the response which contains
// instance configs, and systems are expected to put that etag in the request
// to update instance config to ensure that their change will be applied to
// the same version of the instance config.
// If no etag is provided in the call to update instance config, then the
// existing instance config is overwritten blindly.
Etag string `protobuf:"bytes,9,opt,name=etag,proto3" json:"etag,omitempty"`
// Allowed values of the "default_leader" schema option for databases in
// instances that use this instance configuration.
LeaderOptions []string `protobuf:"bytes,4,rep,name=leader_options,json=leaderOptions,proto3" json:"leader_options,omitempty"`
// Output only. If true, the instance config is being created or updated. If
// false, there are no ongoing operations for the instance config.
Reconciling bool `protobuf:"varint,10,opt,name=reconciling,proto3" json:"reconciling,omitempty"`
// Output only. The current instance config state.
State InstanceConfig_State `protobuf:"varint,11,opt,name=state,proto3,enum=google.spanner.admin.instance.v1.InstanceConfig_State" json:"state,omitempty"`
}
func (x *InstanceConfig) Reset() {
*x = InstanceConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InstanceConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InstanceConfig) ProtoMessage() {}
func (x *InstanceConfig) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 InstanceConfig.ProtoReflect.Descriptor instead.
func (*InstanceConfig) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{1}
}
func (x *InstanceConfig) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *InstanceConfig) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (x *InstanceConfig) GetConfigType() InstanceConfig_Type {
if x != nil {
return x.ConfigType
}
return InstanceConfig_TYPE_UNSPECIFIED
}
func (x *InstanceConfig) GetReplicas() []*ReplicaInfo {
if x != nil {
return x.Replicas
}
return nil
}
func (x *InstanceConfig) GetOptionalReplicas() []*ReplicaInfo {
if x != nil {
return x.OptionalReplicas
}
return nil
}
func (x *InstanceConfig) GetBaseConfig() string {
if x != nil {
return x.BaseConfig
}
return ""
}
func (x *InstanceConfig) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *InstanceConfig) GetEtag() string {
if x != nil {
return x.Etag
}
return ""
}
func (x *InstanceConfig) GetLeaderOptions() []string {
if x != nil {
return x.LeaderOptions
}
return nil
}
func (x *InstanceConfig) GetReconciling() bool {
if x != nil {
return x.Reconciling
}
return false
}
func (x *InstanceConfig) GetState() InstanceConfig_State {
if x != nil {
return x.State
}
return InstanceConfig_STATE_UNSPECIFIED
}
// Autoscaling config for an instance.
type AutoscalingConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Autoscaling limits for an instance.
AutoscalingLimits *AutoscalingConfig_AutoscalingLimits `protobuf:"bytes,1,opt,name=autoscaling_limits,json=autoscalingLimits,proto3" json:"autoscaling_limits,omitempty"`
// Required. The autoscaling targets for an instance.
AutoscalingTargets *AutoscalingConfig_AutoscalingTargets `protobuf:"bytes,2,opt,name=autoscaling_targets,json=autoscalingTargets,proto3" json:"autoscaling_targets,omitempty"`
}
func (x *AutoscalingConfig) Reset() {
*x = AutoscalingConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AutoscalingConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AutoscalingConfig) ProtoMessage() {}
func (x *AutoscalingConfig) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 AutoscalingConfig.ProtoReflect.Descriptor instead.
func (*AutoscalingConfig) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{2}
}
func (x *AutoscalingConfig) GetAutoscalingLimits() *AutoscalingConfig_AutoscalingLimits {
if x != nil {
return x.AutoscalingLimits
}
return nil
}
func (x *AutoscalingConfig) GetAutoscalingTargets() *AutoscalingConfig_AutoscalingTargets {
if x != nil {
return x.AutoscalingTargets
}
return nil
}
// An isolated set of Cloud Spanner resources on which databases can be hosted.
type Instance struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. A unique identifier for the instance, which cannot be changed
// after the instance is created. Values are of the form
// `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
// segment of the name must be between 2 and 64 characters in length.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The name of the instance's configuration. Values are of the form
// `projects/<project>/instanceConfigs/<configuration>`. See
// also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
Config string `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
// Required. The descriptive name for this instance as it appears in UIs.
// Must be unique per project and between 4 and 30 characters in length.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// The number of nodes allocated to this instance. At most one of either
// node_count or processing_units should be present in the message.
//
// Users can set the node_count field to specify the target number of nodes
// allocated to the instance.
//
// This may be zero in API responses for instances that are not yet in state
// `READY`.
//
// See [the
// documentation](https://cloud.google.com/spanner/docs/compute-capacity)
// for more information about nodes and processing units.
NodeCount int32 `protobuf:"varint,5,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"`
// The number of processing units allocated to this instance. At most one of
// processing_units or node_count should be present in the message.
//
// Users can set the processing_units field to specify the target number of
// processing units allocated to the instance.
//
// This may be zero in API responses for instances that are not yet in state
// `READY`.
//
// See [the
// documentation](https://cloud.google.com/spanner/docs/compute-capacity)
// for more information about nodes and processing units.
ProcessingUnits int32 `protobuf:"varint,9,opt,name=processing_units,json=processingUnits,proto3" json:"processing_units,omitempty"`
// Optional. The autoscaling configuration. Autoscaling is enabled if this
// field is set. When autoscaling is enabled, node_count and processing_units
// are treated as OUTPUT_ONLY fields and reflect the current compute capacity
// allocated to the instance.
AutoscalingConfig *AutoscalingConfig `protobuf:"bytes,17,opt,name=autoscaling_config,json=autoscalingConfig,proto3" json:"autoscaling_config,omitempty"`
// Output only. The current instance state. For
// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
// the state must be either omitted or set to `CREATING`. For
// [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
// the state must be either omitted or set to `READY`.
State Instance_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.spanner.admin.instance.v1.Instance_State" json:"state,omitempty"`
// Cloud Labels are a flexible and lightweight mechanism for organizing cloud
// resources into groups that reflect a customer's organizational needs and
// deployment strategies. Cloud Labels can be used to filter collections of
// resources. They can be used to control how resource metrics are aggregated.
// And they can be used as arguments to policy management rules (e.g. route,
// firewall, load balancing, etc.).
//
// - Label keys must be between 1 and 63 characters long and must conform to
// the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
// - Label values must be between 0 and 63 characters long and must conform
// to the regular expression `[a-z0-9_-]{0,63}`.
// - No more than 64 labels can be associated with a given resource.
//
// See https://goo.gl/xmQnxf for more information on and examples of labels.
//
// If you plan to use labels in your own code, please note that additional
// characters may be allowed in the future. And so you are advised to use an
// internal label representation, such as JSON, which doesn't rely upon
// specific characters being disallowed. For example, representing labels
// as the string: name + "_" + value would prove problematic if we were to
// allow "_" in a future release.
Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Deprecated. This field is not populated.
EndpointUris []string `protobuf:"bytes,8,rep,name=endpoint_uris,json=endpointUris,proto3" json:"endpoint_uris,omitempty"`
// Output only. The time at which the instance was created.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The time at which the instance was most recently updated.
UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
}
func (x *Instance) Reset() {
*x = Instance{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Instance) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Instance) ProtoMessage() {}
func (x *Instance) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 Instance.ProtoReflect.Descriptor instead.
func (*Instance) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{3}
}
func (x *Instance) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Instance) GetConfig() string {
if x != nil {
return x.Config
}
return ""
}
func (x *Instance) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (x *Instance) GetNodeCount() int32 {
if x != nil {
return x.NodeCount
}
return 0
}
func (x *Instance) GetProcessingUnits() int32 {
if x != nil {
return x.ProcessingUnits
}
return 0
}
func (x *Instance) GetAutoscalingConfig() *AutoscalingConfig {
if x != nil {
return x.AutoscalingConfig
}
return nil
}
func (x *Instance) GetState() Instance_State {
if x != nil {
return x.State
}
return Instance_STATE_UNSPECIFIED
}
func (x *Instance) GetLabels() map[string]string {
if x != nil {
return x.Labels
}
return nil
}
func (x *Instance) GetEndpointUris() []string {
if x != nil {
return x.EndpointUris
}
return nil
}
func (x *Instance) GetCreateTime() *timestamppb.Timestamp {
if x != nil {
return x.CreateTime
}
return nil
}
func (x *Instance) GetUpdateTime() *timestamppb.Timestamp {
if x != nil {
return x.UpdateTime
}
return nil
}
// The request for
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
type ListInstanceConfigsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the project for which a list of supported instance
// configurations is requested. Values are of the form
// `projects/<project>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Number of instance configurations to be returned in the response. If 0 or
// less, defaults to the server's maximum allowed page size.
PageSize int32 `protobuf:"varint,2,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.instance.v1.ListInstanceConfigsResponse.next_page_token]
// from a previous
// [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
}
func (x *ListInstanceConfigsRequest) Reset() {
*x = ListInstanceConfigsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListInstanceConfigsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListInstanceConfigsRequest) ProtoMessage() {}
func (x *ListInstanceConfigsRequest) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 ListInstanceConfigsRequest.ProtoReflect.Descriptor instead.
func (*ListInstanceConfigsRequest) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{4}
}
func (x *ListInstanceConfigsRequest) GetParent() string {
if x != nil {
return x.Parent
}
return ""
}
func (x *ListInstanceConfigsRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListInstanceConfigsRequest) GetPageToken() string {
if x != nil {
return x.PageToken
}
return ""
}
// The response for
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
type ListInstanceConfigsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The list of requested instance configurations.
InstanceConfigs []*InstanceConfig `protobuf:"bytes,1,rep,name=instance_configs,json=instanceConfigs,proto3" json:"instance_configs,omitempty"`
// `next_page_token` can be sent in a subsequent
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]
// call to fetch more of the matching instance configurations.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
}
func (x *ListInstanceConfigsResponse) Reset() {
*x = ListInstanceConfigsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListInstanceConfigsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListInstanceConfigsResponse) ProtoMessage() {}
func (x *ListInstanceConfigsResponse) ProtoReflect() protoreflect.Message {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_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 ListInstanceConfigsResponse.ProtoReflect.Descriptor instead.
func (*ListInstanceConfigsResponse) Descriptor() ([]byte, []int) {
return file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_rawDescGZIP(), []int{5}
}
func (x *ListInstanceConfigsResponse) GetInstanceConfigs() []*InstanceConfig {
if x != nil {
return x.InstanceConfigs
}
return nil
}
func (x *ListInstanceConfigsResponse) GetNextPageToken() string {
if x != nil {
return x.NextPageToken
}
return ""
}
// The request for
// [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
type GetInstanceConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The name of the requested instance configuration. Values are of
// the form `projects/<project>/instanceConfigs/<config>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetInstanceConfigRequest) Reset() {
*x = GetInstanceConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_google_spanner_admin_instance_v1_spanner_instance_admin_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInstanceConfigRequest) String() string {