-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
redis-gen.go
5689 lines (5158 loc) · 216 KB
/
redis-gen.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 2023 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package redis provides access to the Google Cloud Memorystore for Redis API.
//
// This package is DEPRECATED. Use package cloud.google.com/go/redis/apiv1 instead.
//
// For product documentation, see: https://cloud.google.com/memorystore/docs/redis/
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/redis/v1"
// ...
// ctx := context.Background()
// redisService, err := redis.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// redisService, err := redis.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// redisService, err := redis.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package redis // import "google.golang.org/api/redis/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "redis:v1"
const apiName = "redis"
const apiVersion = "v1"
const basePath = "https://redis.googleapis.com/"
const mtlsBasePath = "https://redis.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// See, edit, configure, and delete your Google Cloud data and see the
// email address for your Google Account.
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := internaloption.WithDefaultScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Locations = NewProjectsLocationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Locations *ProjectsLocationsService
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Clusters = NewProjectsLocationsClustersService(s)
rs.Instances = NewProjectsLocationsInstancesService(s)
rs.Operations = NewProjectsLocationsOperationsService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Clusters *ProjectsLocationsClustersService
Instances *ProjectsLocationsInstancesService
Operations *ProjectsLocationsOperationsService
}
func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService {
rs := &ProjectsLocationsClustersService{s: s}
return rs
}
type ProjectsLocationsClustersService struct {
s *Service
}
func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
rs := &ProjectsLocationsInstancesService{s: s}
return rs
}
type ProjectsLocationsInstancesService struct {
s *Service
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
type CertChain struct {
// Certificates: The certificates that form the CA chain, from leaf to
// root order.
Certificates []string `json:"certificates,omitempty"`
// ForceSendFields is a list of field names (e.g. "Certificates") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Certificates") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *CertChain) MarshalJSON() ([]byte, error) {
type NoMethod CertChain
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CertificateAuthority: Redis cluster certificate authority
type CertificateAuthority struct {
ManagedServerCa *ManagedCertificateAuthority `json:"managedServerCa,omitempty"`
// Name: Identifier. Unique name of the resource in this scope including
// project, location and cluster using the form:
// `projects/{project}/locations/{location}/clusters/{cluster}/certificat
// eAuthority`
Name string `json:"name,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ManagedServerCa") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ManagedServerCa") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *CertificateAuthority) MarshalJSON() ([]byte, error) {
type NoMethod CertificateAuthority
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Cluster: A cluster instance.
type Cluster struct {
// AuthorizationMode: Optional. The authorization mode of the Redis
// cluster. If not provided, auth feature is disabled for the cluster.
//
// Possible values:
// "AUTH_MODE_UNSPECIFIED" - Not set.
// "AUTH_MODE_IAM_AUTH" - IAM basic authorization mode
// "AUTH_MODE_DISABLED" - Authorization disabled mode
AuthorizationMode string `json:"authorizationMode,omitempty"`
// CreateTime: Output only. The timestamp associated with the cluster
// creation request.
CreateTime string `json:"createTime,omitempty"`
// DiscoveryEndpoints: Output only. Endpoints created on each given
// network, for Redis clients to connect to the cluster. Currently only
// one discovery endpoint is supported.
DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"`
// Name: Required. Unique name of the resource in this scope including
// project and location using the form:
// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
Name string `json:"name,omitempty"`
// PscConfigs: Required. Each PscConfig configures the consumer network
// where IPs will be designated to the cluster for client access through
// Private Service Connect Automation. Currently, only one PscConfig is
// supported.
PscConfigs []*PscConfig `json:"pscConfigs,omitempty"`
// PscConnections: Output only. PSC connections for discovery of the
// cluster topology and accessing the cluster.
PscConnections []*PscConnection `json:"pscConnections,omitempty"`
// ReplicaCount: Optional. The number of replica nodes per shard.
ReplicaCount int64 `json:"replicaCount,omitempty"`
// ShardCount: Required. Number of shards for the Redis cluster.
ShardCount int64 `json:"shardCount,omitempty"`
// SizeGb: Output only. Redis memory size in GB for the entire cluster.
SizeGb int64 `json:"sizeGb,omitempty"`
// State: Output only. The current state of this cluster. Can be
// CREATING, READY, UPDATING, DELETING and SUSPENDED
//
// Possible values:
// "STATE_UNSPECIFIED" - Not set.
// "CREATING" - Redis cluster is being created.
// "ACTIVE" - Redis cluster has been created and is fully usable.
// "UPDATING" - Redis cluster configuration is being updated.
// "DELETING" - Redis cluster is being deleted.
State string `json:"state,omitempty"`
// StateInfo: Output only. Additional information about the current
// state of the cluster.
StateInfo *StateInfo `json:"stateInfo,omitempty"`
// TransitEncryptionMode: Optional. The in-transit encryption for the
// Redis cluster. If not provided, encryption is disabled for the
// cluster.
//
// Possible values:
// "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" - In-transit encryption not
// set.
// "TRANSIT_ENCRYPTION_MODE_DISABLED" - In-transit encryption
// disabled.
// "TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" - Use server
// managed encryption for in-transit encryption.
TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"`
// Uid: Output only. System assigned, unique identifier for the cluster.
Uid string `json:"uid,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AuthorizationMode")
// to unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuthorizationMode") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Cluster) MarshalJSON() ([]byte, error) {
type NoMethod Cluster
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiscoveryEndpoint: Endpoints on each network, for Redis clients to
// connect to the cluster.
type DiscoveryEndpoint struct {
// Address: Output only. Address of the exposed Redis endpoint used by
// clients to connect to the service. The address could be either IP or
// hostname.
Address string `json:"address,omitempty"`
// Port: Output only. The port number of the exposed Redis endpoint.
Port int64 `json:"port,omitempty"`
// PscConfig: Output only. Customer configuration for where the endpoint
// is created and accessed from.
PscConfig *PscConfig `json:"pscConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "Address") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Address") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DiscoveryEndpoint) MarshalJSON() ([]byte, error) {
type NoMethod DiscoveryEndpoint
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty); }
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// ExportInstanceRequest: Request for Export.
type ExportInstanceRequest struct {
// OutputConfig: Required. Specify data to be exported.
OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputConfig") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "OutputConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ExportInstanceRequest) MarshalJSON() ([]byte, error) {
type NoMethod ExportInstanceRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// FailoverInstanceRequest: Request for Failover.
type FailoverInstanceRequest struct {
// DataProtectionMode: Optional. Available data protection modes that
// the user can choose. If it's unspecified, data protection mode will
// be LIMITED_DATA_LOSS by default.
//
// Possible values:
// "DATA_PROTECTION_MODE_UNSPECIFIED" - Defaults to LIMITED_DATA_LOSS
// if a data protection mode is not specified.
// "LIMITED_DATA_LOSS" - Instance failover will be protected with data
// loss control. More specifically, the failover will only be performed
// if the current replication offset diff between primary and replica is
// under a certain threshold.
// "FORCE_DATA_LOSS" - Instance failover will be performed without
// data loss control.
DataProtectionMode string `json:"dataProtectionMode,omitempty"`
// ForceSendFields is a list of field names (e.g. "DataProtectionMode")
// to unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DataProtectionMode") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *FailoverInstanceRequest) MarshalJSON() ([]byte, error) {
type NoMethod FailoverInstanceRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GcsDestination: The Cloud Storage location for the output content
type GcsDestination struct {
// Uri: Required. Data destination URI (e.g.
// 'gs://my_bucket/my_object'). Existing files will be overwritten.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Uri") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Uri") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GcsDestination) MarshalJSON() ([]byte, error) {
type NoMethod GcsDestination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GcsSource: The Cloud Storage location for the input content
type GcsSource struct {
// Uri: Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Uri") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Uri") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GcsSource) MarshalJSON() ([]byte, error) {
type NoMethod GcsSource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRedisV1LocationMetadata: This location metadata represents
// additional configuration options for a given location where a Redis
// instance may be created. All fields are output only. It is returned
// as content of the `google.cloud.location.Location.metadata` field.
type GoogleCloudRedisV1LocationMetadata struct {
// AvailableZones: Output only. The set of available zones in the
// location. The map is keyed by the lowercase ID of each zone, as
// defined by GCE. These keys can be specified in `location_id` or
// `alternative_location_id` fields when creating a Redis instance.
AvailableZones map[string]GoogleCloudRedisV1ZoneMetadata `json:"availableZones,omitempty"`
// ForceSendFields is a list of field names (e.g. "AvailableZones") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AvailableZones") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRedisV1LocationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRedisV1LocationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRedisV1OperationMetadata: Represents the v1 metadata of
// the long-running operation.
type GoogleCloudRedisV1OperationMetadata struct {
// ApiVersion: API version.
ApiVersion string `json:"apiVersion,omitempty"`
// CancelRequested: Specifies if cancellation was requested for the
// operation.
CancelRequested bool `json:"cancelRequested,omitempty"`
// CreateTime: Creation timestamp.
CreateTime string `json:"createTime,omitempty"`
// EndTime: End timestamp.
EndTime string `json:"endTime,omitempty"`
// StatusDetail: Operation status details.
StatusDetail string `json:"statusDetail,omitempty"`
// Target: Operation target.
Target string `json:"target,omitempty"`
// Verb: Operation verb.
Verb string `json:"verb,omitempty"`
// ForceSendFields is a list of field names (e.g. "ApiVersion") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ApiVersion") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudRedisV1OperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudRedisV1OperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudRedisV1ZoneMetadata: Defines specific information for a
// particular zone. Currently empty and reserved for future use only.
type GoogleCloudRedisV1ZoneMetadata struct {
}
// ImportInstanceRequest: Request for Import.
type ImportInstanceRequest struct {
// InputConfig: Required. Specify data to be imported.
InputConfig *InputConfig `json:"inputConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "InputConfig") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InputConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ImportInstanceRequest) MarshalJSON() ([]byte, error) {
type NoMethod ImportInstanceRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InputConfig: The input content
type InputConfig struct {
// GcsSource: Google Cloud Storage location where input content is
// located.
GcsSource *GcsSource `json:"gcsSource,omitempty"`
// ForceSendFields is a list of field names (e.g. "GcsSource") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GcsSource") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InputConfig) MarshalJSON() ([]byte, error) {
type NoMethod InputConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Instance: A Memorystore for Redis instance.
type Instance struct {
// AlternativeLocationId: Optional. If specified, at least one node will
// be provisioned in this zone in addition to the zone specified in
// location_id. Only applicable to standard tier. If provided, it must
// be a different zone from the one provided in [location_id].
// Additional nodes beyond the first 2 will be placed in zones selected
// by the service.
AlternativeLocationId string `json:"alternativeLocationId,omitempty"`
// AuthEnabled: Optional. Indicates whether OSS Redis AUTH is enabled
// for the instance. If set to "true" AUTH is enabled on the instance.
// Default value is "false" meaning AUTH is disabled.
AuthEnabled bool `json:"authEnabled,omitempty"`
// AuthorizedNetwork: Optional. The full name of the Google Compute
// Engine network (https://cloud.google.com/vpc/docs/vpc) to which the
// instance is connected. If left unspecified, the `default` network
// will be used.
AuthorizedNetwork string `json:"authorizedNetwork,omitempty"`
// AvailableMaintenanceVersions: Optional. The available maintenance
// versions that an instance could update to.
AvailableMaintenanceVersions []string `json:"availableMaintenanceVersions,omitempty"`
// ConnectMode: Optional. The network connect mode of the Redis
// instance. If not provided, the connect mode defaults to
// DIRECT_PEERING.
//
// Possible values:
// "CONNECT_MODE_UNSPECIFIED" - Not set.
// "DIRECT_PEERING" - Connect via direct peering to the Memorystore
// for Redis hosted service.
// "PRIVATE_SERVICE_ACCESS" - Connect your Memorystore for Redis
// instance using Private Service Access. Private services access
// provides an IP address range for multiple Google Cloud services,
// including Memorystore.
ConnectMode string `json:"connectMode,omitempty"`
// CreateTime: Output only. The time the instance was created.
CreateTime string `json:"createTime,omitempty"`
// CurrentLocationId: Output only. The current zone where the Redis
// primary node is located. In basic tier, this will always be the same
// as [location_id]. In standard tier, this can be the zone of any node
// in the instance.
CurrentLocationId string `json:"currentLocationId,omitempty"`
// CustomerManagedKey: Optional. The KMS key reference that the customer
// provides when trying to create the instance.
CustomerManagedKey string `json:"customerManagedKey,omitempty"`
// DisplayName: An arbitrary and optional user-provided name for the
// instance.
DisplayName string `json:"displayName,omitempty"`
// Host: Output only. Hostname or IP address of the exposed Redis
// endpoint used by clients to connect to the service.
Host string `json:"host,omitempty"`
// Labels: Resource labels to represent user provided metadata
Labels map[string]string `json:"labels,omitempty"`
// LocationId: Optional. The zone where the instance will be
// provisioned. If not provided, the service will choose a zone from the
// specified region for the instance. For standard tier, additional
// nodes will be added across multiple zones for protection against
// zonal failures. If specified, at least one node will be provisioned
// in this zone.
LocationId string `json:"locationId,omitempty"`
// MaintenancePolicy: Optional. The maintenance policy for the instance.
// If not provided, maintenance events can be performed at any time.
MaintenancePolicy *MaintenancePolicy `json:"maintenancePolicy,omitempty"`
// MaintenanceSchedule: Output only. Date and time of upcoming
// maintenance events which have been scheduled.
MaintenanceSchedule *MaintenanceSchedule `json:"maintenanceSchedule,omitempty"`
// MaintenanceVersion: Optional. The self service update maintenance
// version. The version is date based such as "20210712_00_00".
MaintenanceVersion string `json:"maintenanceVersion,omitempty"`
// MemorySizeGb: Required. Redis memory size in GiB.
MemorySizeGb int64 `json:"memorySizeGb,omitempty"`
// Name: Required. Unique name of the resource in this scope including
// project and location using the form:
// `projects/{project_id}/locations/{location_id}/instances/{instance_id}
// ` Note: Redis instances are managed and addressed at regional level
// so location_id here refers to a GCP region; however, users may choose
// which specific zone (or collection of zones for cross-zone instances)
// an instance should be provisioned in. Refer to location_id and
// alternative_location_id fields for more details.
Name string `json:"name,omitempty"`
// Nodes: Output only. Info per node.
Nodes []*NodeInfo `json:"nodes,omitempty"`
// PersistenceConfig: Optional. Persistence configuration parameters
PersistenceConfig *PersistenceConfig `json:"persistenceConfig,omitempty"`
// PersistenceIamIdentity: Output only. Cloud IAM identity used by
// import / export operations to transfer data to/from Cloud Storage.
// Format is "serviceAccount:". The value may change over time for a
// given instance so should be checked before each import/export
// operation.
PersistenceIamIdentity string `json:"persistenceIamIdentity,omitempty"`
// Port: Output only. The port number of the exposed Redis endpoint.
Port int64 `json:"port,omitempty"`
// ReadEndpoint: Output only. Hostname or IP address of the exposed
// readonly Redis endpoint. Standard tier only. Targets all healthy
// replica nodes in instance. Replication is asynchronous and replica
// nodes will exhibit some lag behind the primary. Write requests must
// target 'host'.
ReadEndpoint string `json:"readEndpoint,omitempty"`
// ReadEndpointPort: Output only. The port number of the exposed
// readonly redis endpoint. Standard tier only. Write requests should
// target 'port'.
ReadEndpointPort int64 `json:"readEndpointPort,omitempty"`
// ReadReplicasMode: Optional. Read replicas mode for the instance.
// Defaults to READ_REPLICAS_DISABLED.
//
// Possible values:
// "READ_REPLICAS_MODE_UNSPECIFIED" - If not set, Memorystore Redis
// backend will default to READ_REPLICAS_DISABLED.
// "READ_REPLICAS_DISABLED" - If disabled, read endpoint will not be
// provided and the instance cannot scale up or down the number of
// replicas.
// "READ_REPLICAS_ENABLED" - If enabled, read endpoint will be
// provided and the instance can scale up and down the number of
// replicas. Not valid for basic tier.
ReadReplicasMode string `json:"readReplicasMode,omitempty"`
// RedisConfigs: Optional. Redis configuration parameters, according to
// http://redis.io/topics/config. Currently, the only supported
// parameters are: Redis version 3.2 and newer: * maxmemory-policy *
// notify-keyspace-events Redis version 4.0 and newer: * activedefrag *
// lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and
// newer: * stream-node-max-bytes * stream-node-max-entries
RedisConfigs map[string]string `json:"redisConfigs,omitempty"`
// RedisVersion: Optional. The version of Redis software. If not
// provided, latest supported version will be used. Currently, the
// supported values are: * `REDIS_3_2` for Redis 3.2 compatibility *
// `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for
// Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility
RedisVersion string `json:"redisVersion,omitempty"`
// ReplicaCount: Optional. The number of replica nodes. The valid range
// for the Standard Tier with read replicas enabled is [1-5] and
// defaults to 2. If read replicas are not enabled for a Standard Tier
// instance, the only valid value is 1 and the default is 1. The valid
// value for basic tier is 0 and the default is also 0.
ReplicaCount int64 `json:"replicaCount,omitempty"`
// ReservedIpRange: Optional. For DIRECT_PEERING mode, the CIDR range of
// internal addresses that are reserved for this instance. Range must be
// unique and non-overlapping with existing subnets in an authorized
// network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated
// IP address ranges associated with this private service access
// connection. If not provided, the service will choose an unused /29
// block, for example, 10.0.0.0/29 or 192.168.0.0/29. For
// READ_REPLICAS_ENABLED the default block size is /28.
ReservedIpRange string `json:"reservedIpRange,omitempty"`
// SecondaryIpRange: Optional. Additional IP range for node placement.
// Required when enabling read replicas on an existing instance. For
// DIRECT_PEERING mode value must be a CIDR range of size /28, or
// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an
// allocated address range associated with the private service access
// connection, or "auto".
SecondaryIpRange string `json:"secondaryIpRange,omitempty"`
// ServerCaCerts: Output only. List of server CA certificates for the
// instance.
ServerCaCerts []*TlsCertificate `json:"serverCaCerts,omitempty"`
// State: Output only. The current state of this instance.
//
// Possible values:
// "STATE_UNSPECIFIED" - Not set.
// "CREATING" - Redis instance is being created.
// "READY" - Redis instance has been created and is fully usable.
// "UPDATING" - Redis instance configuration is being updated. Certain
// kinds of updates may cause the instance to become unusable while the
// update is in progress.
// "DELETING" - Redis instance is being deleted.
// "REPAIRING" - Redis instance is being repaired and may be unusable.
// "MAINTENANCE" - Maintenance is being performed on this Redis
// instance.
// "IMPORTING" - Redis instance is importing data (availability may be
// affected).
// "FAILING_OVER" - Redis instance is failing over (availability may
// be affected).
State string `json:"state,omitempty"`
// StatusMessage: Output only. Additional information about the current
// status of this instance, if available.
StatusMessage string `json:"statusMessage,omitempty"`
// SuspensionReasons: Optional. reasons that causes instance in
// "SUSPENDED" state.
//
// Possible values:
// "SUSPENSION_REASON_UNSPECIFIED" - Not set.
// "CUSTOMER_MANAGED_KEY_ISSUE" - Something wrong with the CMEK key
// provided by customer.
SuspensionReasons []string `json:"suspensionReasons,omitempty"`
// Tier: Required. The service tier of the instance.
//
// Possible values:
// "TIER_UNSPECIFIED" - Not set.
// "BASIC" - BASIC tier: standalone instance
// "STANDARD_HA" - STANDARD_HA tier: highly available primary/replica
// instances
Tier string `json:"tier,omitempty"`
// TransitEncryptionMode: Optional. The TLS mode of the Redis instance.
// If not provided, TLS is disabled for the instance.
//
// Possible values:
// "TRANSIT_ENCRYPTION_MODE_UNSPECIFIED" - Not set.
// "SERVER_AUTHENTICATION" - Client to Server traffic encryption
// enabled with server authentication.
// "DISABLED" - TLS is disabled for the instance.
TransitEncryptionMode string `json:"transitEncryptionMode,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "AlternativeLocationId") to unconditionally include in API requests.
// By default, fields with empty or default values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AlternativeLocationId") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Instance) MarshalJSON() ([]byte, error) {
type NoMethod Instance
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstanceAuthString: Instance AUTH string details.
type InstanceAuthString struct {
// AuthString: AUTH string set on the instance.
AuthString string `json:"authString,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "AuthString") to
// unconditionally include in API requests. By default, fields with
// empty or default values are omitted from API requests. However, any
// non-pointer, non-interface field appearing in ForceSendFields will be
// sent to the server regardless of whether the field is empty or not.
// This may be used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AuthString") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstanceAuthString) MarshalJSON() ([]byte, error) {
type NoMethod InstanceAuthString
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ListClustersResponse: Response for ListClusters.
type ListClustersResponse struct {
// Clusters: A list of Redis clusters in the project in the specified
// location, or across all locations. If the `location_id` in the parent
// field of the request is "-", all regions available to the project are