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 package bigtableadmin
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "bigtableadmin:v2"
95 const apiName = "bigtableadmin"
96 const apiVersion = "v2"
97 const basePath = "https://bigtableadmin.googleapis.com/"
98 const basePathTemplate = "https://bigtableadmin.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://bigtableadmin.mtls.googleapis.com/"
100
101
102 const (
103
104 BigtableAdminScope = "https://www.googleapis.com/auth/bigtable.admin"
105
106
107 BigtableAdminClusterScope = "https://www.googleapis.com/auth/bigtable.admin.cluster"
108
109
110 BigtableAdminInstanceScope = "https://www.googleapis.com/auth/bigtable.admin.instance"
111
112
113 BigtableAdminTableScope = "https://www.googleapis.com/auth/bigtable.admin.table"
114
115
116 CloudBigtableAdminScope = "https://www.googleapis.com/auth/cloud-bigtable.admin"
117
118
119 CloudBigtableAdminClusterScope = "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster"
120
121
122 CloudBigtableAdminTableScope = "https://www.googleapis.com/auth/cloud-bigtable.admin.table"
123
124
125
126 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
127
128
129
130 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
131 )
132
133
134 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
135 scopesOption := internaloption.WithDefaultScopes(
136 "https://www.googleapis.com/auth/bigtable.admin",
137 "https://www.googleapis.com/auth/bigtable.admin.cluster",
138 "https://www.googleapis.com/auth/bigtable.admin.instance",
139 "https://www.googleapis.com/auth/bigtable.admin.table",
140 "https://www.googleapis.com/auth/cloud-bigtable.admin",
141 "https://www.googleapis.com/auth/cloud-bigtable.admin.cluster",
142 "https://www.googleapis.com/auth/cloud-bigtable.admin.table",
143 "https://www.googleapis.com/auth/cloud-platform",
144 "https://www.googleapis.com/auth/cloud-platform.read-only",
145 )
146
147 opts = append([]option.ClientOption{scopesOption}, opts...)
148 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
149 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
150 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
151 opts = append(opts, internaloption.EnableNewAuthLibrary())
152 client, endpoint, err := htransport.NewClient(ctx, opts...)
153 if err != nil {
154 return nil, err
155 }
156 s, err := New(client)
157 if err != nil {
158 return nil, err
159 }
160 if endpoint != "" {
161 s.BasePath = endpoint
162 }
163 return s, nil
164 }
165
166
167
168
169
170
171 func New(client *http.Client) (*Service, error) {
172 if client == nil {
173 return nil, errors.New("client is nil")
174 }
175 s := &Service{client: client, BasePath: basePath}
176 s.Operations = NewOperationsService(s)
177 s.Projects = NewProjectsService(s)
178 return s, nil
179 }
180
181 type Service struct {
182 client *http.Client
183 BasePath string
184 UserAgent string
185
186 Operations *OperationsService
187
188 Projects *ProjectsService
189 }
190
191 func (s *Service) userAgent() string {
192 if s.UserAgent == "" {
193 return googleapi.UserAgent
194 }
195 return googleapi.UserAgent + " " + s.UserAgent
196 }
197
198 func NewOperationsService(s *Service) *OperationsService {
199 rs := &OperationsService{s: s}
200 rs.Projects = NewOperationsProjectsService(s)
201 return rs
202 }
203
204 type OperationsService struct {
205 s *Service
206
207 Projects *OperationsProjectsService
208 }
209
210 func NewOperationsProjectsService(s *Service) *OperationsProjectsService {
211 rs := &OperationsProjectsService{s: s}
212 rs.Operations = NewOperationsProjectsOperationsService(s)
213 return rs
214 }
215
216 type OperationsProjectsService struct {
217 s *Service
218
219 Operations *OperationsProjectsOperationsService
220 }
221
222 func NewOperationsProjectsOperationsService(s *Service) *OperationsProjectsOperationsService {
223 rs := &OperationsProjectsOperationsService{s: s}
224 return rs
225 }
226
227 type OperationsProjectsOperationsService struct {
228 s *Service
229 }
230
231 func NewProjectsService(s *Service) *ProjectsService {
232 rs := &ProjectsService{s: s}
233 rs.Instances = NewProjectsInstancesService(s)
234 rs.Locations = NewProjectsLocationsService(s)
235 return rs
236 }
237
238 type ProjectsService struct {
239 s *Service
240
241 Instances *ProjectsInstancesService
242
243 Locations *ProjectsLocationsService
244 }
245
246 func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
247 rs := &ProjectsInstancesService{s: s}
248 rs.AppProfiles = NewProjectsInstancesAppProfilesService(s)
249 rs.Clusters = NewProjectsInstancesClustersService(s)
250 rs.Tables = NewProjectsInstancesTablesService(s)
251 return rs
252 }
253
254 type ProjectsInstancesService struct {
255 s *Service
256
257 AppProfiles *ProjectsInstancesAppProfilesService
258
259 Clusters *ProjectsInstancesClustersService
260
261 Tables *ProjectsInstancesTablesService
262 }
263
264 func NewProjectsInstancesAppProfilesService(s *Service) *ProjectsInstancesAppProfilesService {
265 rs := &ProjectsInstancesAppProfilesService{s: s}
266 return rs
267 }
268
269 type ProjectsInstancesAppProfilesService struct {
270 s *Service
271 }
272
273 func NewProjectsInstancesClustersService(s *Service) *ProjectsInstancesClustersService {
274 rs := &ProjectsInstancesClustersService{s: s}
275 rs.Backups = NewProjectsInstancesClustersBackupsService(s)
276 rs.HotTablets = NewProjectsInstancesClustersHotTabletsService(s)
277 return rs
278 }
279
280 type ProjectsInstancesClustersService struct {
281 s *Service
282
283 Backups *ProjectsInstancesClustersBackupsService
284
285 HotTablets *ProjectsInstancesClustersHotTabletsService
286 }
287
288 func NewProjectsInstancesClustersBackupsService(s *Service) *ProjectsInstancesClustersBackupsService {
289 rs := &ProjectsInstancesClustersBackupsService{s: s}
290 return rs
291 }
292
293 type ProjectsInstancesClustersBackupsService struct {
294 s *Service
295 }
296
297 func NewProjectsInstancesClustersHotTabletsService(s *Service) *ProjectsInstancesClustersHotTabletsService {
298 rs := &ProjectsInstancesClustersHotTabletsService{s: s}
299 return rs
300 }
301
302 type ProjectsInstancesClustersHotTabletsService struct {
303 s *Service
304 }
305
306 func NewProjectsInstancesTablesService(s *Service) *ProjectsInstancesTablesService {
307 rs := &ProjectsInstancesTablesService{s: s}
308 rs.AuthorizedViews = NewProjectsInstancesTablesAuthorizedViewsService(s)
309 return rs
310 }
311
312 type ProjectsInstancesTablesService struct {
313 s *Service
314
315 AuthorizedViews *ProjectsInstancesTablesAuthorizedViewsService
316 }
317
318 func NewProjectsInstancesTablesAuthorizedViewsService(s *Service) *ProjectsInstancesTablesAuthorizedViewsService {
319 rs := &ProjectsInstancesTablesAuthorizedViewsService{s: s}
320 return rs
321 }
322
323 type ProjectsInstancesTablesAuthorizedViewsService struct {
324 s *Service
325 }
326
327 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
328 rs := &ProjectsLocationsService{s: s}
329 return rs
330 }
331
332 type ProjectsLocationsService struct {
333 s *Service
334 }
335
336
337
338 type AppProfile struct {
339
340
341 DataBoostIsolationReadOnly *DataBoostIsolationReadOnly `json:"dataBoostIsolationReadOnly,omitempty"`
342
343 Description string `json:"description,omitempty"`
344
345
346
347
348
349
350 Etag string `json:"etag,omitempty"`
351
352 MultiClusterRoutingUseAny *MultiClusterRoutingUseAny `json:"multiClusterRoutingUseAny,omitempty"`
353
354
355 Name string `json:"name,omitempty"`
356
357
358
359
360
361
362
363
364
365
366
367 Priority string `json:"priority,omitempty"`
368
369 SingleClusterRouting *SingleClusterRouting `json:"singleClusterRouting,omitempty"`
370
371
372 StandardIsolation *StandardIsolation `json:"standardIsolation,omitempty"`
373
374
375 googleapi.ServerResponse `json:"-"`
376
377
378
379
380
381 ForceSendFields []string `json:"-"`
382
383
384
385
386 NullFields []string `json:"-"`
387 }
388
389 func (s *AppProfile) MarshalJSON() ([]byte, error) {
390 type NoMethod AppProfile
391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
392 }
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410 type AuditConfig struct {
411
412 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
413
414
415
416 Service string `json:"service,omitempty"`
417
418
419
420
421
422 ForceSendFields []string `json:"-"`
423
424
425
426
427 NullFields []string `json:"-"`
428 }
429
430 func (s *AuditConfig) MarshalJSON() ([]byte, error) {
431 type NoMethod AuditConfig
432 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
433 }
434
435
436
437
438
439
440 type AuditLogConfig struct {
441
442
443 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
444
445
446
447
448
449
450
451 LogType string `json:"logType,omitempty"`
452
453
454
455
456
457 ForceSendFields []string `json:"-"`
458
459
460
461
462 NullFields []string `json:"-"`
463 }
464
465 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
466 type NoMethod AuditLogConfig
467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
468 }
469
470
471 type AuthorizedView struct {
472
473
474
475 DeletionProtection bool `json:"deletionProtection,omitempty"`
476
477
478
479 Etag string `json:"etag,omitempty"`
480
481
482
483 Name string `json:"name,omitempty"`
484
485
486 SubsetView *GoogleBigtableAdminV2AuthorizedViewSubsetView `json:"subsetView,omitempty"`
487
488
489 googleapi.ServerResponse `json:"-"`
490
491
492
493
494
495 ForceSendFields []string `json:"-"`
496
497
498
499
500 NullFields []string `json:"-"`
501 }
502
503 func (s *AuthorizedView) MarshalJSON() ([]byte, error) {
504 type NoMethod AuthorizedView
505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
506 }
507
508
509 type AutomatedBackupPolicy struct {
510
511
512 Frequency string `json:"frequency,omitempty"`
513
514
515 RetentionPeriod string `json:"retentionPeriod,omitempty"`
516
517
518
519
520
521 ForceSendFields []string `json:"-"`
522
523
524
525
526 NullFields []string `json:"-"`
527 }
528
529 func (s *AutomatedBackupPolicy) MarshalJSON() ([]byte, error) {
530 type NoMethod AutomatedBackupPolicy
531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
532 }
533
534
535
536 type AutoscalingLimits struct {
537
538 MaxServeNodes int64 `json:"maxServeNodes,omitempty"`
539
540 MinServeNodes int64 `json:"minServeNodes,omitempty"`
541
542
543
544
545
546 ForceSendFields []string `json:"-"`
547
548
549
550
551 NullFields []string `json:"-"`
552 }
553
554 func (s *AutoscalingLimits) MarshalJSON() ([]byte, error) {
555 type NoMethod AutoscalingLimits
556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
557 }
558
559
560
561 type AutoscalingTargets struct {
562
563
564
565
566 CpuUtilizationPercent int64 `json:"cpuUtilizationPercent,omitempty"`
567
568
569
570
571
572
573 StorageUtilizationGibPerNode int64 `json:"storageUtilizationGibPerNode,omitempty"`
574
575
576
577
578
579 ForceSendFields []string `json:"-"`
580
581
582
583
584 NullFields []string `json:"-"`
585 }
586
587 func (s *AutoscalingTargets) MarshalJSON() ([]byte, error) {
588 type NoMethod AutoscalingTargets
589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
590 }
591
592
593 type Backup struct {
594
595 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
596
597
598 EndTime string `json:"endTime,omitempty"`
599
600
601
602
603 ExpireTime string `json:"expireTime,omitempty"`
604
605
606
607
608
609
610
611 Name string `json:"name,omitempty"`
612
613 SizeBytes int64 `json:"sizeBytes,omitempty,string"`
614
615
616
617 SourceBackup string `json:"sourceBackup,omitempty"`
618
619
620
621 SourceTable string `json:"sourceTable,omitempty"`
622
623
624
625 StartTime string `json:"startTime,omitempty"`
626
627
628
629
630
631
632
633 State string `json:"state,omitempty"`
634
635
636 googleapi.ServerResponse `json:"-"`
637
638
639
640
641
642 ForceSendFields []string `json:"-"`
643
644
645
646
647 NullFields []string `json:"-"`
648 }
649
650 func (s *Backup) MarshalJSON() ([]byte, error) {
651 type NoMethod Backup
652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
653 }
654
655
656 type BackupInfo struct {
657
658 Backup string `json:"backup,omitempty"`
659
660
661 EndTime string `json:"endTime,omitempty"`
662
663
664
665 SourceBackup string `json:"sourceBackup,omitempty"`
666
667 SourceTable string `json:"sourceTable,omitempty"`
668
669
670 StartTime string `json:"startTime,omitempty"`
671
672
673
674
675
676 ForceSendFields []string `json:"-"`
677
678
679
680
681 NullFields []string `json:"-"`
682 }
683
684 func (s *BackupInfo) MarshalJSON() ([]byte, error) {
685 type NoMethod BackupInfo
686 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
687 }
688
689
690 type Binding struct {
691
692
693
694
695
696
697
698
699 Condition *Expr `json:"condition,omitempty"`
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 Members []string `json:"members,omitempty"`
763
764
765
766
767
768
769 Role string `json:"role,omitempty"`
770
771
772
773
774
775 ForceSendFields []string `json:"-"`
776
777
778
779
780 NullFields []string `json:"-"`
781 }
782
783 func (s *Binding) MarshalJSON() ([]byte, error) {
784 type NoMethod Binding
785 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
786 }
787
788
789 type ChangeStreamConfig struct {
790
791
792
793
794 RetentionPeriod string `json:"retentionPeriod,omitempty"`
795
796
797
798
799
800 ForceSendFields []string `json:"-"`
801
802
803
804
805 NullFields []string `json:"-"`
806 }
807
808 func (s *ChangeStreamConfig) MarshalJSON() ([]byte, error) {
809 type NoMethod ChangeStreamConfig
810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
811 }
812
813
814
815 type CheckConsistencyRequest struct {
816
817
818 ConsistencyToken string `json:"consistencyToken,omitempty"`
819
820
821
822 DataBoostReadLocalWrites *DataBoostReadLocalWrites `json:"dataBoostReadLocalWrites,omitempty"`
823
824
825
826 StandardReadRemoteWrites *StandardReadRemoteWrites `json:"standardReadRemoteWrites,omitempty"`
827
828
829
830
831
832 ForceSendFields []string `json:"-"`
833
834
835
836
837 NullFields []string `json:"-"`
838 }
839
840 func (s *CheckConsistencyRequest) MarshalJSON() ([]byte, error) {
841 type NoMethod CheckConsistencyRequest
842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
843 }
844
845
846
847 type CheckConsistencyResponse struct {
848
849
850 Consistent bool `json:"consistent,omitempty"`
851
852
853 googleapi.ServerResponse `json:"-"`
854
855
856
857
858
859 ForceSendFields []string `json:"-"`
860
861
862
863
864 NullFields []string `json:"-"`
865 }
866
867 func (s *CheckConsistencyResponse) MarshalJSON() ([]byte, error) {
868 type NoMethod CheckConsistencyResponse
869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
870 }
871
872
873
874 type Cluster struct {
875
876 ClusterConfig *ClusterConfig `json:"clusterConfig,omitempty"`
877
878
879
880
881
882
883
884 DefaultStorageType string `json:"defaultStorageType,omitempty"`
885
886
887 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
888
889
890
891
892 Location string `json:"location,omitempty"`
893
894
895 Name string `json:"name,omitempty"`
896
897
898
899 ServeNodes int64 `json:"serveNodes,omitempty"`
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916 State string `json:"state,omitempty"`
917
918
919 googleapi.ServerResponse `json:"-"`
920
921
922
923
924
925 ForceSendFields []string `json:"-"`
926
927
928
929
930 NullFields []string `json:"-"`
931 }
932
933 func (s *Cluster) MarshalJSON() ([]byte, error) {
934 type NoMethod Cluster
935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
936 }
937
938
939 type ClusterAutoscalingConfig struct {
940
941 AutoscalingLimits *AutoscalingLimits `json:"autoscalingLimits,omitempty"`
942
943 AutoscalingTargets *AutoscalingTargets `json:"autoscalingTargets,omitempty"`
944
945
946
947
948
949 ForceSendFields []string `json:"-"`
950
951
952
953
954 NullFields []string `json:"-"`
955 }
956
957 func (s *ClusterAutoscalingConfig) MarshalJSON() ([]byte, error) {
958 type NoMethod ClusterAutoscalingConfig
959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
960 }
961
962
963 type ClusterConfig struct {
964
965 ClusterAutoscalingConfig *ClusterAutoscalingConfig `json:"clusterAutoscalingConfig,omitempty"`
966
967
968
969
970
971 ForceSendFields []string `json:"-"`
972
973
974
975
976 NullFields []string `json:"-"`
977 }
978
979 func (s *ClusterConfig) MarshalJSON() ([]byte, error) {
980 type NoMethod ClusterConfig
981 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
982 }
983
984
985 type ClusterState struct {
986
987
988
989
990
991 EncryptionInfo []*EncryptionInfo `json:"encryptionInfo,omitempty"`
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011 ReplicationState string `json:"replicationState,omitempty"`
1012
1013
1014
1015
1016
1017 ForceSendFields []string `json:"-"`
1018
1019
1020
1021
1022 NullFields []string `json:"-"`
1023 }
1024
1025 func (s *ClusterState) MarshalJSON() ([]byte, error) {
1026 type NoMethod ClusterState
1027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1028 }
1029
1030
1031
1032 type ColumnFamily struct {
1033
1034
1035
1036
1037 GcRule *GcRule `json:"gcRule,omitempty"`
1038
1039
1040
1041 Stats *ColumnFamilyStats `json:"stats,omitempty"`
1042
1043
1044
1045
1046
1047
1048 ValueType *Type `json:"valueType,omitempty"`
1049
1050
1051
1052
1053
1054 ForceSendFields []string `json:"-"`
1055
1056
1057
1058
1059 NullFields []string `json:"-"`
1060 }
1061
1062 func (s *ColumnFamily) MarshalJSON() ([]byte, error) {
1063 type NoMethod ColumnFamily
1064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1065 }
1066
1067
1068
1069
1070
1071 type ColumnFamilyStats struct {
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081 AverageCellsPerColumn float64 `json:"averageCellsPerColumn,omitempty"`
1082
1083
1084
1085
1086
1087
1088
1089 AverageColumnsPerRow float64 `json:"averageColumnsPerRow,omitempty"`
1090
1091
1092
1093 LogicalDataBytes int64 `json:"logicalDataBytes,omitempty,string"`
1094
1095
1096
1097
1098
1099 ForceSendFields []string `json:"-"`
1100
1101
1102
1103
1104 NullFields []string `json:"-"`
1105 }
1106
1107 func (s *ColumnFamilyStats) MarshalJSON() ([]byte, error) {
1108 type NoMethod ColumnFamilyStats
1109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1110 }
1111
1112 func (s *ColumnFamilyStats) UnmarshalJSON(data []byte) error {
1113 type NoMethod ColumnFamilyStats
1114 var s1 struct {
1115 AverageCellsPerColumn gensupport.JSONFloat64 `json:"averageCellsPerColumn"`
1116 AverageColumnsPerRow gensupport.JSONFloat64 `json:"averageColumnsPerRow"`
1117 *NoMethod
1118 }
1119 s1.NoMethod = (*NoMethod)(s)
1120 if err := json.Unmarshal(data, &s1); err != nil {
1121 return err
1122 }
1123 s.AverageCellsPerColumn = float64(s1.AverageCellsPerColumn)
1124 s.AverageColumnsPerRow = float64(s1.AverageColumnsPerRow)
1125 return nil
1126 }
1127
1128
1129
1130 type CopyBackupMetadata struct {
1131
1132
1133 Name string `json:"name,omitempty"`
1134
1135 Progress *OperationProgress `json:"progress,omitempty"`
1136
1137
1138 SourceBackupInfo *BackupInfo `json:"sourceBackupInfo,omitempty"`
1139
1140
1141
1142
1143
1144 ForceSendFields []string `json:"-"`
1145
1146
1147
1148
1149 NullFields []string `json:"-"`
1150 }
1151
1152 func (s *CopyBackupMetadata) MarshalJSON() ([]byte, error) {
1153 type NoMethod CopyBackupMetadata
1154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1155 }
1156
1157
1158 type CopyBackupRequest struct {
1159
1160
1161
1162
1163
1164
1165 BackupId string `json:"backupId,omitempty"`
1166
1167
1168
1169
1170
1171 ExpireTime string `json:"expireTime,omitempty"`
1172
1173
1174
1175
1176
1177 SourceBackup string `json:"sourceBackup,omitempty"`
1178
1179
1180
1181
1182
1183 ForceSendFields []string `json:"-"`
1184
1185
1186
1187
1188 NullFields []string `json:"-"`
1189 }
1190
1191 func (s *CopyBackupRequest) MarshalJSON() ([]byte, error) {
1192 type NoMethod CopyBackupRequest
1193 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1194 }
1195
1196
1197
1198 type CreateAuthorizedViewMetadata struct {
1199
1200
1201 FinishTime string `json:"finishTime,omitempty"`
1202
1203
1204 OriginalRequest *CreateAuthorizedViewRequest `json:"originalRequest,omitempty"`
1205
1206 RequestTime string `json:"requestTime,omitempty"`
1207
1208
1209
1210
1211
1212 ForceSendFields []string `json:"-"`
1213
1214
1215
1216
1217 NullFields []string `json:"-"`
1218 }
1219
1220 func (s *CreateAuthorizedViewMetadata) MarshalJSON() ([]byte, error) {
1221 type NoMethod CreateAuthorizedViewMetadata
1222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1223 }
1224
1225
1226 type CreateAuthorizedViewRequest struct {
1227
1228 AuthorizedView *AuthorizedView `json:"authorizedView,omitempty"`
1229
1230
1231
1232
1233
1234 AuthorizedViewId string `json:"authorizedViewId,omitempty"`
1235
1236
1237
1238 Parent string `json:"parent,omitempty"`
1239
1240
1241
1242
1243
1244 ForceSendFields []string `json:"-"`
1245
1246
1247
1248
1249 NullFields []string `json:"-"`
1250 }
1251
1252 func (s *CreateAuthorizedViewRequest) MarshalJSON() ([]byte, error) {
1253 type NoMethod CreateAuthorizedViewRequest
1254 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1255 }
1256
1257
1258
1259 type CreateBackupMetadata struct {
1260
1261 EndTime string `json:"endTime,omitempty"`
1262
1263 Name string `json:"name,omitempty"`
1264
1265 SourceTable string `json:"sourceTable,omitempty"`
1266
1267 StartTime string `json:"startTime,omitempty"`
1268
1269
1270
1271
1272
1273 ForceSendFields []string `json:"-"`
1274
1275
1276
1277
1278 NullFields []string `json:"-"`
1279 }
1280
1281 func (s *CreateBackupMetadata) MarshalJSON() ([]byte, error) {
1282 type NoMethod CreateBackupMetadata
1283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1284 }
1285
1286
1287
1288 type CreateClusterMetadata struct {
1289
1290
1291 FinishTime string `json:"finishTime,omitempty"`
1292
1293
1294 OriginalRequest *CreateClusterRequest `json:"originalRequest,omitempty"`
1295
1296 RequestTime string `json:"requestTime,omitempty"`
1297
1298
1299
1300
1301
1302 Tables map[string]TableProgress `json:"tables,omitempty"`
1303
1304
1305
1306
1307
1308 ForceSendFields []string `json:"-"`
1309
1310
1311
1312
1313 NullFields []string `json:"-"`
1314 }
1315
1316 func (s *CreateClusterMetadata) MarshalJSON() ([]byte, error) {
1317 type NoMethod CreateClusterMetadata
1318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1319 }
1320
1321
1322
1323 type CreateClusterRequest struct {
1324
1325
1326 Cluster *Cluster `json:"cluster,omitempty"`
1327
1328
1329
1330 ClusterId string `json:"clusterId,omitempty"`
1331
1332
1333 Parent string `json:"parent,omitempty"`
1334
1335
1336
1337
1338
1339 ForceSendFields []string `json:"-"`
1340
1341
1342
1343
1344 NullFields []string `json:"-"`
1345 }
1346
1347 func (s *CreateClusterRequest) MarshalJSON() ([]byte, error) {
1348 type NoMethod CreateClusterRequest
1349 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1350 }
1351
1352
1353
1354 type CreateInstanceMetadata struct {
1355
1356
1357 FinishTime string `json:"finishTime,omitempty"`
1358
1359
1360 OriginalRequest *CreateInstanceRequest `json:"originalRequest,omitempty"`
1361
1362 RequestTime string `json:"requestTime,omitempty"`
1363
1364
1365
1366
1367
1368 ForceSendFields []string `json:"-"`
1369
1370
1371
1372
1373 NullFields []string `json:"-"`
1374 }
1375
1376 func (s *CreateInstanceMetadata) MarshalJSON() ([]byte, error) {
1377 type NoMethod CreateInstanceMetadata
1378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1379 }
1380
1381
1382
1383 type CreateInstanceRequest struct {
1384
1385
1386
1387
1388 Clusters map[string]Cluster `json:"clusters,omitempty"`
1389
1390
1391 Instance *Instance `json:"instance,omitempty"`
1392
1393
1394
1395 InstanceId string `json:"instanceId,omitempty"`
1396
1397
1398 Parent string `json:"parent,omitempty"`
1399
1400
1401
1402
1403
1404 ForceSendFields []string `json:"-"`
1405
1406
1407
1408
1409 NullFields []string `json:"-"`
1410 }
1411
1412 func (s *CreateInstanceRequest) MarshalJSON() ([]byte, error) {
1413 type NoMethod CreateInstanceRequest
1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1415 }
1416
1417
1418
1419 type CreateTableRequest struct {
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430 InitialSplits []*Split `json:"initialSplits,omitempty"`
1431
1432 Table *Table `json:"table,omitempty"`
1433
1434
1435
1436 TableId string `json:"tableId,omitempty"`
1437
1438
1439
1440
1441
1442 ForceSendFields []string `json:"-"`
1443
1444
1445
1446
1447 NullFields []string `json:"-"`
1448 }
1449
1450 func (s *CreateTableRequest) MarshalJSON() ([]byte, error) {
1451 type NoMethod CreateTableRequest
1452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1453 }
1454
1455
1456
1457
1458
1459
1460 type DataBoostIsolationReadOnly struct {
1461
1462
1463
1464
1465
1466
1467
1468 ComputeBillingOwner string `json:"computeBillingOwner,omitempty"`
1469
1470
1471
1472
1473
1474 ForceSendFields []string `json:"-"`
1475
1476
1477
1478
1479 NullFields []string `json:"-"`
1480 }
1481
1482 func (s *DataBoostIsolationReadOnly) MarshalJSON() ([]byte, error) {
1483 type NoMethod DataBoostIsolationReadOnly
1484 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1485 }
1486
1487
1488
1489 type DataBoostReadLocalWrites struct {
1490 }
1491
1492
1493
1494 type DropRowRangeRequest struct {
1495
1496
1497 DeleteAllDataFromTable bool `json:"deleteAllDataFromTable,omitempty"`
1498
1499
1500 RowKeyPrefix string `json:"rowKeyPrefix,omitempty"`
1501
1502
1503
1504
1505
1506 ForceSendFields []string `json:"-"`
1507
1508
1509
1510
1511 NullFields []string `json:"-"`
1512 }
1513
1514 func (s *DropRowRangeRequest) MarshalJSON() ([]byte, error) {
1515 type NoMethod DropRowRangeRequest
1516 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1517 }
1518
1519
1520
1521
1522
1523 type Empty struct {
1524
1525 googleapi.ServerResponse `json:"-"`
1526 }
1527
1528
1529
1530 type EncryptionConfig struct {
1531
1532
1533
1534
1535
1536
1537
1538
1539 KmsKeyName string `json:"kmsKeyName,omitempty"`
1540
1541
1542
1543
1544
1545 ForceSendFields []string `json:"-"`
1546
1547
1548
1549
1550 NullFields []string `json:"-"`
1551 }
1552
1553 func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1554 type NoMethod EncryptionConfig
1555 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1556 }
1557
1558
1559
1560
1561
1562 type EncryptionInfo struct {
1563
1564
1565
1566 EncryptionStatus *Status `json:"encryptionStatus,omitempty"`
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582 EncryptionType string `json:"encryptionType,omitempty"`
1583
1584
1585 KmsKeyVersion string `json:"kmsKeyVersion,omitempty"`
1586
1587
1588
1589
1590
1591 ForceSendFields []string `json:"-"`
1592
1593
1594
1595
1596 NullFields []string `json:"-"`
1597 }
1598
1599 func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
1600 type NoMethod EncryptionInfo
1601 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1602 }
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620 type Expr struct {
1621
1622
1623 Description string `json:"description,omitempty"`
1624
1625
1626 Expression string `json:"expression,omitempty"`
1627
1628
1629 Location string `json:"location,omitempty"`
1630
1631
1632
1633 Title string `json:"title,omitempty"`
1634
1635
1636
1637
1638
1639 ForceSendFields []string `json:"-"`
1640
1641
1642
1643
1644 NullFields []string `json:"-"`
1645 }
1646
1647 func (s *Expr) MarshalJSON() ([]byte, error) {
1648 type NoMethod Expr
1649 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1650 }
1651
1652
1653
1654 type GcRule struct {
1655
1656 Intersection *Intersection `json:"intersection,omitempty"`
1657
1658
1659 MaxAge string `json:"maxAge,omitempty"`
1660
1661 MaxNumVersions int64 `json:"maxNumVersions,omitempty"`
1662
1663 Union *Union `json:"union,omitempty"`
1664
1665
1666
1667
1668
1669 ForceSendFields []string `json:"-"`
1670
1671
1672
1673
1674 NullFields []string `json:"-"`
1675 }
1676
1677 func (s *GcRule) MarshalJSON() ([]byte, error) {
1678 type NoMethod GcRule
1679 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1680 }
1681
1682
1683
1684 type GenerateConsistencyTokenRequest struct {
1685 }
1686
1687
1688
1689 type GenerateConsistencyTokenResponse struct {
1690
1691 ConsistencyToken string `json:"consistencyToken,omitempty"`
1692
1693
1694 googleapi.ServerResponse `json:"-"`
1695
1696
1697
1698
1699
1700 ForceSendFields []string `json:"-"`
1701
1702
1703
1704
1705 NullFields []string `json:"-"`
1706 }
1707
1708 func (s *GenerateConsistencyTokenResponse) MarshalJSON() ([]byte, error) {
1709 type NoMethod GenerateConsistencyTokenResponse
1710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1711 }
1712
1713
1714 type GetIamPolicyRequest struct {
1715
1716
1717 Options *GetPolicyOptions `json:"options,omitempty"`
1718
1719
1720
1721
1722
1723 ForceSendFields []string `json:"-"`
1724
1725
1726
1727
1728 NullFields []string `json:"-"`
1729 }
1730
1731 func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1732 type NoMethod GetIamPolicyRequest
1733 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1734 }
1735
1736
1737 type GetPolicyOptions struct {
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1750
1751
1752
1753
1754
1755 ForceSendFields []string `json:"-"`
1756
1757
1758
1759
1760 NullFields []string `json:"-"`
1761 }
1762
1763 func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1764 type NoMethod GetPolicyOptions
1765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1766 }
1767
1768
1769
1770 type GoogleBigtableAdminV2AuthorizedViewFamilySubsets struct {
1771
1772
1773
1774
1775 QualifierPrefixes []string `json:"qualifierPrefixes,omitempty"`
1776
1777
1778 Qualifiers []string `json:"qualifiers,omitempty"`
1779
1780
1781
1782
1783
1784 ForceSendFields []string `json:"-"`
1785
1786
1787
1788
1789 NullFields []string `json:"-"`
1790 }
1791
1792 func (s *GoogleBigtableAdminV2AuthorizedViewFamilySubsets) MarshalJSON() ([]byte, error) {
1793 type NoMethod GoogleBigtableAdminV2AuthorizedViewFamilySubsets
1794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1795 }
1796
1797
1798
1799 type GoogleBigtableAdminV2AuthorizedViewSubsetView struct {
1800
1801
1802 FamilySubsets map[string]GoogleBigtableAdminV2AuthorizedViewFamilySubsets `json:"familySubsets,omitempty"`
1803
1804
1805 RowPrefixes []string `json:"rowPrefixes,omitempty"`
1806
1807
1808
1809
1810
1811 ForceSendFields []string `json:"-"`
1812
1813
1814
1815
1816 NullFields []string `json:"-"`
1817 }
1818
1819 func (s *GoogleBigtableAdminV2AuthorizedViewSubsetView) MarshalJSON() ([]byte, error) {
1820 type NoMethod GoogleBigtableAdminV2AuthorizedViewSubsetView
1821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1822 }
1823
1824
1825
1826
1827
1828 type GoogleBigtableAdminV2TypeAggregate struct {
1829
1830
1831
1832 InputType *Type `json:"inputType,omitempty"`
1833
1834
1835
1836 StateType *Type `json:"stateType,omitempty"`
1837
1838 Sum *GoogleBigtableAdminV2TypeAggregateSum `json:"sum,omitempty"`
1839
1840
1841
1842
1843
1844 ForceSendFields []string `json:"-"`
1845
1846
1847
1848
1849 NullFields []string `json:"-"`
1850 }
1851
1852 func (s *GoogleBigtableAdminV2TypeAggregate) MarshalJSON() ([]byte, error) {
1853 type NoMethod GoogleBigtableAdminV2TypeAggregate
1854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1855 }
1856
1857
1858
1859 type GoogleBigtableAdminV2TypeAggregateSum struct {
1860 }
1861
1862
1863
1864 type GoogleBigtableAdminV2TypeBytes struct {
1865
1866 Encoding *GoogleBigtableAdminV2TypeBytesEncoding `json:"encoding,omitempty"`
1867
1868
1869
1870
1871
1872 ForceSendFields []string `json:"-"`
1873
1874
1875
1876
1877 NullFields []string `json:"-"`
1878 }
1879
1880 func (s *GoogleBigtableAdminV2TypeBytes) MarshalJSON() ([]byte, error) {
1881 type NoMethod GoogleBigtableAdminV2TypeBytes
1882 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1883 }
1884
1885
1886
1887 type GoogleBigtableAdminV2TypeBytesEncoding struct {
1888
1889 Raw *GoogleBigtableAdminV2TypeBytesEncodingRaw `json:"raw,omitempty"`
1890
1891
1892
1893
1894
1895 ForceSendFields []string `json:"-"`
1896
1897
1898
1899
1900 NullFields []string `json:"-"`
1901 }
1902
1903 func (s *GoogleBigtableAdminV2TypeBytesEncoding) MarshalJSON() ([]byte, error) {
1904 type NoMethod GoogleBigtableAdminV2TypeBytesEncoding
1905 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1906 }
1907
1908
1909
1910 type GoogleBigtableAdminV2TypeBytesEncodingRaw struct {
1911 }
1912
1913
1914
1915 type GoogleBigtableAdminV2TypeInt64 struct {
1916
1917 Encoding *GoogleBigtableAdminV2TypeInt64Encoding `json:"encoding,omitempty"`
1918
1919
1920
1921
1922
1923 ForceSendFields []string `json:"-"`
1924
1925
1926
1927
1928 NullFields []string `json:"-"`
1929 }
1930
1931 func (s *GoogleBigtableAdminV2TypeInt64) MarshalJSON() ([]byte, error) {
1932 type NoMethod GoogleBigtableAdminV2TypeInt64
1933 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1934 }
1935
1936
1937
1938 type GoogleBigtableAdminV2TypeInt64Encoding struct {
1939
1940 BigEndianBytes *GoogleBigtableAdminV2TypeInt64EncodingBigEndianBytes `json:"bigEndianBytes,omitempty"`
1941
1942
1943
1944
1945
1946 ForceSendFields []string `json:"-"`
1947
1948
1949
1950
1951 NullFields []string `json:"-"`
1952 }
1953
1954 func (s *GoogleBigtableAdminV2TypeInt64Encoding) MarshalJSON() ([]byte, error) {
1955 type NoMethod GoogleBigtableAdminV2TypeInt64Encoding
1956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1957 }
1958
1959
1960
1961
1962
1963
1964 type GoogleBigtableAdminV2TypeInt64EncodingBigEndianBytes struct {
1965
1966 BytesType *GoogleBigtableAdminV2TypeBytes `json:"bytesType,omitempty"`
1967
1968
1969
1970
1971
1972 ForceSendFields []string `json:"-"`
1973
1974
1975
1976
1977 NullFields []string `json:"-"`
1978 }
1979
1980 func (s *GoogleBigtableAdminV2TypeInt64EncodingBigEndianBytes) MarshalJSON() ([]byte, error) {
1981 type NoMethod GoogleBigtableAdminV2TypeInt64EncodingBigEndianBytes
1982 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1983 }
1984
1985
1986
1987
1988
1989
1990 type HotTablet struct {
1991
1992 EndKey string `json:"endKey,omitempty"`
1993
1994 EndTime string `json:"endTime,omitempty"`
1995
1996
1997
1998 Name string `json:"name,omitempty"`
1999
2000
2001
2002
2003
2004 NodeCpuUsagePercent float64 `json:"nodeCpuUsagePercent,omitempty"`
2005
2006 StartKey string `json:"startKey,omitempty"`
2007
2008 StartTime string `json:"startTime,omitempty"`
2009
2010
2011 TableName string `json:"tableName,omitempty"`
2012
2013
2014
2015
2016
2017 ForceSendFields []string `json:"-"`
2018
2019
2020
2021
2022 NullFields []string `json:"-"`
2023 }
2024
2025 func (s *HotTablet) MarshalJSON() ([]byte, error) {
2026 type NoMethod HotTablet
2027 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2028 }
2029
2030 func (s *HotTablet) UnmarshalJSON(data []byte) error {
2031 type NoMethod HotTablet
2032 var s1 struct {
2033 NodeCpuUsagePercent gensupport.JSONFloat64 `json:"nodeCpuUsagePercent"`
2034 *NoMethod
2035 }
2036 s1.NoMethod = (*NoMethod)(s)
2037 if err := json.Unmarshal(data, &s1); err != nil {
2038 return err
2039 }
2040 s.NodeCpuUsagePercent = float64(s1.NodeCpuUsagePercent)
2041 return nil
2042 }
2043
2044
2045
2046 type Instance struct {
2047
2048
2049
2050 CreateTime string `json:"createTime,omitempty"`
2051
2052
2053
2054 DisplayName string `json:"displayName,omitempty"`
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064 Labels map[string]string `json:"labels,omitempty"`
2065
2066
2067 Name string `json:"name,omitempty"`
2068
2069 SatisfiesPzi bool `json:"satisfiesPzi,omitempty"`
2070
2071 SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
2072
2073
2074
2075
2076
2077
2078
2079
2080 State string `json:"state,omitempty"`
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091 Type string `json:"type,omitempty"`
2092
2093
2094 googleapi.ServerResponse `json:"-"`
2095
2096
2097
2098
2099
2100 ForceSendFields []string `json:"-"`
2101
2102
2103
2104
2105 NullFields []string `json:"-"`
2106 }
2107
2108 func (s *Instance) MarshalJSON() ([]byte, error) {
2109 type NoMethod Instance
2110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2111 }
2112
2113
2114 type Intersection struct {
2115
2116 Rules []*GcRule `json:"rules,omitempty"`
2117
2118
2119
2120
2121
2122 ForceSendFields []string `json:"-"`
2123
2124
2125
2126
2127 NullFields []string `json:"-"`
2128 }
2129
2130 func (s *Intersection) MarshalJSON() ([]byte, error) {
2131 type NoMethod Intersection
2132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2133 }
2134
2135
2136
2137 type ListAppProfilesResponse struct {
2138
2139 AppProfiles []*AppProfile `json:"appProfiles,omitempty"`
2140
2141
2142
2143
2144 FailedLocations []string `json:"failedLocations,omitempty"`
2145
2146
2147
2148 NextPageToken string `json:"nextPageToken,omitempty"`
2149
2150
2151 googleapi.ServerResponse `json:"-"`
2152
2153
2154
2155
2156
2157 ForceSendFields []string `json:"-"`
2158
2159
2160
2161
2162 NullFields []string `json:"-"`
2163 }
2164
2165 func (s *ListAppProfilesResponse) MarshalJSON() ([]byte, error) {
2166 type NoMethod ListAppProfilesResponse
2167 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2168 }
2169
2170
2171
2172 type ListAuthorizedViewsResponse struct {
2173
2174 AuthorizedViews []*AuthorizedView `json:"authorizedViews,omitempty"`
2175
2176
2177
2178 NextPageToken string `json:"nextPageToken,omitempty"`
2179
2180
2181 googleapi.ServerResponse `json:"-"`
2182
2183
2184
2185
2186
2187 ForceSendFields []string `json:"-"`
2188
2189
2190
2191
2192 NullFields []string `json:"-"`
2193 }
2194
2195 func (s *ListAuthorizedViewsResponse) MarshalJSON() ([]byte, error) {
2196 type NoMethod ListAuthorizedViewsResponse
2197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2198 }
2199
2200
2201 type ListBackupsResponse struct {
2202
2203 Backups []*Backup `json:"backups,omitempty"`
2204
2205
2206 NextPageToken string `json:"nextPageToken,omitempty"`
2207
2208
2209 googleapi.ServerResponse `json:"-"`
2210
2211
2212
2213
2214
2215 ForceSendFields []string `json:"-"`
2216
2217
2218
2219
2220 NullFields []string `json:"-"`
2221 }
2222
2223 func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
2224 type NoMethod ListBackupsResponse
2225 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2226 }
2227
2228
2229
2230 type ListClustersResponse struct {
2231
2232 Clusters []*Cluster `json:"clusters,omitempty"`
2233
2234
2235
2236
2237 FailedLocations []string `json:"failedLocations,omitempty"`
2238
2239 NextPageToken string `json:"nextPageToken,omitempty"`
2240
2241
2242 googleapi.ServerResponse `json:"-"`
2243
2244
2245
2246
2247
2248 ForceSendFields []string `json:"-"`
2249
2250
2251
2252
2253 NullFields []string `json:"-"`
2254 }
2255
2256 func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
2257 type NoMethod ListClustersResponse
2258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2259 }
2260
2261
2262
2263 type ListHotTabletsResponse struct {
2264
2265
2266
2267
2268
2269 HotTablets []*HotTablet `json:"hotTablets,omitempty"`
2270
2271
2272
2273 NextPageToken string `json:"nextPageToken,omitempty"`
2274
2275
2276 googleapi.ServerResponse `json:"-"`
2277
2278
2279
2280
2281
2282 ForceSendFields []string `json:"-"`
2283
2284
2285
2286
2287 NullFields []string `json:"-"`
2288 }
2289
2290 func (s *ListHotTabletsResponse) MarshalJSON() ([]byte, error) {
2291 type NoMethod ListHotTabletsResponse
2292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2293 }
2294
2295
2296
2297 type ListInstancesResponse struct {
2298
2299
2300
2301
2302
2303
2304 FailedLocations []string `json:"failedLocations,omitempty"`
2305
2306 Instances []*Instance `json:"instances,omitempty"`
2307
2308 NextPageToken string `json:"nextPageToken,omitempty"`
2309
2310
2311 googleapi.ServerResponse `json:"-"`
2312
2313
2314
2315
2316
2317 ForceSendFields []string `json:"-"`
2318
2319
2320
2321
2322 NullFields []string `json:"-"`
2323 }
2324
2325 func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
2326 type NoMethod ListInstancesResponse
2327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2328 }
2329
2330
2331 type ListLocationsResponse struct {
2332
2333
2334 Locations []*Location `json:"locations,omitempty"`
2335
2336 NextPageToken string `json:"nextPageToken,omitempty"`
2337
2338
2339 googleapi.ServerResponse `json:"-"`
2340
2341
2342
2343
2344
2345 ForceSendFields []string `json:"-"`
2346
2347
2348
2349
2350 NullFields []string `json:"-"`
2351 }
2352
2353 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
2354 type NoMethod ListLocationsResponse
2355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2356 }
2357
2358
2359 type ListOperationsResponse struct {
2360
2361 NextPageToken string `json:"nextPageToken,omitempty"`
2362
2363
2364 Operations []*Operation `json:"operations,omitempty"`
2365
2366
2367 googleapi.ServerResponse `json:"-"`
2368
2369
2370
2371
2372
2373 ForceSendFields []string `json:"-"`
2374
2375
2376
2377
2378 NullFields []string `json:"-"`
2379 }
2380
2381 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2382 type NoMethod ListOperationsResponse
2383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2384 }
2385
2386
2387
2388 type ListTablesResponse struct {
2389
2390
2391
2392 NextPageToken string `json:"nextPageToken,omitempty"`
2393
2394 Tables []*Table `json:"tables,omitempty"`
2395
2396
2397 googleapi.ServerResponse `json:"-"`
2398
2399
2400
2401
2402
2403 ForceSendFields []string `json:"-"`
2404
2405
2406
2407
2408 NullFields []string `json:"-"`
2409 }
2410
2411 func (s *ListTablesResponse) MarshalJSON() ([]byte, error) {
2412 type NoMethod ListTablesResponse
2413 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2414 }
2415
2416
2417 type Location struct {
2418
2419
2420 DisplayName string `json:"displayName,omitempty"`
2421
2422
2423 Labels map[string]string `json:"labels,omitempty"`
2424
2425 LocationId string `json:"locationId,omitempty"`
2426
2427
2428 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2429
2430
2431
2432 Name string `json:"name,omitempty"`
2433
2434
2435
2436
2437
2438 ForceSendFields []string `json:"-"`
2439
2440
2441
2442
2443 NullFields []string `json:"-"`
2444 }
2445
2446 func (s *Location) MarshalJSON() ([]byte, error) {
2447 type NoMethod Location
2448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2449 }
2450
2451
2452 type Modification struct {
2453
2454
2455 Create *ColumnFamily `json:"create,omitempty"`
2456
2457
2458 Drop bool `json:"drop,omitempty"`
2459
2460 Id string `json:"id,omitempty"`
2461
2462
2463 Update *ColumnFamily `json:"update,omitempty"`
2464
2465
2466
2467 UpdateMask string `json:"updateMask,omitempty"`
2468
2469
2470
2471
2472
2473 ForceSendFields []string `json:"-"`
2474
2475
2476
2477
2478 NullFields []string `json:"-"`
2479 }
2480
2481 func (s *Modification) MarshalJSON() ([]byte, error) {
2482 type NoMethod Modification
2483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2484 }
2485
2486
2487
2488 type ModifyColumnFamiliesRequest struct {
2489
2490
2491 IgnoreWarnings bool `json:"ignoreWarnings,omitempty"`
2492
2493
2494
2495
2496 Modifications []*Modification `json:"modifications,omitempty"`
2497
2498
2499
2500
2501
2502 ForceSendFields []string `json:"-"`
2503
2504
2505
2506
2507 NullFields []string `json:"-"`
2508 }
2509
2510 func (s *ModifyColumnFamiliesRequest) MarshalJSON() ([]byte, error) {
2511 type NoMethod ModifyColumnFamiliesRequest
2512 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2513 }
2514
2515
2516
2517
2518
2519
2520 type MultiClusterRoutingUseAny struct {
2521
2522
2523
2524 ClusterIds []string `json:"clusterIds,omitempty"`
2525
2526
2527
2528
2529
2530 ForceSendFields []string `json:"-"`
2531
2532
2533
2534
2535 NullFields []string `json:"-"`
2536 }
2537
2538 func (s *MultiClusterRoutingUseAny) MarshalJSON() ([]byte, error) {
2539 type NoMethod MultiClusterRoutingUseAny
2540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2541 }
2542
2543
2544
2545 type Operation struct {
2546
2547
2548
2549 Done bool `json:"done,omitempty"`
2550
2551 Error *Status `json:"error,omitempty"`
2552
2553
2554
2555
2556 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2557
2558
2559
2560 Name string `json:"name,omitempty"`
2561
2562
2563
2564
2565
2566
2567
2568 Response googleapi.RawMessage `json:"response,omitempty"`
2569
2570
2571 googleapi.ServerResponse `json:"-"`
2572
2573
2574
2575
2576
2577 ForceSendFields []string `json:"-"`
2578
2579
2580
2581
2582 NullFields []string `json:"-"`
2583 }
2584
2585 func (s *Operation) MarshalJSON() ([]byte, error) {
2586 type NoMethod Operation
2587 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2588 }
2589
2590
2591
2592 type OperationProgress struct {
2593
2594
2595 EndTime string `json:"endTime,omitempty"`
2596
2597
2598 ProgressPercent int64 `json:"progressPercent,omitempty"`
2599
2600 StartTime string `json:"startTime,omitempty"`
2601
2602
2603
2604
2605
2606 ForceSendFields []string `json:"-"`
2607
2608
2609
2610
2611 NullFields []string `json:"-"`
2612 }
2613
2614 func (s *OperationProgress) MarshalJSON() ([]byte, error) {
2615 type NoMethod OperationProgress
2616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2617 }
2618
2619
2620
2621
2622
2623 type OptimizeRestoredTableMetadata struct {
2624
2625 Name string `json:"name,omitempty"`
2626
2627 Progress *OperationProgress `json:"progress,omitempty"`
2628
2629
2630
2631
2632
2633 ForceSendFields []string `json:"-"`
2634
2635
2636
2637
2638 NullFields []string `json:"-"`
2639 }
2640
2641 func (s *OptimizeRestoredTableMetadata) MarshalJSON() ([]byte, error) {
2642 type NoMethod OptimizeRestoredTableMetadata
2643 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2644 }
2645
2646
2647
2648 type PartialUpdateClusterMetadata struct {
2649
2650
2651 FinishTime string `json:"finishTime,omitempty"`
2652
2653 OriginalRequest *PartialUpdateClusterRequest `json:"originalRequest,omitempty"`
2654
2655 RequestTime string `json:"requestTime,omitempty"`
2656
2657
2658
2659
2660
2661 ForceSendFields []string `json:"-"`
2662
2663
2664
2665
2666 NullFields []string `json:"-"`
2667 }
2668
2669 func (s *PartialUpdateClusterMetadata) MarshalJSON() ([]byte, error) {
2670 type NoMethod PartialUpdateClusterMetadata
2671 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2672 }
2673
2674
2675
2676 type PartialUpdateClusterRequest struct {
2677
2678
2679 Cluster *Cluster `json:"cluster,omitempty"`
2680
2681 UpdateMask string `json:"updateMask,omitempty"`
2682
2683
2684
2685
2686
2687 ForceSendFields []string `json:"-"`
2688
2689
2690
2691
2692 NullFields []string `json:"-"`
2693 }
2694
2695 func (s *PartialUpdateClusterRequest) MarshalJSON() ([]byte, error) {
2696 type NoMethod PartialUpdateClusterRequest
2697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2698 }
2699
2700
2701
2702 type PartialUpdateInstanceRequest struct {
2703
2704
2705 Instance *Instance `json:"instance,omitempty"`
2706
2707
2708 UpdateMask string `json:"updateMask,omitempty"`
2709
2710
2711
2712
2713
2714 ForceSendFields []string `json:"-"`
2715
2716
2717
2718
2719 NullFields []string `json:"-"`
2720 }
2721
2722 func (s *PartialUpdateInstanceRequest) MarshalJSON() ([]byte, error) {
2723 type NoMethod PartialUpdateInstanceRequest
2724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2725 }
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757 type Policy struct {
2758
2759 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769 Bindings []*Binding `json:"bindings,omitempty"`
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781 Etag string `json:"etag,omitempty"`
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797 Version int64 `json:"version,omitempty"`
2798
2799
2800 googleapi.ServerResponse `json:"-"`
2801
2802
2803
2804
2805
2806 ForceSendFields []string `json:"-"`
2807
2808
2809
2810
2811 NullFields []string `json:"-"`
2812 }
2813
2814 func (s *Policy) MarshalJSON() ([]byte, error) {
2815 type NoMethod Policy
2816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2817 }
2818
2819
2820 type RestoreInfo struct {
2821
2822
2823 BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
2824
2825
2826
2827
2828
2829 SourceType string `json:"sourceType,omitempty"`
2830
2831
2832
2833
2834
2835 ForceSendFields []string `json:"-"`
2836
2837
2838
2839
2840 NullFields []string `json:"-"`
2841 }
2842
2843 func (s *RestoreInfo) MarshalJSON() ([]byte, error) {
2844 type NoMethod RestoreInfo
2845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2846 }
2847
2848
2849
2850 type RestoreTableMetadata struct {
2851 BackupInfo *BackupInfo `json:"backupInfo,omitempty"`
2852
2853 Name string `json:"name,omitempty"`
2854
2855
2856
2857
2858
2859
2860
2861
2862 OptimizeTableOperationName string `json:"optimizeTableOperationName,omitempty"`
2863
2864 Progress *OperationProgress `json:"progress,omitempty"`
2865
2866
2867
2868
2869
2870 SourceType string `json:"sourceType,omitempty"`
2871
2872
2873
2874
2875
2876 ForceSendFields []string `json:"-"`
2877
2878
2879
2880
2881 NullFields []string `json:"-"`
2882 }
2883
2884 func (s *RestoreTableMetadata) MarshalJSON() ([]byte, error) {
2885 type NoMethod RestoreTableMetadata
2886 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2887 }
2888
2889
2890 type RestoreTableRequest struct {
2891
2892
2893 Backup string `json:"backup,omitempty"`
2894
2895
2896
2897 TableId string `json:"tableId,omitempty"`
2898
2899
2900
2901
2902
2903 ForceSendFields []string `json:"-"`
2904
2905
2906
2907
2908 NullFields []string `json:"-"`
2909 }
2910
2911 func (s *RestoreTableRequest) MarshalJSON() ([]byte, error) {
2912 type NoMethod RestoreTableRequest
2913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2914 }
2915
2916
2917 type SetIamPolicyRequest struct {
2918
2919
2920
2921
2922 Policy *Policy `json:"policy,omitempty"`
2923
2924
2925
2926 UpdateMask string `json:"updateMask,omitempty"`
2927
2928
2929
2930
2931
2932 ForceSendFields []string `json:"-"`
2933
2934
2935
2936
2937 NullFields []string `json:"-"`
2938 }
2939
2940 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2941 type NoMethod SetIamPolicyRequest
2942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2943 }
2944
2945
2946
2947
2948 type SingleClusterRouting struct {
2949
2950
2951
2952 AllowTransactionalWrites bool `json:"allowTransactionalWrites,omitempty"`
2953
2954 ClusterId string `json:"clusterId,omitempty"`
2955
2956
2957
2958
2959
2960 ForceSendFields []string `json:"-"`
2961
2962
2963
2964
2965 NullFields []string `json:"-"`
2966 }
2967
2968 func (s *SingleClusterRouting) MarshalJSON() ([]byte, error) {
2969 type NoMethod SingleClusterRouting
2970 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2971 }
2972
2973
2974 type Split struct {
2975
2976 Key string `json:"key,omitempty"`
2977
2978
2979
2980
2981
2982 ForceSendFields []string `json:"-"`
2983
2984
2985
2986
2987 NullFields []string `json:"-"`
2988 }
2989
2990 func (s *Split) MarshalJSON() ([]byte, error) {
2991 type NoMethod Split
2992 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2993 }
2994
2995
2996
2997 type StandardIsolation struct {
2998
2999
3000
3001
3002
3003
3004
3005
3006 Priority string `json:"priority,omitempty"`
3007
3008
3009
3010
3011
3012 ForceSendFields []string `json:"-"`
3013
3014
3015
3016
3017 NullFields []string `json:"-"`
3018 }
3019
3020 func (s *StandardIsolation) MarshalJSON() ([]byte, error) {
3021 type NoMethod StandardIsolation
3022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3023 }
3024
3025
3026
3027 type StandardReadRemoteWrites struct {
3028 }
3029
3030
3031
3032
3033
3034
3035
3036 type Status struct {
3037
3038 Code int64 `json:"code,omitempty"`
3039
3040
3041 Details []googleapi.RawMessage `json:"details,omitempty"`
3042
3043
3044
3045 Message string `json:"message,omitempty"`
3046
3047
3048
3049
3050
3051 ForceSendFields []string `json:"-"`
3052
3053
3054
3055
3056 NullFields []string `json:"-"`
3057 }
3058
3059 func (s *Status) MarshalJSON() ([]byte, error) {
3060 type NoMethod Status
3061 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3062 }
3063
3064
3065
3066 type Table struct {
3067
3068
3069 AutomatedBackupPolicy *AutomatedBackupPolicy `json:"automatedBackupPolicy,omitempty"`
3070
3071
3072
3073 ChangeStreamConfig *ChangeStreamConfig `json:"changeStreamConfig,omitempty"`
3074
3075
3076
3077
3078
3079 ClusterStates map[string]ClusterState `json:"clusterStates,omitempty"`
3080
3081
3082 ColumnFamilies map[string]ColumnFamily `json:"columnFamilies,omitempty"`
3083
3084
3085
3086
3087
3088 DeletionProtection bool `json:"deletionProtection,omitempty"`
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099 Granularity string `json:"granularity,omitempty"`
3100
3101
3102
3103 Name string `json:"name,omitempty"`
3104
3105
3106
3107 RestoreInfo *RestoreInfo `json:"restoreInfo,omitempty"`
3108
3109
3110
3111
3112 Stats *TableStats `json:"stats,omitempty"`
3113
3114
3115 googleapi.ServerResponse `json:"-"`
3116
3117
3118
3119
3120
3121 ForceSendFields []string `json:"-"`
3122
3123
3124
3125
3126 NullFields []string `json:"-"`
3127 }
3128
3129 func (s *Table) MarshalJSON() ([]byte, error) {
3130 type NoMethod Table
3131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3132 }
3133
3134
3135 type TableProgress struct {
3136
3137
3138
3139 EstimatedCopiedBytes int64 `json:"estimatedCopiedBytes,omitempty,string"`
3140
3141 EstimatedSizeBytes int64 `json:"estimatedSizeBytes,omitempty,string"`
3142
3143
3144
3145
3146
3147
3148
3149
3150 State string `json:"state,omitempty"`
3151
3152
3153
3154
3155
3156 ForceSendFields []string `json:"-"`
3157
3158
3159
3160
3161 NullFields []string `json:"-"`
3162 }
3163
3164 func (s *TableProgress) MarshalJSON() ([]byte, error) {
3165 type NoMethod TableProgress
3166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3167 }
3168
3169
3170
3171
3172
3173
3174
3175 type TableStats struct {
3176
3177
3178
3179
3180
3181
3182 AverageCellsPerColumn float64 `json:"averageCellsPerColumn,omitempty"`
3183
3184
3185
3186
3187
3188
3189 AverageColumnsPerRow float64 `json:"averageColumnsPerRow,omitempty"`
3190
3191
3192 LogicalDataBytes int64 `json:"logicalDataBytes,omitempty,string"`
3193
3194 RowCount int64 `json:"rowCount,omitempty,string"`
3195
3196
3197
3198
3199
3200 ForceSendFields []string `json:"-"`
3201
3202
3203
3204
3205 NullFields []string `json:"-"`
3206 }
3207
3208 func (s *TableStats) MarshalJSON() ([]byte, error) {
3209 type NoMethod TableStats
3210 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3211 }
3212
3213 func (s *TableStats) UnmarshalJSON(data []byte) error {
3214 type NoMethod TableStats
3215 var s1 struct {
3216 AverageCellsPerColumn gensupport.JSONFloat64 `json:"averageCellsPerColumn"`
3217 AverageColumnsPerRow gensupport.JSONFloat64 `json:"averageColumnsPerRow"`
3218 *NoMethod
3219 }
3220 s1.NoMethod = (*NoMethod)(s)
3221 if err := json.Unmarshal(data, &s1); err != nil {
3222 return err
3223 }
3224 s.AverageCellsPerColumn = float64(s1.AverageCellsPerColumn)
3225 s.AverageColumnsPerRow = float64(s1.AverageColumnsPerRow)
3226 return nil
3227 }
3228
3229
3230 type TestIamPermissionsRequest struct {
3231
3232
3233
3234
3235 Permissions []string `json:"permissions,omitempty"`
3236
3237
3238
3239
3240
3241 ForceSendFields []string `json:"-"`
3242
3243
3244
3245
3246 NullFields []string `json:"-"`
3247 }
3248
3249 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3250 type NoMethod TestIamPermissionsRequest
3251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3252 }
3253
3254
3255
3256 type TestIamPermissionsResponse struct {
3257
3258
3259 Permissions []string `json:"permissions,omitempty"`
3260
3261
3262 googleapi.ServerResponse `json:"-"`
3263
3264
3265
3266
3267
3268 ForceSendFields []string `json:"-"`
3269
3270
3271
3272
3273 NullFields []string `json:"-"`
3274 }
3275
3276 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3277 type NoMethod TestIamPermissionsResponse
3278 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3279 }
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306 type Type struct {
3307
3308 AggregateType *GoogleBigtableAdminV2TypeAggregate `json:"aggregateType,omitempty"`
3309
3310 BytesType *GoogleBigtableAdminV2TypeBytes `json:"bytesType,omitempty"`
3311
3312 Int64Type *GoogleBigtableAdminV2TypeInt64 `json:"int64Type,omitempty"`
3313
3314
3315
3316
3317
3318 ForceSendFields []string `json:"-"`
3319
3320
3321
3322
3323 NullFields []string `json:"-"`
3324 }
3325
3326 func (s *Type) MarshalJSON() ([]byte, error) {
3327 type NoMethod Type
3328 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3329 }
3330
3331
3332
3333 type UndeleteTableMetadata struct {
3334
3335 EndTime string `json:"endTime,omitempty"`
3336
3337 Name string `json:"name,omitempty"`
3338
3339 StartTime string `json:"startTime,omitempty"`
3340
3341
3342
3343
3344
3345 ForceSendFields []string `json:"-"`
3346
3347
3348
3349
3350 NullFields []string `json:"-"`
3351 }
3352
3353 func (s *UndeleteTableMetadata) MarshalJSON() ([]byte, error) {
3354 type NoMethod UndeleteTableMetadata
3355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3356 }
3357
3358
3359
3360 type UndeleteTableRequest struct {
3361 }
3362
3363
3364 type Union struct {
3365
3366 Rules []*GcRule `json:"rules,omitempty"`
3367
3368
3369
3370
3371
3372 ForceSendFields []string `json:"-"`
3373
3374
3375
3376
3377 NullFields []string `json:"-"`
3378 }
3379
3380 func (s *Union) MarshalJSON() ([]byte, error) {
3381 type NoMethod Union
3382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3383 }
3384
3385
3386
3387 type UpdateAppProfileMetadata struct {
3388 }
3389
3390
3391
3392 type UpdateAuthorizedViewMetadata struct {
3393
3394
3395 FinishTime string `json:"finishTime,omitempty"`
3396
3397
3398 OriginalRequest *UpdateAuthorizedViewRequest `json:"originalRequest,omitempty"`
3399
3400 RequestTime string `json:"requestTime,omitempty"`
3401
3402
3403
3404
3405
3406 ForceSendFields []string `json:"-"`
3407
3408
3409
3410
3411 NullFields []string `json:"-"`
3412 }
3413
3414 func (s *UpdateAuthorizedViewMetadata) MarshalJSON() ([]byte, error) {
3415 type NoMethod UpdateAuthorizedViewMetadata
3416 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3417 }
3418
3419
3420 type UpdateAuthorizedViewRequest struct {
3421
3422
3423
3424
3425
3426 AuthorizedView *AuthorizedView `json:"authorizedView,omitempty"`
3427
3428
3429 IgnoreWarnings bool `json:"ignoreWarnings,omitempty"`
3430
3431
3432
3433
3434
3435
3436 UpdateMask string `json:"updateMask,omitempty"`
3437
3438
3439
3440
3441
3442 ForceSendFields []string `json:"-"`
3443
3444
3445
3446
3447 NullFields []string `json:"-"`
3448 }
3449
3450 func (s *UpdateAuthorizedViewRequest) MarshalJSON() ([]byte, error) {
3451 type NoMethod UpdateAuthorizedViewRequest
3452 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3453 }
3454
3455
3456
3457 type UpdateClusterMetadata struct {
3458
3459
3460 FinishTime string `json:"finishTime,omitempty"`
3461
3462
3463 OriginalRequest *Cluster `json:"originalRequest,omitempty"`
3464
3465 RequestTime string `json:"requestTime,omitempty"`
3466
3467
3468
3469
3470
3471 ForceSendFields []string `json:"-"`
3472
3473
3474
3475
3476 NullFields []string `json:"-"`
3477 }
3478
3479 func (s *UpdateClusterMetadata) MarshalJSON() ([]byte, error) {
3480 type NoMethod UpdateClusterMetadata
3481 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3482 }
3483
3484
3485
3486 type UpdateInstanceMetadata struct {
3487
3488
3489 FinishTime string `json:"finishTime,omitempty"`
3490
3491
3492 OriginalRequest *PartialUpdateInstanceRequest `json:"originalRequest,omitempty"`
3493
3494 RequestTime string `json:"requestTime,omitempty"`
3495
3496
3497
3498
3499
3500 ForceSendFields []string `json:"-"`
3501
3502
3503
3504
3505 NullFields []string `json:"-"`
3506 }
3507
3508 func (s *UpdateInstanceMetadata) MarshalJSON() ([]byte, error) {
3509 type NoMethod UpdateInstanceMetadata
3510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3511 }
3512
3513
3514
3515 type UpdateTableMetadata struct {
3516
3517 EndTime string `json:"endTime,omitempty"`
3518
3519 Name string `json:"name,omitempty"`
3520
3521 StartTime string `json:"startTime,omitempty"`
3522
3523
3524
3525
3526
3527 ForceSendFields []string `json:"-"`
3528
3529
3530
3531
3532 NullFields []string `json:"-"`
3533 }
3534
3535 func (s *UpdateTableMetadata) MarshalJSON() ([]byte, error) {
3536 type NoMethod UpdateTableMetadata
3537 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3538 }
3539
3540 type OperationsGetCall struct {
3541 s *Service
3542 name string
3543 urlParams_ gensupport.URLParams
3544 ifNoneMatch_ string
3545 ctx_ context.Context
3546 header_ http.Header
3547 }
3548
3549
3550
3551
3552
3553
3554 func (r *OperationsService) Get(name string) *OperationsGetCall {
3555 c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3556 c.name = name
3557 return c
3558 }
3559
3560
3561
3562
3563 func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
3564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3565 return c
3566 }
3567
3568
3569
3570
3571 func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
3572 c.ifNoneMatch_ = entityTag
3573 return c
3574 }
3575
3576
3577 func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
3578 c.ctx_ = ctx
3579 return c
3580 }
3581
3582
3583
3584 func (c *OperationsGetCall) Header() http.Header {
3585 if c.header_ == nil {
3586 c.header_ = make(http.Header)
3587 }
3588 return c.header_
3589 }
3590
3591 func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
3592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3593 if c.ifNoneMatch_ != "" {
3594 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3595 }
3596 var body io.Reader = nil
3597 c.urlParams_.Set("alt", alt)
3598 c.urlParams_.Set("prettyPrint", "false")
3599 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3600 urls += "?" + c.urlParams_.Encode()
3601 req, err := http.NewRequest("GET", urls, body)
3602 if err != nil {
3603 return nil, err
3604 }
3605 req.Header = reqHeaders
3606 googleapi.Expand(req.URL, map[string]string{
3607 "name": c.name,
3608 })
3609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3610 }
3611
3612
3613
3614
3615
3616
3617 func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3618 gensupport.SetOptions(c.urlParams_, opts...)
3619 res, err := c.doRequest("json")
3620 if res != nil && res.StatusCode == http.StatusNotModified {
3621 if res.Body != nil {
3622 res.Body.Close()
3623 }
3624 return nil, gensupport.WrapError(&googleapi.Error{
3625 Code: res.StatusCode,
3626 Header: res.Header,
3627 })
3628 }
3629 if err != nil {
3630 return nil, err
3631 }
3632 defer googleapi.CloseBody(res)
3633 if err := googleapi.CheckResponse(res); err != nil {
3634 return nil, gensupport.WrapError(err)
3635 }
3636 ret := &Operation{
3637 ServerResponse: googleapi.ServerResponse{
3638 Header: res.Header,
3639 HTTPStatusCode: res.StatusCode,
3640 },
3641 }
3642 target := &ret
3643 if err := gensupport.DecodeResponse(target, res); err != nil {
3644 return nil, err
3645 }
3646 return ret, nil
3647 }
3648
3649 type OperationsProjectsOperationsListCall struct {
3650 s *Service
3651 name string
3652 urlParams_ gensupport.URLParams
3653 ifNoneMatch_ string
3654 ctx_ context.Context
3655 header_ http.Header
3656 }
3657
3658
3659
3660
3661
3662 func (r *OperationsProjectsOperationsService) List(name string) *OperationsProjectsOperationsListCall {
3663 c := &OperationsProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3664 c.name = name
3665 return c
3666 }
3667
3668
3669 func (c *OperationsProjectsOperationsListCall) Filter(filter string) *OperationsProjectsOperationsListCall {
3670 c.urlParams_.Set("filter", filter)
3671 return c
3672 }
3673
3674
3675
3676 func (c *OperationsProjectsOperationsListCall) PageSize(pageSize int64) *OperationsProjectsOperationsListCall {
3677 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3678 return c
3679 }
3680
3681
3682
3683 func (c *OperationsProjectsOperationsListCall) PageToken(pageToken string) *OperationsProjectsOperationsListCall {
3684 c.urlParams_.Set("pageToken", pageToken)
3685 return c
3686 }
3687
3688
3689
3690
3691 func (c *OperationsProjectsOperationsListCall) Fields(s ...googleapi.Field) *OperationsProjectsOperationsListCall {
3692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3693 return c
3694 }
3695
3696
3697
3698
3699 func (c *OperationsProjectsOperationsListCall) IfNoneMatch(entityTag string) *OperationsProjectsOperationsListCall {
3700 c.ifNoneMatch_ = entityTag
3701 return c
3702 }
3703
3704
3705 func (c *OperationsProjectsOperationsListCall) Context(ctx context.Context) *OperationsProjectsOperationsListCall {
3706 c.ctx_ = ctx
3707 return c
3708 }
3709
3710
3711
3712 func (c *OperationsProjectsOperationsListCall) Header() http.Header {
3713 if c.header_ == nil {
3714 c.header_ = make(http.Header)
3715 }
3716 return c.header_
3717 }
3718
3719 func (c *OperationsProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
3720 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3721 if c.ifNoneMatch_ != "" {
3722 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3723 }
3724 var body io.Reader = nil
3725 c.urlParams_.Set("alt", alt)
3726 c.urlParams_.Set("prettyPrint", "false")
3727 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations")
3728 urls += "?" + c.urlParams_.Encode()
3729 req, err := http.NewRequest("GET", urls, body)
3730 if err != nil {
3731 return nil, err
3732 }
3733 req.Header = reqHeaders
3734 googleapi.Expand(req.URL, map[string]string{
3735 "name": c.name,
3736 })
3737 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3738 }
3739
3740
3741
3742
3743
3744
3745
3746 func (c *OperationsProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
3747 gensupport.SetOptions(c.urlParams_, opts...)
3748 res, err := c.doRequest("json")
3749 if res != nil && res.StatusCode == http.StatusNotModified {
3750 if res.Body != nil {
3751 res.Body.Close()
3752 }
3753 return nil, gensupport.WrapError(&googleapi.Error{
3754 Code: res.StatusCode,
3755 Header: res.Header,
3756 })
3757 }
3758 if err != nil {
3759 return nil, err
3760 }
3761 defer googleapi.CloseBody(res)
3762 if err := googleapi.CheckResponse(res); err != nil {
3763 return nil, gensupport.WrapError(err)
3764 }
3765 ret := &ListOperationsResponse{
3766 ServerResponse: googleapi.ServerResponse{
3767 Header: res.Header,
3768 HTTPStatusCode: res.StatusCode,
3769 },
3770 }
3771 target := &ret
3772 if err := gensupport.DecodeResponse(target, res); err != nil {
3773 return nil, err
3774 }
3775 return ret, nil
3776 }
3777
3778
3779
3780
3781 func (c *OperationsProjectsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3782 c.ctx_ = ctx
3783 defer c.PageToken(c.urlParams_.Get("pageToken"))
3784 for {
3785 x, err := c.Do()
3786 if err != nil {
3787 return err
3788 }
3789 if err := f(x); err != nil {
3790 return err
3791 }
3792 if x.NextPageToken == "" {
3793 return nil
3794 }
3795 c.PageToken(x.NextPageToken)
3796 }
3797 }
3798
3799 type ProjectsInstancesCreateCall struct {
3800 s *Service
3801 parent string
3802 createinstancerequest *CreateInstanceRequest
3803 urlParams_ gensupport.URLParams
3804 ctx_ context.Context
3805 header_ http.Header
3806 }
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816 func (r *ProjectsInstancesService) Create(parent string, createinstancerequest *CreateInstanceRequest) *ProjectsInstancesCreateCall {
3817 c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3818 c.parent = parent
3819 c.createinstancerequest = createinstancerequest
3820 return c
3821 }
3822
3823
3824
3825
3826 func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall {
3827 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3828 return c
3829 }
3830
3831
3832 func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall {
3833 c.ctx_ = ctx
3834 return c
3835 }
3836
3837
3838
3839 func (c *ProjectsInstancesCreateCall) Header() http.Header {
3840 if c.header_ == nil {
3841 c.header_ = make(http.Header)
3842 }
3843 return c.header_
3844 }
3845
3846 func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
3847 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3848 var body io.Reader = nil
3849 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createinstancerequest)
3850 if err != nil {
3851 return nil, err
3852 }
3853 c.urlParams_.Set("alt", alt)
3854 c.urlParams_.Set("prettyPrint", "false")
3855 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances")
3856 urls += "?" + c.urlParams_.Encode()
3857 req, err := http.NewRequest("POST", urls, body)
3858 if err != nil {
3859 return nil, err
3860 }
3861 req.Header = reqHeaders
3862 googleapi.Expand(req.URL, map[string]string{
3863 "parent": c.parent,
3864 })
3865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3866 }
3867
3868
3869
3870
3871
3872
3873 func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3874 gensupport.SetOptions(c.urlParams_, opts...)
3875 res, err := c.doRequest("json")
3876 if res != nil && res.StatusCode == http.StatusNotModified {
3877 if res.Body != nil {
3878 res.Body.Close()
3879 }
3880 return nil, gensupport.WrapError(&googleapi.Error{
3881 Code: res.StatusCode,
3882 Header: res.Header,
3883 })
3884 }
3885 if err != nil {
3886 return nil, err
3887 }
3888 defer googleapi.CloseBody(res)
3889 if err := googleapi.CheckResponse(res); err != nil {
3890 return nil, gensupport.WrapError(err)
3891 }
3892 ret := &Operation{
3893 ServerResponse: googleapi.ServerResponse{
3894 Header: res.Header,
3895 HTTPStatusCode: res.StatusCode,
3896 },
3897 }
3898 target := &ret
3899 if err := gensupport.DecodeResponse(target, res); err != nil {
3900 return nil, err
3901 }
3902 return ret, nil
3903 }
3904
3905 type ProjectsInstancesDeleteCall struct {
3906 s *Service
3907 name string
3908 urlParams_ gensupport.URLParams
3909 ctx_ context.Context
3910 header_ http.Header
3911 }
3912
3913
3914
3915
3916
3917 func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall {
3918 c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3919 c.name = name
3920 return c
3921 }
3922
3923
3924
3925
3926 func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall {
3927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3928 return c
3929 }
3930
3931
3932 func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall {
3933 c.ctx_ = ctx
3934 return c
3935 }
3936
3937
3938
3939 func (c *ProjectsInstancesDeleteCall) Header() http.Header {
3940 if c.header_ == nil {
3941 c.header_ = make(http.Header)
3942 }
3943 return c.header_
3944 }
3945
3946 func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
3947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3948 var body io.Reader = nil
3949 c.urlParams_.Set("alt", alt)
3950 c.urlParams_.Set("prettyPrint", "false")
3951 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3952 urls += "?" + c.urlParams_.Encode()
3953 req, err := http.NewRequest("DELETE", urls, body)
3954 if err != nil {
3955 return nil, err
3956 }
3957 req.Header = reqHeaders
3958 googleapi.Expand(req.URL, map[string]string{
3959 "name": c.name,
3960 })
3961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3962 }
3963
3964
3965
3966
3967
3968
3969 func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3970 gensupport.SetOptions(c.urlParams_, opts...)
3971 res, err := c.doRequest("json")
3972 if res != nil && res.StatusCode == http.StatusNotModified {
3973 if res.Body != nil {
3974 res.Body.Close()
3975 }
3976 return nil, gensupport.WrapError(&googleapi.Error{
3977 Code: res.StatusCode,
3978 Header: res.Header,
3979 })
3980 }
3981 if err != nil {
3982 return nil, err
3983 }
3984 defer googleapi.CloseBody(res)
3985 if err := googleapi.CheckResponse(res); err != nil {
3986 return nil, gensupport.WrapError(err)
3987 }
3988 ret := &Empty{
3989 ServerResponse: googleapi.ServerResponse{
3990 Header: res.Header,
3991 HTTPStatusCode: res.StatusCode,
3992 },
3993 }
3994 target := &ret
3995 if err := gensupport.DecodeResponse(target, res); err != nil {
3996 return nil, err
3997 }
3998 return ret, nil
3999 }
4000
4001 type ProjectsInstancesGetCall struct {
4002 s *Service
4003 name string
4004 urlParams_ gensupport.URLParams
4005 ifNoneMatch_ string
4006 ctx_ context.Context
4007 header_ http.Header
4008 }
4009
4010
4011
4012
4013
4014 func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall {
4015 c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4016 c.name = name
4017 return c
4018 }
4019
4020
4021
4022
4023 func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall {
4024 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4025 return c
4026 }
4027
4028
4029
4030
4031 func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall {
4032 c.ifNoneMatch_ = entityTag
4033 return c
4034 }
4035
4036
4037 func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall {
4038 c.ctx_ = ctx
4039 return c
4040 }
4041
4042
4043
4044 func (c *ProjectsInstancesGetCall) Header() http.Header {
4045 if c.header_ == nil {
4046 c.header_ = make(http.Header)
4047 }
4048 return c.header_
4049 }
4050
4051 func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
4052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4053 if c.ifNoneMatch_ != "" {
4054 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4055 }
4056 var body io.Reader = nil
4057 c.urlParams_.Set("alt", alt)
4058 c.urlParams_.Set("prettyPrint", "false")
4059 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4060 urls += "?" + c.urlParams_.Encode()
4061 req, err := http.NewRequest("GET", urls, body)
4062 if err != nil {
4063 return nil, err
4064 }
4065 req.Header = reqHeaders
4066 googleapi.Expand(req.URL, map[string]string{
4067 "name": c.name,
4068 })
4069 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4070 }
4071
4072
4073
4074
4075
4076
4077 func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
4078 gensupport.SetOptions(c.urlParams_, opts...)
4079 res, err := c.doRequest("json")
4080 if res != nil && res.StatusCode == http.StatusNotModified {
4081 if res.Body != nil {
4082 res.Body.Close()
4083 }
4084 return nil, gensupport.WrapError(&googleapi.Error{
4085 Code: res.StatusCode,
4086 Header: res.Header,
4087 })
4088 }
4089 if err != nil {
4090 return nil, err
4091 }
4092 defer googleapi.CloseBody(res)
4093 if err := googleapi.CheckResponse(res); err != nil {
4094 return nil, gensupport.WrapError(err)
4095 }
4096 ret := &Instance{
4097 ServerResponse: googleapi.ServerResponse{
4098 Header: res.Header,
4099 HTTPStatusCode: res.StatusCode,
4100 },
4101 }
4102 target := &ret
4103 if err := gensupport.DecodeResponse(target, res); err != nil {
4104 return nil, err
4105 }
4106 return ret, nil
4107 }
4108
4109 type ProjectsInstancesGetIamPolicyCall struct {
4110 s *Service
4111 resource string
4112 getiampolicyrequest *GetIamPolicyRequest
4113 urlParams_ gensupport.URLParams
4114 ctx_ context.Context
4115 header_ http.Header
4116 }
4117
4118
4119
4120
4121
4122
4123
4124
4125 func (r *ProjectsInstancesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesGetIamPolicyCall {
4126 c := &ProjectsInstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4127 c.resource = resource
4128 c.getiampolicyrequest = getiampolicyrequest
4129 return c
4130 }
4131
4132
4133
4134
4135 func (c *ProjectsInstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetIamPolicyCall {
4136 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4137 return c
4138 }
4139
4140
4141 func (c *ProjectsInstancesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesGetIamPolicyCall {
4142 c.ctx_ = ctx
4143 return c
4144 }
4145
4146
4147
4148 func (c *ProjectsInstancesGetIamPolicyCall) Header() http.Header {
4149 if c.header_ == nil {
4150 c.header_ = make(http.Header)
4151 }
4152 return c.header_
4153 }
4154
4155 func (c *ProjectsInstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4156 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4157 var body io.Reader = nil
4158 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
4159 if err != nil {
4160 return nil, err
4161 }
4162 c.urlParams_.Set("alt", alt)
4163 c.urlParams_.Set("prettyPrint", "false")
4164 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
4165 urls += "?" + c.urlParams_.Encode()
4166 req, err := http.NewRequest("POST", urls, body)
4167 if err != nil {
4168 return nil, err
4169 }
4170 req.Header = reqHeaders
4171 googleapi.Expand(req.URL, map[string]string{
4172 "resource": c.resource,
4173 })
4174 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4175 }
4176
4177
4178
4179
4180
4181
4182 func (c *ProjectsInstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4183 gensupport.SetOptions(c.urlParams_, opts...)
4184 res, err := c.doRequest("json")
4185 if res != nil && res.StatusCode == http.StatusNotModified {
4186 if res.Body != nil {
4187 res.Body.Close()
4188 }
4189 return nil, gensupport.WrapError(&googleapi.Error{
4190 Code: res.StatusCode,
4191 Header: res.Header,
4192 })
4193 }
4194 if err != nil {
4195 return nil, err
4196 }
4197 defer googleapi.CloseBody(res)
4198 if err := googleapi.CheckResponse(res); err != nil {
4199 return nil, gensupport.WrapError(err)
4200 }
4201 ret := &Policy{
4202 ServerResponse: googleapi.ServerResponse{
4203 Header: res.Header,
4204 HTTPStatusCode: res.StatusCode,
4205 },
4206 }
4207 target := &ret
4208 if err := gensupport.DecodeResponse(target, res); err != nil {
4209 return nil, err
4210 }
4211 return ret, nil
4212 }
4213
4214 type ProjectsInstancesListCall struct {
4215 s *Service
4216 parent string
4217 urlParams_ gensupport.URLParams
4218 ifNoneMatch_ string
4219 ctx_ context.Context
4220 header_ http.Header
4221 }
4222
4223
4224
4225
4226
4227 func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall {
4228 c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4229 c.parent = parent
4230 return c
4231 }
4232
4233
4234
4235 func (c *ProjectsInstancesListCall) PageToken(pageToken string) *ProjectsInstancesListCall {
4236 c.urlParams_.Set("pageToken", pageToken)
4237 return c
4238 }
4239
4240
4241
4242
4243 func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall {
4244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4245 return c
4246 }
4247
4248
4249
4250
4251 func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall {
4252 c.ifNoneMatch_ = entityTag
4253 return c
4254 }
4255
4256
4257 func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall {
4258 c.ctx_ = ctx
4259 return c
4260 }
4261
4262
4263
4264 func (c *ProjectsInstancesListCall) Header() http.Header {
4265 if c.header_ == nil {
4266 c.header_ = make(http.Header)
4267 }
4268 return c.header_
4269 }
4270
4271 func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) {
4272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4273 if c.ifNoneMatch_ != "" {
4274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4275 }
4276 var body io.Reader = nil
4277 c.urlParams_.Set("alt", alt)
4278 c.urlParams_.Set("prettyPrint", "false")
4279 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/instances")
4280 urls += "?" + c.urlParams_.Encode()
4281 req, err := http.NewRequest("GET", urls, body)
4282 if err != nil {
4283 return nil, err
4284 }
4285 req.Header = reqHeaders
4286 googleapi.Expand(req.URL, map[string]string{
4287 "parent": c.parent,
4288 })
4289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4290 }
4291
4292
4293
4294
4295
4296
4297
4298 func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
4299 gensupport.SetOptions(c.urlParams_, opts...)
4300 res, err := c.doRequest("json")
4301 if res != nil && res.StatusCode == http.StatusNotModified {
4302 if res.Body != nil {
4303 res.Body.Close()
4304 }
4305 return nil, gensupport.WrapError(&googleapi.Error{
4306 Code: res.StatusCode,
4307 Header: res.Header,
4308 })
4309 }
4310 if err != nil {
4311 return nil, err
4312 }
4313 defer googleapi.CloseBody(res)
4314 if err := googleapi.CheckResponse(res); err != nil {
4315 return nil, gensupport.WrapError(err)
4316 }
4317 ret := &ListInstancesResponse{
4318 ServerResponse: googleapi.ServerResponse{
4319 Header: res.Header,
4320 HTTPStatusCode: res.StatusCode,
4321 },
4322 }
4323 target := &ret
4324 if err := gensupport.DecodeResponse(target, res); err != nil {
4325 return nil, err
4326 }
4327 return ret, nil
4328 }
4329
4330
4331
4332
4333 func (c *ProjectsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
4334 c.ctx_ = ctx
4335 defer c.PageToken(c.urlParams_.Get("pageToken"))
4336 for {
4337 x, err := c.Do()
4338 if err != nil {
4339 return err
4340 }
4341 if err := f(x); err != nil {
4342 return err
4343 }
4344 if x.NextPageToken == "" {
4345 return nil
4346 }
4347 c.PageToken(x.NextPageToken)
4348 }
4349 }
4350
4351 type ProjectsInstancesPartialUpdateInstanceCall struct {
4352 s *Service
4353 name string
4354 instance *Instance
4355 urlParams_ gensupport.URLParams
4356 ctx_ context.Context
4357 header_ http.Header
4358 }
4359
4360
4361
4362
4363
4364
4365
4366 func (r *ProjectsInstancesService) PartialUpdateInstance(name string, instance *Instance) *ProjectsInstancesPartialUpdateInstanceCall {
4367 c := &ProjectsInstancesPartialUpdateInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4368 c.name = name
4369 c.instance = instance
4370 return c
4371 }
4372
4373
4374
4375 func (c *ProjectsInstancesPartialUpdateInstanceCall) UpdateMask(updateMask string) *ProjectsInstancesPartialUpdateInstanceCall {
4376 c.urlParams_.Set("updateMask", updateMask)
4377 return c
4378 }
4379
4380
4381
4382
4383 func (c *ProjectsInstancesPartialUpdateInstanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesPartialUpdateInstanceCall {
4384 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4385 return c
4386 }
4387
4388
4389 func (c *ProjectsInstancesPartialUpdateInstanceCall) Context(ctx context.Context) *ProjectsInstancesPartialUpdateInstanceCall {
4390 c.ctx_ = ctx
4391 return c
4392 }
4393
4394
4395
4396 func (c *ProjectsInstancesPartialUpdateInstanceCall) Header() http.Header {
4397 if c.header_ == nil {
4398 c.header_ = make(http.Header)
4399 }
4400 return c.header_
4401 }
4402
4403 func (c *ProjectsInstancesPartialUpdateInstanceCall) doRequest(alt string) (*http.Response, error) {
4404 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4405 var body io.Reader = nil
4406 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
4407 if err != nil {
4408 return nil, err
4409 }
4410 c.urlParams_.Set("alt", alt)
4411 c.urlParams_.Set("prettyPrint", "false")
4412 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4413 urls += "?" + c.urlParams_.Encode()
4414 req, err := http.NewRequest("PATCH", urls, body)
4415 if err != nil {
4416 return nil, err
4417 }
4418 req.Header = reqHeaders
4419 googleapi.Expand(req.URL, map[string]string{
4420 "name": c.name,
4421 })
4422 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4423 }
4424
4425
4426
4427
4428
4429
4430 func (c *ProjectsInstancesPartialUpdateInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4431 gensupport.SetOptions(c.urlParams_, opts...)
4432 res, err := c.doRequest("json")
4433 if res != nil && res.StatusCode == http.StatusNotModified {
4434 if res.Body != nil {
4435 res.Body.Close()
4436 }
4437 return nil, gensupport.WrapError(&googleapi.Error{
4438 Code: res.StatusCode,
4439 Header: res.Header,
4440 })
4441 }
4442 if err != nil {
4443 return nil, err
4444 }
4445 defer googleapi.CloseBody(res)
4446 if err := googleapi.CheckResponse(res); err != nil {
4447 return nil, gensupport.WrapError(err)
4448 }
4449 ret := &Operation{
4450 ServerResponse: googleapi.ServerResponse{
4451 Header: res.Header,
4452 HTTPStatusCode: res.StatusCode,
4453 },
4454 }
4455 target := &ret
4456 if err := gensupport.DecodeResponse(target, res); err != nil {
4457 return nil, err
4458 }
4459 return ret, nil
4460 }
4461
4462 type ProjectsInstancesSetIamPolicyCall struct {
4463 s *Service
4464 resource string
4465 setiampolicyrequest *SetIamPolicyRequest
4466 urlParams_ gensupport.URLParams
4467 ctx_ context.Context
4468 header_ http.Header
4469 }
4470
4471
4472
4473
4474
4475
4476
4477 func (r *ProjectsInstancesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesSetIamPolicyCall {
4478 c := &ProjectsInstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4479 c.resource = resource
4480 c.setiampolicyrequest = setiampolicyrequest
4481 return c
4482 }
4483
4484
4485
4486
4487 func (c *ProjectsInstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesSetIamPolicyCall {
4488 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4489 return c
4490 }
4491
4492
4493 func (c *ProjectsInstancesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesSetIamPolicyCall {
4494 c.ctx_ = ctx
4495 return c
4496 }
4497
4498
4499
4500 func (c *ProjectsInstancesSetIamPolicyCall) Header() http.Header {
4501 if c.header_ == nil {
4502 c.header_ = make(http.Header)
4503 }
4504 return c.header_
4505 }
4506
4507 func (c *ProjectsInstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4508 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4509 var body io.Reader = nil
4510 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4511 if err != nil {
4512 return nil, err
4513 }
4514 c.urlParams_.Set("alt", alt)
4515 c.urlParams_.Set("prettyPrint", "false")
4516 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
4517 urls += "?" + c.urlParams_.Encode()
4518 req, err := http.NewRequest("POST", urls, body)
4519 if err != nil {
4520 return nil, err
4521 }
4522 req.Header = reqHeaders
4523 googleapi.Expand(req.URL, map[string]string{
4524 "resource": c.resource,
4525 })
4526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4527 }
4528
4529
4530
4531
4532
4533
4534 func (c *ProjectsInstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4535 gensupport.SetOptions(c.urlParams_, opts...)
4536 res, err := c.doRequest("json")
4537 if res != nil && res.StatusCode == http.StatusNotModified {
4538 if res.Body != nil {
4539 res.Body.Close()
4540 }
4541 return nil, gensupport.WrapError(&googleapi.Error{
4542 Code: res.StatusCode,
4543 Header: res.Header,
4544 })
4545 }
4546 if err != nil {
4547 return nil, err
4548 }
4549 defer googleapi.CloseBody(res)
4550 if err := googleapi.CheckResponse(res); err != nil {
4551 return nil, gensupport.WrapError(err)
4552 }
4553 ret := &Policy{
4554 ServerResponse: googleapi.ServerResponse{
4555 Header: res.Header,
4556 HTTPStatusCode: res.StatusCode,
4557 },
4558 }
4559 target := &ret
4560 if err := gensupport.DecodeResponse(target, res); err != nil {
4561 return nil, err
4562 }
4563 return ret, nil
4564 }
4565
4566 type ProjectsInstancesTestIamPermissionsCall struct {
4567 s *Service
4568 resource string
4569 testiampermissionsrequest *TestIamPermissionsRequest
4570 urlParams_ gensupport.URLParams
4571 ctx_ context.Context
4572 header_ http.Header
4573 }
4574
4575
4576
4577
4578
4579
4580
4581
4582 func (r *ProjectsInstancesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTestIamPermissionsCall {
4583 c := &ProjectsInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4584 c.resource = resource
4585 c.testiampermissionsrequest = testiampermissionsrequest
4586 return c
4587 }
4588
4589
4590
4591
4592 func (c *ProjectsInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTestIamPermissionsCall {
4593 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4594 return c
4595 }
4596
4597
4598 func (c *ProjectsInstancesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTestIamPermissionsCall {
4599 c.ctx_ = ctx
4600 return c
4601 }
4602
4603
4604
4605 func (c *ProjectsInstancesTestIamPermissionsCall) Header() http.Header {
4606 if c.header_ == nil {
4607 c.header_ = make(http.Header)
4608 }
4609 return c.header_
4610 }
4611
4612 func (c *ProjectsInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4613 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4614 var body io.Reader = nil
4615 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4616 if err != nil {
4617 return nil, err
4618 }
4619 c.urlParams_.Set("alt", alt)
4620 c.urlParams_.Set("prettyPrint", "false")
4621 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
4622 urls += "?" + c.urlParams_.Encode()
4623 req, err := http.NewRequest("POST", urls, body)
4624 if err != nil {
4625 return nil, err
4626 }
4627 req.Header = reqHeaders
4628 googleapi.Expand(req.URL, map[string]string{
4629 "resource": c.resource,
4630 })
4631 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4632 }
4633
4634
4635
4636
4637
4638
4639
4640 func (c *ProjectsInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4641 gensupport.SetOptions(c.urlParams_, opts...)
4642 res, err := c.doRequest("json")
4643 if res != nil && res.StatusCode == http.StatusNotModified {
4644 if res.Body != nil {
4645 res.Body.Close()
4646 }
4647 return nil, gensupport.WrapError(&googleapi.Error{
4648 Code: res.StatusCode,
4649 Header: res.Header,
4650 })
4651 }
4652 if err != nil {
4653 return nil, err
4654 }
4655 defer googleapi.CloseBody(res)
4656 if err := googleapi.CheckResponse(res); err != nil {
4657 return nil, gensupport.WrapError(err)
4658 }
4659 ret := &TestIamPermissionsResponse{
4660 ServerResponse: googleapi.ServerResponse{
4661 Header: res.Header,
4662 HTTPStatusCode: res.StatusCode,
4663 },
4664 }
4665 target := &ret
4666 if err := gensupport.DecodeResponse(target, res); err != nil {
4667 return nil, err
4668 }
4669 return ret, nil
4670 }
4671
4672 type ProjectsInstancesUpdateCall struct {
4673 s *Service
4674 name string
4675 instance *Instance
4676 urlParams_ gensupport.URLParams
4677 ctx_ context.Context
4678 header_ http.Header
4679 }
4680
4681
4682
4683
4684
4685
4686
4687 func (r *ProjectsInstancesService) Update(name string, instance *Instance) *ProjectsInstancesUpdateCall {
4688 c := &ProjectsInstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4689 c.name = name
4690 c.instance = instance
4691 return c
4692 }
4693
4694
4695
4696
4697 func (c *ProjectsInstancesUpdateCall) Fields(s ...googleapi.Field) *ProjectsInstancesUpdateCall {
4698 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4699 return c
4700 }
4701
4702
4703 func (c *ProjectsInstancesUpdateCall) Context(ctx context.Context) *ProjectsInstancesUpdateCall {
4704 c.ctx_ = ctx
4705 return c
4706 }
4707
4708
4709
4710 func (c *ProjectsInstancesUpdateCall) Header() http.Header {
4711 if c.header_ == nil {
4712 c.header_ = make(http.Header)
4713 }
4714 return c.header_
4715 }
4716
4717 func (c *ProjectsInstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
4718 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4719 var body io.Reader = nil
4720 body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
4721 if err != nil {
4722 return nil, err
4723 }
4724 c.urlParams_.Set("alt", alt)
4725 c.urlParams_.Set("prettyPrint", "false")
4726 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4727 urls += "?" + c.urlParams_.Encode()
4728 req, err := http.NewRequest("PUT", urls, body)
4729 if err != nil {
4730 return nil, err
4731 }
4732 req.Header = reqHeaders
4733 googleapi.Expand(req.URL, map[string]string{
4734 "name": c.name,
4735 })
4736 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4737 }
4738
4739
4740
4741
4742
4743
4744 func (c *ProjectsInstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
4745 gensupport.SetOptions(c.urlParams_, opts...)
4746 res, err := c.doRequest("json")
4747 if res != nil && res.StatusCode == http.StatusNotModified {
4748 if res.Body != nil {
4749 res.Body.Close()
4750 }
4751 return nil, gensupport.WrapError(&googleapi.Error{
4752 Code: res.StatusCode,
4753 Header: res.Header,
4754 })
4755 }
4756 if err != nil {
4757 return nil, err
4758 }
4759 defer googleapi.CloseBody(res)
4760 if err := googleapi.CheckResponse(res); err != nil {
4761 return nil, gensupport.WrapError(err)
4762 }
4763 ret := &Instance{
4764 ServerResponse: googleapi.ServerResponse{
4765 Header: res.Header,
4766 HTTPStatusCode: res.StatusCode,
4767 },
4768 }
4769 target := &ret
4770 if err := gensupport.DecodeResponse(target, res); err != nil {
4771 return nil, err
4772 }
4773 return ret, nil
4774 }
4775
4776 type ProjectsInstancesAppProfilesCreateCall struct {
4777 s *Service
4778 parent string
4779 appprofile *AppProfile
4780 urlParams_ gensupport.URLParams
4781 ctx_ context.Context
4782 header_ http.Header
4783 }
4784
4785
4786
4787
4788
4789 func (r *ProjectsInstancesAppProfilesService) Create(parent string, appprofile *AppProfile) *ProjectsInstancesAppProfilesCreateCall {
4790 c := &ProjectsInstancesAppProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4791 c.parent = parent
4792 c.appprofile = appprofile
4793 return c
4794 }
4795
4796
4797
4798
4799
4800 func (c *ProjectsInstancesAppProfilesCreateCall) AppProfileId(appProfileId string) *ProjectsInstancesAppProfilesCreateCall {
4801 c.urlParams_.Set("appProfileId", appProfileId)
4802 return c
4803 }
4804
4805
4806
4807 func (c *ProjectsInstancesAppProfilesCreateCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesCreateCall {
4808 c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
4809 return c
4810 }
4811
4812
4813
4814
4815 func (c *ProjectsInstancesAppProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesCreateCall {
4816 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4817 return c
4818 }
4819
4820
4821 func (c *ProjectsInstancesAppProfilesCreateCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesCreateCall {
4822 c.ctx_ = ctx
4823 return c
4824 }
4825
4826
4827
4828 func (c *ProjectsInstancesAppProfilesCreateCall) Header() http.Header {
4829 if c.header_ == nil {
4830 c.header_ = make(http.Header)
4831 }
4832 return c.header_
4833 }
4834
4835 func (c *ProjectsInstancesAppProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
4836 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4837 var body io.Reader = nil
4838 body, err := googleapi.WithoutDataWrapper.JSONReader(c.appprofile)
4839 if err != nil {
4840 return nil, err
4841 }
4842 c.urlParams_.Set("alt", alt)
4843 c.urlParams_.Set("prettyPrint", "false")
4844 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/appProfiles")
4845 urls += "?" + c.urlParams_.Encode()
4846 req, err := http.NewRequest("POST", urls, body)
4847 if err != nil {
4848 return nil, err
4849 }
4850 req.Header = reqHeaders
4851 googleapi.Expand(req.URL, map[string]string{
4852 "parent": c.parent,
4853 })
4854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4855 }
4856
4857
4858
4859
4860
4861
4862 func (c *ProjectsInstancesAppProfilesCreateCall) Do(opts ...googleapi.CallOption) (*AppProfile, error) {
4863 gensupport.SetOptions(c.urlParams_, opts...)
4864 res, err := c.doRequest("json")
4865 if res != nil && res.StatusCode == http.StatusNotModified {
4866 if res.Body != nil {
4867 res.Body.Close()
4868 }
4869 return nil, gensupport.WrapError(&googleapi.Error{
4870 Code: res.StatusCode,
4871 Header: res.Header,
4872 })
4873 }
4874 if err != nil {
4875 return nil, err
4876 }
4877 defer googleapi.CloseBody(res)
4878 if err := googleapi.CheckResponse(res); err != nil {
4879 return nil, gensupport.WrapError(err)
4880 }
4881 ret := &AppProfile{
4882 ServerResponse: googleapi.ServerResponse{
4883 Header: res.Header,
4884 HTTPStatusCode: res.StatusCode,
4885 },
4886 }
4887 target := &ret
4888 if err := gensupport.DecodeResponse(target, res); err != nil {
4889 return nil, err
4890 }
4891 return ret, nil
4892 }
4893
4894 type ProjectsInstancesAppProfilesDeleteCall struct {
4895 s *Service
4896 name string
4897 urlParams_ gensupport.URLParams
4898 ctx_ context.Context
4899 header_ http.Header
4900 }
4901
4902
4903
4904
4905
4906 func (r *ProjectsInstancesAppProfilesService) Delete(name string) *ProjectsInstancesAppProfilesDeleteCall {
4907 c := &ProjectsInstancesAppProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4908 c.name = name
4909 return c
4910 }
4911
4912
4913
4914 func (c *ProjectsInstancesAppProfilesDeleteCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesDeleteCall {
4915 c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
4916 return c
4917 }
4918
4919
4920
4921
4922 func (c *ProjectsInstancesAppProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesDeleteCall {
4923 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4924 return c
4925 }
4926
4927
4928 func (c *ProjectsInstancesAppProfilesDeleteCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesDeleteCall {
4929 c.ctx_ = ctx
4930 return c
4931 }
4932
4933
4934
4935 func (c *ProjectsInstancesAppProfilesDeleteCall) Header() http.Header {
4936 if c.header_ == nil {
4937 c.header_ = make(http.Header)
4938 }
4939 return c.header_
4940 }
4941
4942 func (c *ProjectsInstancesAppProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
4943 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4944 var body io.Reader = nil
4945 c.urlParams_.Set("alt", alt)
4946 c.urlParams_.Set("prettyPrint", "false")
4947 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
4948 urls += "?" + c.urlParams_.Encode()
4949 req, err := http.NewRequest("DELETE", urls, body)
4950 if err != nil {
4951 return nil, err
4952 }
4953 req.Header = reqHeaders
4954 googleapi.Expand(req.URL, map[string]string{
4955 "name": c.name,
4956 })
4957 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4958 }
4959
4960
4961
4962
4963
4964
4965 func (c *ProjectsInstancesAppProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4966 gensupport.SetOptions(c.urlParams_, opts...)
4967 res, err := c.doRequest("json")
4968 if res != nil && res.StatusCode == http.StatusNotModified {
4969 if res.Body != nil {
4970 res.Body.Close()
4971 }
4972 return nil, gensupport.WrapError(&googleapi.Error{
4973 Code: res.StatusCode,
4974 Header: res.Header,
4975 })
4976 }
4977 if err != nil {
4978 return nil, err
4979 }
4980 defer googleapi.CloseBody(res)
4981 if err := googleapi.CheckResponse(res); err != nil {
4982 return nil, gensupport.WrapError(err)
4983 }
4984 ret := &Empty{
4985 ServerResponse: googleapi.ServerResponse{
4986 Header: res.Header,
4987 HTTPStatusCode: res.StatusCode,
4988 },
4989 }
4990 target := &ret
4991 if err := gensupport.DecodeResponse(target, res); err != nil {
4992 return nil, err
4993 }
4994 return ret, nil
4995 }
4996
4997 type ProjectsInstancesAppProfilesGetCall struct {
4998 s *Service
4999 name string
5000 urlParams_ gensupport.URLParams
5001 ifNoneMatch_ string
5002 ctx_ context.Context
5003 header_ http.Header
5004 }
5005
5006
5007
5008
5009
5010 func (r *ProjectsInstancesAppProfilesService) Get(name string) *ProjectsInstancesAppProfilesGetCall {
5011 c := &ProjectsInstancesAppProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5012 c.name = name
5013 return c
5014 }
5015
5016
5017
5018
5019 func (c *ProjectsInstancesAppProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesGetCall {
5020 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5021 return c
5022 }
5023
5024
5025
5026
5027 func (c *ProjectsInstancesAppProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesAppProfilesGetCall {
5028 c.ifNoneMatch_ = entityTag
5029 return c
5030 }
5031
5032
5033 func (c *ProjectsInstancesAppProfilesGetCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesGetCall {
5034 c.ctx_ = ctx
5035 return c
5036 }
5037
5038
5039
5040 func (c *ProjectsInstancesAppProfilesGetCall) Header() http.Header {
5041 if c.header_ == nil {
5042 c.header_ = make(http.Header)
5043 }
5044 return c.header_
5045 }
5046
5047 func (c *ProjectsInstancesAppProfilesGetCall) doRequest(alt string) (*http.Response, error) {
5048 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5049 if c.ifNoneMatch_ != "" {
5050 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5051 }
5052 var body io.Reader = nil
5053 c.urlParams_.Set("alt", alt)
5054 c.urlParams_.Set("prettyPrint", "false")
5055 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5056 urls += "?" + c.urlParams_.Encode()
5057 req, err := http.NewRequest("GET", urls, body)
5058 if err != nil {
5059 return nil, err
5060 }
5061 req.Header = reqHeaders
5062 googleapi.Expand(req.URL, map[string]string{
5063 "name": c.name,
5064 })
5065 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5066 }
5067
5068
5069
5070
5071
5072
5073 func (c *ProjectsInstancesAppProfilesGetCall) Do(opts ...googleapi.CallOption) (*AppProfile, error) {
5074 gensupport.SetOptions(c.urlParams_, opts...)
5075 res, err := c.doRequest("json")
5076 if res != nil && res.StatusCode == http.StatusNotModified {
5077 if res.Body != nil {
5078 res.Body.Close()
5079 }
5080 return nil, gensupport.WrapError(&googleapi.Error{
5081 Code: res.StatusCode,
5082 Header: res.Header,
5083 })
5084 }
5085 if err != nil {
5086 return nil, err
5087 }
5088 defer googleapi.CloseBody(res)
5089 if err := googleapi.CheckResponse(res); err != nil {
5090 return nil, gensupport.WrapError(err)
5091 }
5092 ret := &AppProfile{
5093 ServerResponse: googleapi.ServerResponse{
5094 Header: res.Header,
5095 HTTPStatusCode: res.StatusCode,
5096 },
5097 }
5098 target := &ret
5099 if err := gensupport.DecodeResponse(target, res); err != nil {
5100 return nil, err
5101 }
5102 return ret, nil
5103 }
5104
5105 type ProjectsInstancesAppProfilesListCall struct {
5106 s *Service
5107 parent string
5108 urlParams_ gensupport.URLParams
5109 ifNoneMatch_ string
5110 ctx_ context.Context
5111 header_ http.Header
5112 }
5113
5114
5115
5116
5117
5118
5119
5120
5121 func (r *ProjectsInstancesAppProfilesService) List(parent string) *ProjectsInstancesAppProfilesListCall {
5122 c := &ProjectsInstancesAppProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5123 c.parent = parent
5124 return c
5125 }
5126
5127
5128
5129
5130
5131
5132
5133
5134 func (c *ProjectsInstancesAppProfilesListCall) PageSize(pageSize int64) *ProjectsInstancesAppProfilesListCall {
5135 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5136 return c
5137 }
5138
5139
5140
5141 func (c *ProjectsInstancesAppProfilesListCall) PageToken(pageToken string) *ProjectsInstancesAppProfilesListCall {
5142 c.urlParams_.Set("pageToken", pageToken)
5143 return c
5144 }
5145
5146
5147
5148
5149 func (c *ProjectsInstancesAppProfilesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesListCall {
5150 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5151 return c
5152 }
5153
5154
5155
5156
5157 func (c *ProjectsInstancesAppProfilesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesAppProfilesListCall {
5158 c.ifNoneMatch_ = entityTag
5159 return c
5160 }
5161
5162
5163 func (c *ProjectsInstancesAppProfilesListCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesListCall {
5164 c.ctx_ = ctx
5165 return c
5166 }
5167
5168
5169
5170 func (c *ProjectsInstancesAppProfilesListCall) Header() http.Header {
5171 if c.header_ == nil {
5172 c.header_ = make(http.Header)
5173 }
5174 return c.header_
5175 }
5176
5177 func (c *ProjectsInstancesAppProfilesListCall) doRequest(alt string) (*http.Response, error) {
5178 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5179 if c.ifNoneMatch_ != "" {
5180 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5181 }
5182 var body io.Reader = nil
5183 c.urlParams_.Set("alt", alt)
5184 c.urlParams_.Set("prettyPrint", "false")
5185 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/appProfiles")
5186 urls += "?" + c.urlParams_.Encode()
5187 req, err := http.NewRequest("GET", urls, body)
5188 if err != nil {
5189 return nil, err
5190 }
5191 req.Header = reqHeaders
5192 googleapi.Expand(req.URL, map[string]string{
5193 "parent": c.parent,
5194 })
5195 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5196 }
5197
5198
5199
5200
5201
5202
5203
5204 func (c *ProjectsInstancesAppProfilesListCall) Do(opts ...googleapi.CallOption) (*ListAppProfilesResponse, error) {
5205 gensupport.SetOptions(c.urlParams_, opts...)
5206 res, err := c.doRequest("json")
5207 if res != nil && res.StatusCode == http.StatusNotModified {
5208 if res.Body != nil {
5209 res.Body.Close()
5210 }
5211 return nil, gensupport.WrapError(&googleapi.Error{
5212 Code: res.StatusCode,
5213 Header: res.Header,
5214 })
5215 }
5216 if err != nil {
5217 return nil, err
5218 }
5219 defer googleapi.CloseBody(res)
5220 if err := googleapi.CheckResponse(res); err != nil {
5221 return nil, gensupport.WrapError(err)
5222 }
5223 ret := &ListAppProfilesResponse{
5224 ServerResponse: googleapi.ServerResponse{
5225 Header: res.Header,
5226 HTTPStatusCode: res.StatusCode,
5227 },
5228 }
5229 target := &ret
5230 if err := gensupport.DecodeResponse(target, res); err != nil {
5231 return nil, err
5232 }
5233 return ret, nil
5234 }
5235
5236
5237
5238
5239 func (c *ProjectsInstancesAppProfilesListCall) Pages(ctx context.Context, f func(*ListAppProfilesResponse) error) error {
5240 c.ctx_ = ctx
5241 defer c.PageToken(c.urlParams_.Get("pageToken"))
5242 for {
5243 x, err := c.Do()
5244 if err != nil {
5245 return err
5246 }
5247 if err := f(x); err != nil {
5248 return err
5249 }
5250 if x.NextPageToken == "" {
5251 return nil
5252 }
5253 c.PageToken(x.NextPageToken)
5254 }
5255 }
5256
5257 type ProjectsInstancesAppProfilesPatchCall struct {
5258 s *Service
5259 name string
5260 appprofile *AppProfile
5261 urlParams_ gensupport.URLParams
5262 ctx_ context.Context
5263 header_ http.Header
5264 }
5265
5266
5267
5268
5269
5270 func (r *ProjectsInstancesAppProfilesService) Patch(name string, appprofile *AppProfile) *ProjectsInstancesAppProfilesPatchCall {
5271 c := &ProjectsInstancesAppProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5272 c.name = name
5273 c.appprofile = appprofile
5274 return c
5275 }
5276
5277
5278
5279 func (c *ProjectsInstancesAppProfilesPatchCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesAppProfilesPatchCall {
5280 c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
5281 return c
5282 }
5283
5284
5285
5286
5287 func (c *ProjectsInstancesAppProfilesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesAppProfilesPatchCall {
5288 c.urlParams_.Set("updateMask", updateMask)
5289 return c
5290 }
5291
5292
5293
5294
5295 func (c *ProjectsInstancesAppProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesAppProfilesPatchCall {
5296 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5297 return c
5298 }
5299
5300
5301 func (c *ProjectsInstancesAppProfilesPatchCall) Context(ctx context.Context) *ProjectsInstancesAppProfilesPatchCall {
5302 c.ctx_ = ctx
5303 return c
5304 }
5305
5306
5307
5308 func (c *ProjectsInstancesAppProfilesPatchCall) Header() http.Header {
5309 if c.header_ == nil {
5310 c.header_ = make(http.Header)
5311 }
5312 return c.header_
5313 }
5314
5315 func (c *ProjectsInstancesAppProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
5316 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5317 var body io.Reader = nil
5318 body, err := googleapi.WithoutDataWrapper.JSONReader(c.appprofile)
5319 if err != nil {
5320 return nil, err
5321 }
5322 c.urlParams_.Set("alt", alt)
5323 c.urlParams_.Set("prettyPrint", "false")
5324 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5325 urls += "?" + c.urlParams_.Encode()
5326 req, err := http.NewRequest("PATCH", urls, body)
5327 if err != nil {
5328 return nil, err
5329 }
5330 req.Header = reqHeaders
5331 googleapi.Expand(req.URL, map[string]string{
5332 "name": c.name,
5333 })
5334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5335 }
5336
5337
5338
5339
5340
5341
5342 func (c *ProjectsInstancesAppProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5343 gensupport.SetOptions(c.urlParams_, opts...)
5344 res, err := c.doRequest("json")
5345 if res != nil && res.StatusCode == http.StatusNotModified {
5346 if res.Body != nil {
5347 res.Body.Close()
5348 }
5349 return nil, gensupport.WrapError(&googleapi.Error{
5350 Code: res.StatusCode,
5351 Header: res.Header,
5352 })
5353 }
5354 if err != nil {
5355 return nil, err
5356 }
5357 defer googleapi.CloseBody(res)
5358 if err := googleapi.CheckResponse(res); err != nil {
5359 return nil, gensupport.WrapError(err)
5360 }
5361 ret := &Operation{
5362 ServerResponse: googleapi.ServerResponse{
5363 Header: res.Header,
5364 HTTPStatusCode: res.StatusCode,
5365 },
5366 }
5367 target := &ret
5368 if err := gensupport.DecodeResponse(target, res); err != nil {
5369 return nil, err
5370 }
5371 return ret, nil
5372 }
5373
5374 type ProjectsInstancesClustersCreateCall struct {
5375 s *Service
5376 parent string
5377 cluster *Cluster
5378 urlParams_ gensupport.URLParams
5379 ctx_ context.Context
5380 header_ http.Header
5381 }
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391 func (r *ProjectsInstancesClustersService) Create(parent string, cluster *Cluster) *ProjectsInstancesClustersCreateCall {
5392 c := &ProjectsInstancesClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5393 c.parent = parent
5394 c.cluster = cluster
5395 return c
5396 }
5397
5398
5399
5400
5401
5402 func (c *ProjectsInstancesClustersCreateCall) ClusterId(clusterId string) *ProjectsInstancesClustersCreateCall {
5403 c.urlParams_.Set("clusterId", clusterId)
5404 return c
5405 }
5406
5407
5408
5409
5410 func (c *ProjectsInstancesClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersCreateCall {
5411 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5412 return c
5413 }
5414
5415
5416 func (c *ProjectsInstancesClustersCreateCall) Context(ctx context.Context) *ProjectsInstancesClustersCreateCall {
5417 c.ctx_ = ctx
5418 return c
5419 }
5420
5421
5422
5423 func (c *ProjectsInstancesClustersCreateCall) Header() http.Header {
5424 if c.header_ == nil {
5425 c.header_ = make(http.Header)
5426 }
5427 return c.header_
5428 }
5429
5430 func (c *ProjectsInstancesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
5431 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5432 var body io.Reader = nil
5433 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
5434 if err != nil {
5435 return nil, err
5436 }
5437 c.urlParams_.Set("alt", alt)
5438 c.urlParams_.Set("prettyPrint", "false")
5439 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/clusters")
5440 urls += "?" + c.urlParams_.Encode()
5441 req, err := http.NewRequest("POST", urls, body)
5442 if err != nil {
5443 return nil, err
5444 }
5445 req.Header = reqHeaders
5446 googleapi.Expand(req.URL, map[string]string{
5447 "parent": c.parent,
5448 })
5449 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5450 }
5451
5452
5453
5454
5455
5456
5457 func (c *ProjectsInstancesClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5458 gensupport.SetOptions(c.urlParams_, opts...)
5459 res, err := c.doRequest("json")
5460 if res != nil && res.StatusCode == http.StatusNotModified {
5461 if res.Body != nil {
5462 res.Body.Close()
5463 }
5464 return nil, gensupport.WrapError(&googleapi.Error{
5465 Code: res.StatusCode,
5466 Header: res.Header,
5467 })
5468 }
5469 if err != nil {
5470 return nil, err
5471 }
5472 defer googleapi.CloseBody(res)
5473 if err := googleapi.CheckResponse(res); err != nil {
5474 return nil, gensupport.WrapError(err)
5475 }
5476 ret := &Operation{
5477 ServerResponse: googleapi.ServerResponse{
5478 Header: res.Header,
5479 HTTPStatusCode: res.StatusCode,
5480 },
5481 }
5482 target := &ret
5483 if err := gensupport.DecodeResponse(target, res); err != nil {
5484 return nil, err
5485 }
5486 return ret, nil
5487 }
5488
5489 type ProjectsInstancesClustersDeleteCall struct {
5490 s *Service
5491 name string
5492 urlParams_ gensupport.URLParams
5493 ctx_ context.Context
5494 header_ http.Header
5495 }
5496
5497
5498
5499
5500
5501 func (r *ProjectsInstancesClustersService) Delete(name string) *ProjectsInstancesClustersDeleteCall {
5502 c := &ProjectsInstancesClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5503 c.name = name
5504 return c
5505 }
5506
5507
5508
5509
5510 func (c *ProjectsInstancesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersDeleteCall {
5511 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5512 return c
5513 }
5514
5515
5516 func (c *ProjectsInstancesClustersDeleteCall) Context(ctx context.Context) *ProjectsInstancesClustersDeleteCall {
5517 c.ctx_ = ctx
5518 return c
5519 }
5520
5521
5522
5523 func (c *ProjectsInstancesClustersDeleteCall) Header() http.Header {
5524 if c.header_ == nil {
5525 c.header_ = make(http.Header)
5526 }
5527 return c.header_
5528 }
5529
5530 func (c *ProjectsInstancesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
5531 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5532 var body io.Reader = nil
5533 c.urlParams_.Set("alt", alt)
5534 c.urlParams_.Set("prettyPrint", "false")
5535 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5536 urls += "?" + c.urlParams_.Encode()
5537 req, err := http.NewRequest("DELETE", urls, body)
5538 if err != nil {
5539 return nil, err
5540 }
5541 req.Header = reqHeaders
5542 googleapi.Expand(req.URL, map[string]string{
5543 "name": c.name,
5544 })
5545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5546 }
5547
5548
5549
5550
5551
5552
5553 func (c *ProjectsInstancesClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5554 gensupport.SetOptions(c.urlParams_, opts...)
5555 res, err := c.doRequest("json")
5556 if res != nil && res.StatusCode == http.StatusNotModified {
5557 if res.Body != nil {
5558 res.Body.Close()
5559 }
5560 return nil, gensupport.WrapError(&googleapi.Error{
5561 Code: res.StatusCode,
5562 Header: res.Header,
5563 })
5564 }
5565 if err != nil {
5566 return nil, err
5567 }
5568 defer googleapi.CloseBody(res)
5569 if err := googleapi.CheckResponse(res); err != nil {
5570 return nil, gensupport.WrapError(err)
5571 }
5572 ret := &Empty{
5573 ServerResponse: googleapi.ServerResponse{
5574 Header: res.Header,
5575 HTTPStatusCode: res.StatusCode,
5576 },
5577 }
5578 target := &ret
5579 if err := gensupport.DecodeResponse(target, res); err != nil {
5580 return nil, err
5581 }
5582 return ret, nil
5583 }
5584
5585 type ProjectsInstancesClustersGetCall struct {
5586 s *Service
5587 name string
5588 urlParams_ gensupport.URLParams
5589 ifNoneMatch_ string
5590 ctx_ context.Context
5591 header_ http.Header
5592 }
5593
5594
5595
5596
5597
5598 func (r *ProjectsInstancesClustersService) Get(name string) *ProjectsInstancesClustersGetCall {
5599 c := &ProjectsInstancesClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5600 c.name = name
5601 return c
5602 }
5603
5604
5605
5606
5607 func (c *ProjectsInstancesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersGetCall {
5608 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5609 return c
5610 }
5611
5612
5613
5614
5615 func (c *ProjectsInstancesClustersGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersGetCall {
5616 c.ifNoneMatch_ = entityTag
5617 return c
5618 }
5619
5620
5621 func (c *ProjectsInstancesClustersGetCall) Context(ctx context.Context) *ProjectsInstancesClustersGetCall {
5622 c.ctx_ = ctx
5623 return c
5624 }
5625
5626
5627
5628 func (c *ProjectsInstancesClustersGetCall) Header() http.Header {
5629 if c.header_ == nil {
5630 c.header_ = make(http.Header)
5631 }
5632 return c.header_
5633 }
5634
5635 func (c *ProjectsInstancesClustersGetCall) doRequest(alt string) (*http.Response, error) {
5636 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5637 if c.ifNoneMatch_ != "" {
5638 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5639 }
5640 var body io.Reader = nil
5641 c.urlParams_.Set("alt", alt)
5642 c.urlParams_.Set("prettyPrint", "false")
5643 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5644 urls += "?" + c.urlParams_.Encode()
5645 req, err := http.NewRequest("GET", urls, body)
5646 if err != nil {
5647 return nil, err
5648 }
5649 req.Header = reqHeaders
5650 googleapi.Expand(req.URL, map[string]string{
5651 "name": c.name,
5652 })
5653 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5654 }
5655
5656
5657
5658
5659
5660
5661 func (c *ProjectsInstancesClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
5662 gensupport.SetOptions(c.urlParams_, opts...)
5663 res, err := c.doRequest("json")
5664 if res != nil && res.StatusCode == http.StatusNotModified {
5665 if res.Body != nil {
5666 res.Body.Close()
5667 }
5668 return nil, gensupport.WrapError(&googleapi.Error{
5669 Code: res.StatusCode,
5670 Header: res.Header,
5671 })
5672 }
5673 if err != nil {
5674 return nil, err
5675 }
5676 defer googleapi.CloseBody(res)
5677 if err := googleapi.CheckResponse(res); err != nil {
5678 return nil, gensupport.WrapError(err)
5679 }
5680 ret := &Cluster{
5681 ServerResponse: googleapi.ServerResponse{
5682 Header: res.Header,
5683 HTTPStatusCode: res.StatusCode,
5684 },
5685 }
5686 target := &ret
5687 if err := gensupport.DecodeResponse(target, res); err != nil {
5688 return nil, err
5689 }
5690 return ret, nil
5691 }
5692
5693 type ProjectsInstancesClustersListCall struct {
5694 s *Service
5695 parent string
5696 urlParams_ gensupport.URLParams
5697 ifNoneMatch_ string
5698 ctx_ context.Context
5699 header_ http.Header
5700 }
5701
5702
5703
5704
5705
5706
5707
5708
5709 func (r *ProjectsInstancesClustersService) List(parent string) *ProjectsInstancesClustersListCall {
5710 c := &ProjectsInstancesClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5711 c.parent = parent
5712 return c
5713 }
5714
5715
5716
5717 func (c *ProjectsInstancesClustersListCall) PageToken(pageToken string) *ProjectsInstancesClustersListCall {
5718 c.urlParams_.Set("pageToken", pageToken)
5719 return c
5720 }
5721
5722
5723
5724
5725 func (c *ProjectsInstancesClustersListCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersListCall {
5726 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5727 return c
5728 }
5729
5730
5731
5732
5733 func (c *ProjectsInstancesClustersListCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersListCall {
5734 c.ifNoneMatch_ = entityTag
5735 return c
5736 }
5737
5738
5739 func (c *ProjectsInstancesClustersListCall) Context(ctx context.Context) *ProjectsInstancesClustersListCall {
5740 c.ctx_ = ctx
5741 return c
5742 }
5743
5744
5745
5746 func (c *ProjectsInstancesClustersListCall) Header() http.Header {
5747 if c.header_ == nil {
5748 c.header_ = make(http.Header)
5749 }
5750 return c.header_
5751 }
5752
5753 func (c *ProjectsInstancesClustersListCall) doRequest(alt string) (*http.Response, error) {
5754 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5755 if c.ifNoneMatch_ != "" {
5756 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5757 }
5758 var body io.Reader = nil
5759 c.urlParams_.Set("alt", alt)
5760 c.urlParams_.Set("prettyPrint", "false")
5761 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/clusters")
5762 urls += "?" + c.urlParams_.Encode()
5763 req, err := http.NewRequest("GET", urls, body)
5764 if err != nil {
5765 return nil, err
5766 }
5767 req.Header = reqHeaders
5768 googleapi.Expand(req.URL, map[string]string{
5769 "parent": c.parent,
5770 })
5771 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5772 }
5773
5774
5775
5776
5777
5778
5779
5780 func (c *ProjectsInstancesClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
5781 gensupport.SetOptions(c.urlParams_, opts...)
5782 res, err := c.doRequest("json")
5783 if res != nil && res.StatusCode == http.StatusNotModified {
5784 if res.Body != nil {
5785 res.Body.Close()
5786 }
5787 return nil, gensupport.WrapError(&googleapi.Error{
5788 Code: res.StatusCode,
5789 Header: res.Header,
5790 })
5791 }
5792 if err != nil {
5793 return nil, err
5794 }
5795 defer googleapi.CloseBody(res)
5796 if err := googleapi.CheckResponse(res); err != nil {
5797 return nil, gensupport.WrapError(err)
5798 }
5799 ret := &ListClustersResponse{
5800 ServerResponse: googleapi.ServerResponse{
5801 Header: res.Header,
5802 HTTPStatusCode: res.StatusCode,
5803 },
5804 }
5805 target := &ret
5806 if err := gensupport.DecodeResponse(target, res); err != nil {
5807 return nil, err
5808 }
5809 return ret, nil
5810 }
5811
5812
5813
5814
5815 func (c *ProjectsInstancesClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
5816 c.ctx_ = ctx
5817 defer c.PageToken(c.urlParams_.Get("pageToken"))
5818 for {
5819 x, err := c.Do()
5820 if err != nil {
5821 return err
5822 }
5823 if err := f(x); err != nil {
5824 return err
5825 }
5826 if x.NextPageToken == "" {
5827 return nil
5828 }
5829 c.PageToken(x.NextPageToken)
5830 }
5831 }
5832
5833 type ProjectsInstancesClustersPartialUpdateClusterCall struct {
5834 s *Service
5835 name string
5836 cluster *Cluster
5837 urlParams_ gensupport.URLParams
5838 ctx_ context.Context
5839 header_ http.Header
5840 }
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854 func (r *ProjectsInstancesClustersService) PartialUpdateCluster(name string, cluster *Cluster) *ProjectsInstancesClustersPartialUpdateClusterCall {
5855 c := &ProjectsInstancesClustersPartialUpdateClusterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5856 c.name = name
5857 c.cluster = cluster
5858 return c
5859 }
5860
5861
5862
5863 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) UpdateMask(updateMask string) *ProjectsInstancesClustersPartialUpdateClusterCall {
5864 c.urlParams_.Set("updateMask", updateMask)
5865 return c
5866 }
5867
5868
5869
5870
5871 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersPartialUpdateClusterCall {
5872 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5873 return c
5874 }
5875
5876
5877 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) Context(ctx context.Context) *ProjectsInstancesClustersPartialUpdateClusterCall {
5878 c.ctx_ = ctx
5879 return c
5880 }
5881
5882
5883
5884 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) Header() http.Header {
5885 if c.header_ == nil {
5886 c.header_ = make(http.Header)
5887 }
5888 return c.header_
5889 }
5890
5891 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) doRequest(alt string) (*http.Response, error) {
5892 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5893 var body io.Reader = nil
5894 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
5895 if err != nil {
5896 return nil, err
5897 }
5898 c.urlParams_.Set("alt", alt)
5899 c.urlParams_.Set("prettyPrint", "false")
5900 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
5901 urls += "?" + c.urlParams_.Encode()
5902 req, err := http.NewRequest("PATCH", urls, body)
5903 if err != nil {
5904 return nil, err
5905 }
5906 req.Header = reqHeaders
5907 googleapi.Expand(req.URL, map[string]string{
5908 "name": c.name,
5909 })
5910 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5911 }
5912
5913
5914
5915
5916
5917
5918 func (c *ProjectsInstancesClustersPartialUpdateClusterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5919 gensupport.SetOptions(c.urlParams_, opts...)
5920 res, err := c.doRequest("json")
5921 if res != nil && res.StatusCode == http.StatusNotModified {
5922 if res.Body != nil {
5923 res.Body.Close()
5924 }
5925 return nil, gensupport.WrapError(&googleapi.Error{
5926 Code: res.StatusCode,
5927 Header: res.Header,
5928 })
5929 }
5930 if err != nil {
5931 return nil, err
5932 }
5933 defer googleapi.CloseBody(res)
5934 if err := googleapi.CheckResponse(res); err != nil {
5935 return nil, gensupport.WrapError(err)
5936 }
5937 ret := &Operation{
5938 ServerResponse: googleapi.ServerResponse{
5939 Header: res.Header,
5940 HTTPStatusCode: res.StatusCode,
5941 },
5942 }
5943 target := &ret
5944 if err := gensupport.DecodeResponse(target, res); err != nil {
5945 return nil, err
5946 }
5947 return ret, nil
5948 }
5949
5950 type ProjectsInstancesClustersUpdateCall struct {
5951 s *Service
5952 name string
5953 cluster *Cluster
5954 urlParams_ gensupport.URLParams
5955 ctx_ context.Context
5956 header_ http.Header
5957 }
5958
5959
5960
5961
5962
5963
5964
5965 func (r *ProjectsInstancesClustersService) Update(name string, cluster *Cluster) *ProjectsInstancesClustersUpdateCall {
5966 c := &ProjectsInstancesClustersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5967 c.name = name
5968 c.cluster = cluster
5969 return c
5970 }
5971
5972
5973
5974
5975 func (c *ProjectsInstancesClustersUpdateCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersUpdateCall {
5976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5977 return c
5978 }
5979
5980
5981 func (c *ProjectsInstancesClustersUpdateCall) Context(ctx context.Context) *ProjectsInstancesClustersUpdateCall {
5982 c.ctx_ = ctx
5983 return c
5984 }
5985
5986
5987
5988 func (c *ProjectsInstancesClustersUpdateCall) Header() http.Header {
5989 if c.header_ == nil {
5990 c.header_ = make(http.Header)
5991 }
5992 return c.header_
5993 }
5994
5995 func (c *ProjectsInstancesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
5996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5997 var body io.Reader = nil
5998 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
5999 if err != nil {
6000 return nil, err
6001 }
6002 c.urlParams_.Set("alt", alt)
6003 c.urlParams_.Set("prettyPrint", "false")
6004 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6005 urls += "?" + c.urlParams_.Encode()
6006 req, err := http.NewRequest("PUT", urls, body)
6007 if err != nil {
6008 return nil, err
6009 }
6010 req.Header = reqHeaders
6011 googleapi.Expand(req.URL, map[string]string{
6012 "name": c.name,
6013 })
6014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6015 }
6016
6017
6018
6019
6020
6021
6022 func (c *ProjectsInstancesClustersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6023 gensupport.SetOptions(c.urlParams_, opts...)
6024 res, err := c.doRequest("json")
6025 if res != nil && res.StatusCode == http.StatusNotModified {
6026 if res.Body != nil {
6027 res.Body.Close()
6028 }
6029 return nil, gensupport.WrapError(&googleapi.Error{
6030 Code: res.StatusCode,
6031 Header: res.Header,
6032 })
6033 }
6034 if err != nil {
6035 return nil, err
6036 }
6037 defer googleapi.CloseBody(res)
6038 if err := googleapi.CheckResponse(res); err != nil {
6039 return nil, gensupport.WrapError(err)
6040 }
6041 ret := &Operation{
6042 ServerResponse: googleapi.ServerResponse{
6043 Header: res.Header,
6044 HTTPStatusCode: res.StatusCode,
6045 },
6046 }
6047 target := &ret
6048 if err := gensupport.DecodeResponse(target, res); err != nil {
6049 return nil, err
6050 }
6051 return ret, nil
6052 }
6053
6054 type ProjectsInstancesClustersBackupsCopyCall struct {
6055 s *Service
6056 parent string
6057 copybackuprequest *CopyBackupRequest
6058 urlParams_ gensupport.URLParams
6059 ctx_ context.Context
6060 header_ http.Header
6061 }
6062
6063
6064
6065
6066
6067
6068
6069 func (r *ProjectsInstancesClustersBackupsService) Copy(parent string, copybackuprequest *CopyBackupRequest) *ProjectsInstancesClustersBackupsCopyCall {
6070 c := &ProjectsInstancesClustersBackupsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6071 c.parent = parent
6072 c.copybackuprequest = copybackuprequest
6073 return c
6074 }
6075
6076
6077
6078
6079 func (c *ProjectsInstancesClustersBackupsCopyCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsCopyCall {
6080 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6081 return c
6082 }
6083
6084
6085 func (c *ProjectsInstancesClustersBackupsCopyCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsCopyCall {
6086 c.ctx_ = ctx
6087 return c
6088 }
6089
6090
6091
6092 func (c *ProjectsInstancesClustersBackupsCopyCall) Header() http.Header {
6093 if c.header_ == nil {
6094 c.header_ = make(http.Header)
6095 }
6096 return c.header_
6097 }
6098
6099 func (c *ProjectsInstancesClustersBackupsCopyCall) doRequest(alt string) (*http.Response, error) {
6100 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6101 var body io.Reader = nil
6102 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copybackuprequest)
6103 if err != nil {
6104 return nil, err
6105 }
6106 c.urlParams_.Set("alt", alt)
6107 c.urlParams_.Set("prettyPrint", "false")
6108 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups:copy")
6109 urls += "?" + c.urlParams_.Encode()
6110 req, err := http.NewRequest("POST", urls, body)
6111 if err != nil {
6112 return nil, err
6113 }
6114 req.Header = reqHeaders
6115 googleapi.Expand(req.URL, map[string]string{
6116 "parent": c.parent,
6117 })
6118 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6119 }
6120
6121
6122
6123
6124
6125
6126 func (c *ProjectsInstancesClustersBackupsCopyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6127 gensupport.SetOptions(c.urlParams_, opts...)
6128 res, err := c.doRequest("json")
6129 if res != nil && res.StatusCode == http.StatusNotModified {
6130 if res.Body != nil {
6131 res.Body.Close()
6132 }
6133 return nil, gensupport.WrapError(&googleapi.Error{
6134 Code: res.StatusCode,
6135 Header: res.Header,
6136 })
6137 }
6138 if err != nil {
6139 return nil, err
6140 }
6141 defer googleapi.CloseBody(res)
6142 if err := googleapi.CheckResponse(res); err != nil {
6143 return nil, gensupport.WrapError(err)
6144 }
6145 ret := &Operation{
6146 ServerResponse: googleapi.ServerResponse{
6147 Header: res.Header,
6148 HTTPStatusCode: res.StatusCode,
6149 },
6150 }
6151 target := &ret
6152 if err := gensupport.DecodeResponse(target, res); err != nil {
6153 return nil, err
6154 }
6155 return ret, nil
6156 }
6157
6158 type ProjectsInstancesClustersBackupsCreateCall struct {
6159 s *Service
6160 parent string
6161 backup *Backup
6162 urlParams_ gensupport.URLParams
6163 ctx_ context.Context
6164 header_ http.Header
6165 }
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176 func (r *ProjectsInstancesClustersBackupsService) Create(parent string, backup *Backup) *ProjectsInstancesClustersBackupsCreateCall {
6177 c := &ProjectsInstancesClustersBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6178 c.parent = parent
6179 c.backup = backup
6180 return c
6181 }
6182
6183
6184
6185
6186
6187
6188
6189
6190 func (c *ProjectsInstancesClustersBackupsCreateCall) BackupId(backupId string) *ProjectsInstancesClustersBackupsCreateCall {
6191 c.urlParams_.Set("backupId", backupId)
6192 return c
6193 }
6194
6195
6196
6197
6198 func (c *ProjectsInstancesClustersBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsCreateCall {
6199 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6200 return c
6201 }
6202
6203
6204 func (c *ProjectsInstancesClustersBackupsCreateCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsCreateCall {
6205 c.ctx_ = ctx
6206 return c
6207 }
6208
6209
6210
6211 func (c *ProjectsInstancesClustersBackupsCreateCall) Header() http.Header {
6212 if c.header_ == nil {
6213 c.header_ = make(http.Header)
6214 }
6215 return c.header_
6216 }
6217
6218 func (c *ProjectsInstancesClustersBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
6219 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6220 var body io.Reader = nil
6221 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
6222 if err != nil {
6223 return nil, err
6224 }
6225 c.urlParams_.Set("alt", alt)
6226 c.urlParams_.Set("prettyPrint", "false")
6227 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups")
6228 urls += "?" + c.urlParams_.Encode()
6229 req, err := http.NewRequest("POST", urls, body)
6230 if err != nil {
6231 return nil, err
6232 }
6233 req.Header = reqHeaders
6234 googleapi.Expand(req.URL, map[string]string{
6235 "parent": c.parent,
6236 })
6237 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6238 }
6239
6240
6241
6242
6243
6244
6245 func (c *ProjectsInstancesClustersBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6246 gensupport.SetOptions(c.urlParams_, opts...)
6247 res, err := c.doRequest("json")
6248 if res != nil && res.StatusCode == http.StatusNotModified {
6249 if res.Body != nil {
6250 res.Body.Close()
6251 }
6252 return nil, gensupport.WrapError(&googleapi.Error{
6253 Code: res.StatusCode,
6254 Header: res.Header,
6255 })
6256 }
6257 if err != nil {
6258 return nil, err
6259 }
6260 defer googleapi.CloseBody(res)
6261 if err := googleapi.CheckResponse(res); err != nil {
6262 return nil, gensupport.WrapError(err)
6263 }
6264 ret := &Operation{
6265 ServerResponse: googleapi.ServerResponse{
6266 Header: res.Header,
6267 HTTPStatusCode: res.StatusCode,
6268 },
6269 }
6270 target := &ret
6271 if err := gensupport.DecodeResponse(target, res); err != nil {
6272 return nil, err
6273 }
6274 return ret, nil
6275 }
6276
6277 type ProjectsInstancesClustersBackupsDeleteCall struct {
6278 s *Service
6279 name string
6280 urlParams_ gensupport.URLParams
6281 ctx_ context.Context
6282 header_ http.Header
6283 }
6284
6285
6286
6287
6288
6289
6290 func (r *ProjectsInstancesClustersBackupsService) Delete(name string) *ProjectsInstancesClustersBackupsDeleteCall {
6291 c := &ProjectsInstancesClustersBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6292 c.name = name
6293 return c
6294 }
6295
6296
6297
6298
6299 func (c *ProjectsInstancesClustersBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsDeleteCall {
6300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6301 return c
6302 }
6303
6304
6305 func (c *ProjectsInstancesClustersBackupsDeleteCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsDeleteCall {
6306 c.ctx_ = ctx
6307 return c
6308 }
6309
6310
6311
6312 func (c *ProjectsInstancesClustersBackupsDeleteCall) Header() http.Header {
6313 if c.header_ == nil {
6314 c.header_ = make(http.Header)
6315 }
6316 return c.header_
6317 }
6318
6319 func (c *ProjectsInstancesClustersBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
6320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6321 var body io.Reader = nil
6322 c.urlParams_.Set("alt", alt)
6323 c.urlParams_.Set("prettyPrint", "false")
6324 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6325 urls += "?" + c.urlParams_.Encode()
6326 req, err := http.NewRequest("DELETE", urls, body)
6327 if err != nil {
6328 return nil, err
6329 }
6330 req.Header = reqHeaders
6331 googleapi.Expand(req.URL, map[string]string{
6332 "name": c.name,
6333 })
6334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6335 }
6336
6337
6338
6339
6340
6341
6342 func (c *ProjectsInstancesClustersBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6343 gensupport.SetOptions(c.urlParams_, opts...)
6344 res, err := c.doRequest("json")
6345 if res != nil && res.StatusCode == http.StatusNotModified {
6346 if res.Body != nil {
6347 res.Body.Close()
6348 }
6349 return nil, gensupport.WrapError(&googleapi.Error{
6350 Code: res.StatusCode,
6351 Header: res.Header,
6352 })
6353 }
6354 if err != nil {
6355 return nil, err
6356 }
6357 defer googleapi.CloseBody(res)
6358 if err := googleapi.CheckResponse(res); err != nil {
6359 return nil, gensupport.WrapError(err)
6360 }
6361 ret := &Empty{
6362 ServerResponse: googleapi.ServerResponse{
6363 Header: res.Header,
6364 HTTPStatusCode: res.StatusCode,
6365 },
6366 }
6367 target := &ret
6368 if err := gensupport.DecodeResponse(target, res); err != nil {
6369 return nil, err
6370 }
6371 return ret, nil
6372 }
6373
6374 type ProjectsInstancesClustersBackupsGetCall struct {
6375 s *Service
6376 name string
6377 urlParams_ gensupport.URLParams
6378 ifNoneMatch_ string
6379 ctx_ context.Context
6380 header_ http.Header
6381 }
6382
6383
6384
6385
6386
6387
6388 func (r *ProjectsInstancesClustersBackupsService) Get(name string) *ProjectsInstancesClustersBackupsGetCall {
6389 c := &ProjectsInstancesClustersBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6390 c.name = name
6391 return c
6392 }
6393
6394
6395
6396
6397 func (c *ProjectsInstancesClustersBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsGetCall {
6398 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6399 return c
6400 }
6401
6402
6403
6404
6405 func (c *ProjectsInstancesClustersBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersBackupsGetCall {
6406 c.ifNoneMatch_ = entityTag
6407 return c
6408 }
6409
6410
6411 func (c *ProjectsInstancesClustersBackupsGetCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsGetCall {
6412 c.ctx_ = ctx
6413 return c
6414 }
6415
6416
6417
6418 func (c *ProjectsInstancesClustersBackupsGetCall) Header() http.Header {
6419 if c.header_ == nil {
6420 c.header_ = make(http.Header)
6421 }
6422 return c.header_
6423 }
6424
6425 func (c *ProjectsInstancesClustersBackupsGetCall) doRequest(alt string) (*http.Response, error) {
6426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6427 if c.ifNoneMatch_ != "" {
6428 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6429 }
6430 var body io.Reader = nil
6431 c.urlParams_.Set("alt", alt)
6432 c.urlParams_.Set("prettyPrint", "false")
6433 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6434 urls += "?" + c.urlParams_.Encode()
6435 req, err := http.NewRequest("GET", urls, body)
6436 if err != nil {
6437 return nil, err
6438 }
6439 req.Header = reqHeaders
6440 googleapi.Expand(req.URL, map[string]string{
6441 "name": c.name,
6442 })
6443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6444 }
6445
6446
6447
6448
6449
6450
6451 func (c *ProjectsInstancesClustersBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
6452 gensupport.SetOptions(c.urlParams_, opts...)
6453 res, err := c.doRequest("json")
6454 if res != nil && res.StatusCode == http.StatusNotModified {
6455 if res.Body != nil {
6456 res.Body.Close()
6457 }
6458 return nil, gensupport.WrapError(&googleapi.Error{
6459 Code: res.StatusCode,
6460 Header: res.Header,
6461 })
6462 }
6463 if err != nil {
6464 return nil, err
6465 }
6466 defer googleapi.CloseBody(res)
6467 if err := googleapi.CheckResponse(res); err != nil {
6468 return nil, gensupport.WrapError(err)
6469 }
6470 ret := &Backup{
6471 ServerResponse: googleapi.ServerResponse{
6472 Header: res.Header,
6473 HTTPStatusCode: res.StatusCode,
6474 },
6475 }
6476 target := &ret
6477 if err := gensupport.DecodeResponse(target, res); err != nil {
6478 return nil, err
6479 }
6480 return ret, nil
6481 }
6482
6483 type ProjectsInstancesClustersBackupsGetIamPolicyCall struct {
6484 s *Service
6485 resource string
6486 getiampolicyrequest *GetIamPolicyRequest
6487 urlParams_ gensupport.URLParams
6488 ctx_ context.Context
6489 header_ http.Header
6490 }
6491
6492
6493
6494
6495
6496
6497
6498
6499 func (r *ProjectsInstancesClustersBackupsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesClustersBackupsGetIamPolicyCall {
6500 c := &ProjectsInstancesClustersBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6501 c.resource = resource
6502 c.getiampolicyrequest = getiampolicyrequest
6503 return c
6504 }
6505
6506
6507
6508
6509 func (c *ProjectsInstancesClustersBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsGetIamPolicyCall {
6510 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6511 return c
6512 }
6513
6514
6515 func (c *ProjectsInstancesClustersBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsGetIamPolicyCall {
6516 c.ctx_ = ctx
6517 return c
6518 }
6519
6520
6521
6522 func (c *ProjectsInstancesClustersBackupsGetIamPolicyCall) Header() http.Header {
6523 if c.header_ == nil {
6524 c.header_ = make(http.Header)
6525 }
6526 return c.header_
6527 }
6528
6529 func (c *ProjectsInstancesClustersBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6530 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6531 var body io.Reader = nil
6532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
6533 if err != nil {
6534 return nil, err
6535 }
6536 c.urlParams_.Set("alt", alt)
6537 c.urlParams_.Set("prettyPrint", "false")
6538 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
6539 urls += "?" + c.urlParams_.Encode()
6540 req, err := http.NewRequest("POST", urls, body)
6541 if err != nil {
6542 return nil, err
6543 }
6544 req.Header = reqHeaders
6545 googleapi.Expand(req.URL, map[string]string{
6546 "resource": c.resource,
6547 })
6548 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6549 }
6550
6551
6552
6553
6554
6555
6556 func (c *ProjectsInstancesClustersBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6557 gensupport.SetOptions(c.urlParams_, opts...)
6558 res, err := c.doRequest("json")
6559 if res != nil && res.StatusCode == http.StatusNotModified {
6560 if res.Body != nil {
6561 res.Body.Close()
6562 }
6563 return nil, gensupport.WrapError(&googleapi.Error{
6564 Code: res.StatusCode,
6565 Header: res.Header,
6566 })
6567 }
6568 if err != nil {
6569 return nil, err
6570 }
6571 defer googleapi.CloseBody(res)
6572 if err := googleapi.CheckResponse(res); err != nil {
6573 return nil, gensupport.WrapError(err)
6574 }
6575 ret := &Policy{
6576 ServerResponse: googleapi.ServerResponse{
6577 Header: res.Header,
6578 HTTPStatusCode: res.StatusCode,
6579 },
6580 }
6581 target := &ret
6582 if err := gensupport.DecodeResponse(target, res); err != nil {
6583 return nil, err
6584 }
6585 return ret, nil
6586 }
6587
6588 type ProjectsInstancesClustersBackupsListCall struct {
6589 s *Service
6590 parent string
6591 urlParams_ gensupport.URLParams
6592 ifNoneMatch_ string
6593 ctx_ context.Context
6594 header_ http.Header
6595 }
6596
6597
6598
6599
6600
6601
6602
6603
6604 func (r *ProjectsInstancesClustersBackupsService) List(parent string) *ProjectsInstancesClustersBackupsListCall {
6605 c := &ProjectsInstancesClustersBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6606 c.parent = parent
6607 return c
6608 }
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632 func (c *ProjectsInstancesClustersBackupsListCall) Filter(filter string) *ProjectsInstancesClustersBackupsListCall {
6633 c.urlParams_.Set("filter", filter)
6634 return c
6635 }
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647 func (c *ProjectsInstancesClustersBackupsListCall) OrderBy(orderBy string) *ProjectsInstancesClustersBackupsListCall {
6648 c.urlParams_.Set("orderBy", orderBy)
6649 return c
6650 }
6651
6652
6653
6654
6655 func (c *ProjectsInstancesClustersBackupsListCall) PageSize(pageSize int64) *ProjectsInstancesClustersBackupsListCall {
6656 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6657 return c
6658 }
6659
6660
6661
6662
6663 func (c *ProjectsInstancesClustersBackupsListCall) PageToken(pageToken string) *ProjectsInstancesClustersBackupsListCall {
6664 c.urlParams_.Set("pageToken", pageToken)
6665 return c
6666 }
6667
6668
6669
6670
6671 func (c *ProjectsInstancesClustersBackupsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsListCall {
6672 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6673 return c
6674 }
6675
6676
6677
6678
6679 func (c *ProjectsInstancesClustersBackupsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersBackupsListCall {
6680 c.ifNoneMatch_ = entityTag
6681 return c
6682 }
6683
6684
6685 func (c *ProjectsInstancesClustersBackupsListCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsListCall {
6686 c.ctx_ = ctx
6687 return c
6688 }
6689
6690
6691
6692 func (c *ProjectsInstancesClustersBackupsListCall) Header() http.Header {
6693 if c.header_ == nil {
6694 c.header_ = make(http.Header)
6695 }
6696 return c.header_
6697 }
6698
6699 func (c *ProjectsInstancesClustersBackupsListCall) doRequest(alt string) (*http.Response, error) {
6700 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6701 if c.ifNoneMatch_ != "" {
6702 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6703 }
6704 var body io.Reader = nil
6705 c.urlParams_.Set("alt", alt)
6706 c.urlParams_.Set("prettyPrint", "false")
6707 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups")
6708 urls += "?" + c.urlParams_.Encode()
6709 req, err := http.NewRequest("GET", urls, body)
6710 if err != nil {
6711 return nil, err
6712 }
6713 req.Header = reqHeaders
6714 googleapi.Expand(req.URL, map[string]string{
6715 "parent": c.parent,
6716 })
6717 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6718 }
6719
6720
6721
6722
6723
6724
6725
6726 func (c *ProjectsInstancesClustersBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
6727 gensupport.SetOptions(c.urlParams_, opts...)
6728 res, err := c.doRequest("json")
6729 if res != nil && res.StatusCode == http.StatusNotModified {
6730 if res.Body != nil {
6731 res.Body.Close()
6732 }
6733 return nil, gensupport.WrapError(&googleapi.Error{
6734 Code: res.StatusCode,
6735 Header: res.Header,
6736 })
6737 }
6738 if err != nil {
6739 return nil, err
6740 }
6741 defer googleapi.CloseBody(res)
6742 if err := googleapi.CheckResponse(res); err != nil {
6743 return nil, gensupport.WrapError(err)
6744 }
6745 ret := &ListBackupsResponse{
6746 ServerResponse: googleapi.ServerResponse{
6747 Header: res.Header,
6748 HTTPStatusCode: res.StatusCode,
6749 },
6750 }
6751 target := &ret
6752 if err := gensupport.DecodeResponse(target, res); err != nil {
6753 return nil, err
6754 }
6755 return ret, nil
6756 }
6757
6758
6759
6760
6761 func (c *ProjectsInstancesClustersBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
6762 c.ctx_ = ctx
6763 defer c.PageToken(c.urlParams_.Get("pageToken"))
6764 for {
6765 x, err := c.Do()
6766 if err != nil {
6767 return err
6768 }
6769 if err := f(x); err != nil {
6770 return err
6771 }
6772 if x.NextPageToken == "" {
6773 return nil
6774 }
6775 c.PageToken(x.NextPageToken)
6776 }
6777 }
6778
6779 type ProjectsInstancesClustersBackupsPatchCall struct {
6780 s *Service
6781 nameid string
6782 backup *Backup
6783 urlParams_ gensupport.URLParams
6784 ctx_ context.Context
6785 header_ http.Header
6786 }
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797 func (r *ProjectsInstancesClustersBackupsService) Patch(nameid string, backup *Backup) *ProjectsInstancesClustersBackupsPatchCall {
6798 c := &ProjectsInstancesClustersBackupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6799 c.nameid = nameid
6800 c.backup = backup
6801 return c
6802 }
6803
6804
6805
6806
6807
6808
6809
6810 func (c *ProjectsInstancesClustersBackupsPatchCall) UpdateMask(updateMask string) *ProjectsInstancesClustersBackupsPatchCall {
6811 c.urlParams_.Set("updateMask", updateMask)
6812 return c
6813 }
6814
6815
6816
6817
6818 func (c *ProjectsInstancesClustersBackupsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsPatchCall {
6819 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6820 return c
6821 }
6822
6823
6824 func (c *ProjectsInstancesClustersBackupsPatchCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsPatchCall {
6825 c.ctx_ = ctx
6826 return c
6827 }
6828
6829
6830
6831 func (c *ProjectsInstancesClustersBackupsPatchCall) Header() http.Header {
6832 if c.header_ == nil {
6833 c.header_ = make(http.Header)
6834 }
6835 return c.header_
6836 }
6837
6838 func (c *ProjectsInstancesClustersBackupsPatchCall) doRequest(alt string) (*http.Response, error) {
6839 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6840 var body io.Reader = nil
6841 body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
6842 if err != nil {
6843 return nil, err
6844 }
6845 c.urlParams_.Set("alt", alt)
6846 c.urlParams_.Set("prettyPrint", "false")
6847 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
6848 urls += "?" + c.urlParams_.Encode()
6849 req, err := http.NewRequest("PATCH", urls, body)
6850 if err != nil {
6851 return nil, err
6852 }
6853 req.Header = reqHeaders
6854 googleapi.Expand(req.URL, map[string]string{
6855 "name": c.nameid,
6856 })
6857 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6858 }
6859
6860
6861
6862
6863
6864
6865 func (c *ProjectsInstancesClustersBackupsPatchCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
6866 gensupport.SetOptions(c.urlParams_, opts...)
6867 res, err := c.doRequest("json")
6868 if res != nil && res.StatusCode == http.StatusNotModified {
6869 if res.Body != nil {
6870 res.Body.Close()
6871 }
6872 return nil, gensupport.WrapError(&googleapi.Error{
6873 Code: res.StatusCode,
6874 Header: res.Header,
6875 })
6876 }
6877 if err != nil {
6878 return nil, err
6879 }
6880 defer googleapi.CloseBody(res)
6881 if err := googleapi.CheckResponse(res); err != nil {
6882 return nil, gensupport.WrapError(err)
6883 }
6884 ret := &Backup{
6885 ServerResponse: googleapi.ServerResponse{
6886 Header: res.Header,
6887 HTTPStatusCode: res.StatusCode,
6888 },
6889 }
6890 target := &ret
6891 if err := gensupport.DecodeResponse(target, res); err != nil {
6892 return nil, err
6893 }
6894 return ret, nil
6895 }
6896
6897 type ProjectsInstancesClustersBackupsSetIamPolicyCall struct {
6898 s *Service
6899 resource string
6900 setiampolicyrequest *SetIamPolicyRequest
6901 urlParams_ gensupport.URLParams
6902 ctx_ context.Context
6903 header_ http.Header
6904 }
6905
6906
6907
6908
6909
6910
6911
6912 func (r *ProjectsInstancesClustersBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesClustersBackupsSetIamPolicyCall {
6913 c := &ProjectsInstancesClustersBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6914 c.resource = resource
6915 c.setiampolicyrequest = setiampolicyrequest
6916 return c
6917 }
6918
6919
6920
6921
6922 func (c *ProjectsInstancesClustersBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsSetIamPolicyCall {
6923 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6924 return c
6925 }
6926
6927
6928 func (c *ProjectsInstancesClustersBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsSetIamPolicyCall {
6929 c.ctx_ = ctx
6930 return c
6931 }
6932
6933
6934
6935 func (c *ProjectsInstancesClustersBackupsSetIamPolicyCall) Header() http.Header {
6936 if c.header_ == nil {
6937 c.header_ = make(http.Header)
6938 }
6939 return c.header_
6940 }
6941
6942 func (c *ProjectsInstancesClustersBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6943 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6944 var body io.Reader = nil
6945 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6946 if err != nil {
6947 return nil, err
6948 }
6949 c.urlParams_.Set("alt", alt)
6950 c.urlParams_.Set("prettyPrint", "false")
6951 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
6952 urls += "?" + c.urlParams_.Encode()
6953 req, err := http.NewRequest("POST", urls, body)
6954 if err != nil {
6955 return nil, err
6956 }
6957 req.Header = reqHeaders
6958 googleapi.Expand(req.URL, map[string]string{
6959 "resource": c.resource,
6960 })
6961 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6962 }
6963
6964
6965
6966
6967
6968
6969 func (c *ProjectsInstancesClustersBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6970 gensupport.SetOptions(c.urlParams_, opts...)
6971 res, err := c.doRequest("json")
6972 if res != nil && res.StatusCode == http.StatusNotModified {
6973 if res.Body != nil {
6974 res.Body.Close()
6975 }
6976 return nil, gensupport.WrapError(&googleapi.Error{
6977 Code: res.StatusCode,
6978 Header: res.Header,
6979 })
6980 }
6981 if err != nil {
6982 return nil, err
6983 }
6984 defer googleapi.CloseBody(res)
6985 if err := googleapi.CheckResponse(res); err != nil {
6986 return nil, gensupport.WrapError(err)
6987 }
6988 ret := &Policy{
6989 ServerResponse: googleapi.ServerResponse{
6990 Header: res.Header,
6991 HTTPStatusCode: res.StatusCode,
6992 },
6993 }
6994 target := &ret
6995 if err := gensupport.DecodeResponse(target, res); err != nil {
6996 return nil, err
6997 }
6998 return ret, nil
6999 }
7000
7001 type ProjectsInstancesClustersBackupsTestIamPermissionsCall struct {
7002 s *Service
7003 resource string
7004 testiampermissionsrequest *TestIamPermissionsRequest
7005 urlParams_ gensupport.URLParams
7006 ctx_ context.Context
7007 header_ http.Header
7008 }
7009
7010
7011
7012
7013
7014
7015
7016
7017 func (r *ProjectsInstancesClustersBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesClustersBackupsTestIamPermissionsCall {
7018 c := &ProjectsInstancesClustersBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7019 c.resource = resource
7020 c.testiampermissionsrequest = testiampermissionsrequest
7021 return c
7022 }
7023
7024
7025
7026
7027 func (c *ProjectsInstancesClustersBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsTestIamPermissionsCall {
7028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7029 return c
7030 }
7031
7032
7033 func (c *ProjectsInstancesClustersBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsTestIamPermissionsCall {
7034 c.ctx_ = ctx
7035 return c
7036 }
7037
7038
7039
7040 func (c *ProjectsInstancesClustersBackupsTestIamPermissionsCall) Header() http.Header {
7041 if c.header_ == nil {
7042 c.header_ = make(http.Header)
7043 }
7044 return c.header_
7045 }
7046
7047 func (c *ProjectsInstancesClustersBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7048 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7049 var body io.Reader = nil
7050 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7051 if err != nil {
7052 return nil, err
7053 }
7054 c.urlParams_.Set("alt", alt)
7055 c.urlParams_.Set("prettyPrint", "false")
7056 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
7057 urls += "?" + c.urlParams_.Encode()
7058 req, err := http.NewRequest("POST", urls, body)
7059 if err != nil {
7060 return nil, err
7061 }
7062 req.Header = reqHeaders
7063 googleapi.Expand(req.URL, map[string]string{
7064 "resource": c.resource,
7065 })
7066 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7067 }
7068
7069
7070
7071
7072
7073
7074
7075 func (c *ProjectsInstancesClustersBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7076 gensupport.SetOptions(c.urlParams_, opts...)
7077 res, err := c.doRequest("json")
7078 if res != nil && res.StatusCode == http.StatusNotModified {
7079 if res.Body != nil {
7080 res.Body.Close()
7081 }
7082 return nil, gensupport.WrapError(&googleapi.Error{
7083 Code: res.StatusCode,
7084 Header: res.Header,
7085 })
7086 }
7087 if err != nil {
7088 return nil, err
7089 }
7090 defer googleapi.CloseBody(res)
7091 if err := googleapi.CheckResponse(res); err != nil {
7092 return nil, gensupport.WrapError(err)
7093 }
7094 ret := &TestIamPermissionsResponse{
7095 ServerResponse: googleapi.ServerResponse{
7096 Header: res.Header,
7097 HTTPStatusCode: res.StatusCode,
7098 },
7099 }
7100 target := &ret
7101 if err := gensupport.DecodeResponse(target, res); err != nil {
7102 return nil, err
7103 }
7104 return ret, nil
7105 }
7106
7107 type ProjectsInstancesClustersHotTabletsListCall struct {
7108 s *Service
7109 parent string
7110 urlParams_ gensupport.URLParams
7111 ifNoneMatch_ string
7112 ctx_ context.Context
7113 header_ http.Header
7114 }
7115
7116
7117
7118
7119
7120
7121 func (r *ProjectsInstancesClustersHotTabletsService) List(parent string) *ProjectsInstancesClustersHotTabletsListCall {
7122 c := &ProjectsInstancesClustersHotTabletsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7123 c.parent = parent
7124 return c
7125 }
7126
7127
7128
7129 func (c *ProjectsInstancesClustersHotTabletsListCall) EndTime(endTime string) *ProjectsInstancesClustersHotTabletsListCall {
7130 c.urlParams_.Set("endTime", endTime)
7131 return c
7132 }
7133
7134
7135
7136
7137
7138
7139
7140
7141 func (c *ProjectsInstancesClustersHotTabletsListCall) PageSize(pageSize int64) *ProjectsInstancesClustersHotTabletsListCall {
7142 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7143 return c
7144 }
7145
7146
7147
7148 func (c *ProjectsInstancesClustersHotTabletsListCall) PageToken(pageToken string) *ProjectsInstancesClustersHotTabletsListCall {
7149 c.urlParams_.Set("pageToken", pageToken)
7150 return c
7151 }
7152
7153
7154
7155
7156
7157
7158
7159
7160 func (c *ProjectsInstancesClustersHotTabletsListCall) StartTime(startTime string) *ProjectsInstancesClustersHotTabletsListCall {
7161 c.urlParams_.Set("startTime", startTime)
7162 return c
7163 }
7164
7165
7166
7167
7168 func (c *ProjectsInstancesClustersHotTabletsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersHotTabletsListCall {
7169 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7170 return c
7171 }
7172
7173
7174
7175
7176 func (c *ProjectsInstancesClustersHotTabletsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesClustersHotTabletsListCall {
7177 c.ifNoneMatch_ = entityTag
7178 return c
7179 }
7180
7181
7182 func (c *ProjectsInstancesClustersHotTabletsListCall) Context(ctx context.Context) *ProjectsInstancesClustersHotTabletsListCall {
7183 c.ctx_ = ctx
7184 return c
7185 }
7186
7187
7188
7189 func (c *ProjectsInstancesClustersHotTabletsListCall) Header() http.Header {
7190 if c.header_ == nil {
7191 c.header_ = make(http.Header)
7192 }
7193 return c.header_
7194 }
7195
7196 func (c *ProjectsInstancesClustersHotTabletsListCall) doRequest(alt string) (*http.Response, error) {
7197 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7198 if c.ifNoneMatch_ != "" {
7199 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7200 }
7201 var body io.Reader = nil
7202 c.urlParams_.Set("alt", alt)
7203 c.urlParams_.Set("prettyPrint", "false")
7204 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/hotTablets")
7205 urls += "?" + c.urlParams_.Encode()
7206 req, err := http.NewRequest("GET", urls, body)
7207 if err != nil {
7208 return nil, err
7209 }
7210 req.Header = reqHeaders
7211 googleapi.Expand(req.URL, map[string]string{
7212 "parent": c.parent,
7213 })
7214 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7215 }
7216
7217
7218
7219
7220
7221
7222
7223 func (c *ProjectsInstancesClustersHotTabletsListCall) Do(opts ...googleapi.CallOption) (*ListHotTabletsResponse, error) {
7224 gensupport.SetOptions(c.urlParams_, opts...)
7225 res, err := c.doRequest("json")
7226 if res != nil && res.StatusCode == http.StatusNotModified {
7227 if res.Body != nil {
7228 res.Body.Close()
7229 }
7230 return nil, gensupport.WrapError(&googleapi.Error{
7231 Code: res.StatusCode,
7232 Header: res.Header,
7233 })
7234 }
7235 if err != nil {
7236 return nil, err
7237 }
7238 defer googleapi.CloseBody(res)
7239 if err := googleapi.CheckResponse(res); err != nil {
7240 return nil, gensupport.WrapError(err)
7241 }
7242 ret := &ListHotTabletsResponse{
7243 ServerResponse: googleapi.ServerResponse{
7244 Header: res.Header,
7245 HTTPStatusCode: res.StatusCode,
7246 },
7247 }
7248 target := &ret
7249 if err := gensupport.DecodeResponse(target, res); err != nil {
7250 return nil, err
7251 }
7252 return ret, nil
7253 }
7254
7255
7256
7257
7258 func (c *ProjectsInstancesClustersHotTabletsListCall) Pages(ctx context.Context, f func(*ListHotTabletsResponse) error) error {
7259 c.ctx_ = ctx
7260 defer c.PageToken(c.urlParams_.Get("pageToken"))
7261 for {
7262 x, err := c.Do()
7263 if err != nil {
7264 return err
7265 }
7266 if err := f(x); err != nil {
7267 return err
7268 }
7269 if x.NextPageToken == "" {
7270 return nil
7271 }
7272 c.PageToken(x.NextPageToken)
7273 }
7274 }
7275
7276 type ProjectsInstancesTablesCheckConsistencyCall struct {
7277 s *Service
7278 name string
7279 checkconsistencyrequest *CheckConsistencyRequest
7280 urlParams_ gensupport.URLParams
7281 ctx_ context.Context
7282 header_ http.Header
7283 }
7284
7285
7286
7287
7288
7289
7290
7291
7292 func (r *ProjectsInstancesTablesService) CheckConsistency(name string, checkconsistencyrequest *CheckConsistencyRequest) *ProjectsInstancesTablesCheckConsistencyCall {
7293 c := &ProjectsInstancesTablesCheckConsistencyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7294 c.name = name
7295 c.checkconsistencyrequest = checkconsistencyrequest
7296 return c
7297 }
7298
7299
7300
7301
7302 func (c *ProjectsInstancesTablesCheckConsistencyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesCheckConsistencyCall {
7303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7304 return c
7305 }
7306
7307
7308 func (c *ProjectsInstancesTablesCheckConsistencyCall) Context(ctx context.Context) *ProjectsInstancesTablesCheckConsistencyCall {
7309 c.ctx_ = ctx
7310 return c
7311 }
7312
7313
7314
7315 func (c *ProjectsInstancesTablesCheckConsistencyCall) Header() http.Header {
7316 if c.header_ == nil {
7317 c.header_ = make(http.Header)
7318 }
7319 return c.header_
7320 }
7321
7322 func (c *ProjectsInstancesTablesCheckConsistencyCall) doRequest(alt string) (*http.Response, error) {
7323 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7324 var body io.Reader = nil
7325 body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkconsistencyrequest)
7326 if err != nil {
7327 return nil, err
7328 }
7329 c.urlParams_.Set("alt", alt)
7330 c.urlParams_.Set("prettyPrint", "false")
7331 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:checkConsistency")
7332 urls += "?" + c.urlParams_.Encode()
7333 req, err := http.NewRequest("POST", urls, body)
7334 if err != nil {
7335 return nil, err
7336 }
7337 req.Header = reqHeaders
7338 googleapi.Expand(req.URL, map[string]string{
7339 "name": c.name,
7340 })
7341 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7342 }
7343
7344
7345
7346
7347
7348
7349
7350 func (c *ProjectsInstancesTablesCheckConsistencyCall) Do(opts ...googleapi.CallOption) (*CheckConsistencyResponse, error) {
7351 gensupport.SetOptions(c.urlParams_, opts...)
7352 res, err := c.doRequest("json")
7353 if res != nil && res.StatusCode == http.StatusNotModified {
7354 if res.Body != nil {
7355 res.Body.Close()
7356 }
7357 return nil, gensupport.WrapError(&googleapi.Error{
7358 Code: res.StatusCode,
7359 Header: res.Header,
7360 })
7361 }
7362 if err != nil {
7363 return nil, err
7364 }
7365 defer googleapi.CloseBody(res)
7366 if err := googleapi.CheckResponse(res); err != nil {
7367 return nil, gensupport.WrapError(err)
7368 }
7369 ret := &CheckConsistencyResponse{
7370 ServerResponse: googleapi.ServerResponse{
7371 Header: res.Header,
7372 HTTPStatusCode: res.StatusCode,
7373 },
7374 }
7375 target := &ret
7376 if err := gensupport.DecodeResponse(target, res); err != nil {
7377 return nil, err
7378 }
7379 return ret, nil
7380 }
7381
7382 type ProjectsInstancesTablesCreateCall struct {
7383 s *Service
7384 parent string
7385 createtablerequest *CreateTableRequest
7386 urlParams_ gensupport.URLParams
7387 ctx_ context.Context
7388 header_ http.Header
7389 }
7390
7391
7392
7393
7394
7395
7396
7397 func (r *ProjectsInstancesTablesService) Create(parent string, createtablerequest *CreateTableRequest) *ProjectsInstancesTablesCreateCall {
7398 c := &ProjectsInstancesTablesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7399 c.parent = parent
7400 c.createtablerequest = createtablerequest
7401 return c
7402 }
7403
7404
7405
7406
7407 func (c *ProjectsInstancesTablesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesCreateCall {
7408 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7409 return c
7410 }
7411
7412
7413 func (c *ProjectsInstancesTablesCreateCall) Context(ctx context.Context) *ProjectsInstancesTablesCreateCall {
7414 c.ctx_ = ctx
7415 return c
7416 }
7417
7418
7419
7420 func (c *ProjectsInstancesTablesCreateCall) Header() http.Header {
7421 if c.header_ == nil {
7422 c.header_ = make(http.Header)
7423 }
7424 return c.header_
7425 }
7426
7427 func (c *ProjectsInstancesTablesCreateCall) doRequest(alt string) (*http.Response, error) {
7428 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7429 var body io.Reader = nil
7430 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtablerequest)
7431 if err != nil {
7432 return nil, err
7433 }
7434 c.urlParams_.Set("alt", alt)
7435 c.urlParams_.Set("prettyPrint", "false")
7436 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tables")
7437 urls += "?" + c.urlParams_.Encode()
7438 req, err := http.NewRequest("POST", urls, body)
7439 if err != nil {
7440 return nil, err
7441 }
7442 req.Header = reqHeaders
7443 googleapi.Expand(req.URL, map[string]string{
7444 "parent": c.parent,
7445 })
7446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7447 }
7448
7449
7450
7451
7452
7453
7454 func (c *ProjectsInstancesTablesCreateCall) Do(opts ...googleapi.CallOption) (*Table, error) {
7455 gensupport.SetOptions(c.urlParams_, opts...)
7456 res, err := c.doRequest("json")
7457 if res != nil && res.StatusCode == http.StatusNotModified {
7458 if res.Body != nil {
7459 res.Body.Close()
7460 }
7461 return nil, gensupport.WrapError(&googleapi.Error{
7462 Code: res.StatusCode,
7463 Header: res.Header,
7464 })
7465 }
7466 if err != nil {
7467 return nil, err
7468 }
7469 defer googleapi.CloseBody(res)
7470 if err := googleapi.CheckResponse(res); err != nil {
7471 return nil, gensupport.WrapError(err)
7472 }
7473 ret := &Table{
7474 ServerResponse: googleapi.ServerResponse{
7475 Header: res.Header,
7476 HTTPStatusCode: res.StatusCode,
7477 },
7478 }
7479 target := &ret
7480 if err := gensupport.DecodeResponse(target, res); err != nil {
7481 return nil, err
7482 }
7483 return ret, nil
7484 }
7485
7486 type ProjectsInstancesTablesDeleteCall struct {
7487 s *Service
7488 name string
7489 urlParams_ gensupport.URLParams
7490 ctx_ context.Context
7491 header_ http.Header
7492 }
7493
7494
7495
7496
7497
7498 func (r *ProjectsInstancesTablesService) Delete(name string) *ProjectsInstancesTablesDeleteCall {
7499 c := &ProjectsInstancesTablesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7500 c.name = name
7501 return c
7502 }
7503
7504
7505
7506
7507 func (c *ProjectsInstancesTablesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesDeleteCall {
7508 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7509 return c
7510 }
7511
7512
7513 func (c *ProjectsInstancesTablesDeleteCall) Context(ctx context.Context) *ProjectsInstancesTablesDeleteCall {
7514 c.ctx_ = ctx
7515 return c
7516 }
7517
7518
7519
7520 func (c *ProjectsInstancesTablesDeleteCall) Header() http.Header {
7521 if c.header_ == nil {
7522 c.header_ = make(http.Header)
7523 }
7524 return c.header_
7525 }
7526
7527 func (c *ProjectsInstancesTablesDeleteCall) doRequest(alt string) (*http.Response, error) {
7528 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7529 var body io.Reader = nil
7530 c.urlParams_.Set("alt", alt)
7531 c.urlParams_.Set("prettyPrint", "false")
7532 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7533 urls += "?" + c.urlParams_.Encode()
7534 req, err := http.NewRequest("DELETE", urls, body)
7535 if err != nil {
7536 return nil, err
7537 }
7538 req.Header = reqHeaders
7539 googleapi.Expand(req.URL, map[string]string{
7540 "name": c.name,
7541 })
7542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7543 }
7544
7545
7546
7547
7548
7549
7550 func (c *ProjectsInstancesTablesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7551 gensupport.SetOptions(c.urlParams_, opts...)
7552 res, err := c.doRequest("json")
7553 if res != nil && res.StatusCode == http.StatusNotModified {
7554 if res.Body != nil {
7555 res.Body.Close()
7556 }
7557 return nil, gensupport.WrapError(&googleapi.Error{
7558 Code: res.StatusCode,
7559 Header: res.Header,
7560 })
7561 }
7562 if err != nil {
7563 return nil, err
7564 }
7565 defer googleapi.CloseBody(res)
7566 if err := googleapi.CheckResponse(res); err != nil {
7567 return nil, gensupport.WrapError(err)
7568 }
7569 ret := &Empty{
7570 ServerResponse: googleapi.ServerResponse{
7571 Header: res.Header,
7572 HTTPStatusCode: res.StatusCode,
7573 },
7574 }
7575 target := &ret
7576 if err := gensupport.DecodeResponse(target, res); err != nil {
7577 return nil, err
7578 }
7579 return ret, nil
7580 }
7581
7582 type ProjectsInstancesTablesDropRowRangeCall struct {
7583 s *Service
7584 name string
7585 droprowrangerequest *DropRowRangeRequest
7586 urlParams_ gensupport.URLParams
7587 ctx_ context.Context
7588 header_ http.Header
7589 }
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601 func (r *ProjectsInstancesTablesService) DropRowRange(name string, droprowrangerequest *DropRowRangeRequest) *ProjectsInstancesTablesDropRowRangeCall {
7602 c := &ProjectsInstancesTablesDropRowRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7603 c.name = name
7604 c.droprowrangerequest = droprowrangerequest
7605 return c
7606 }
7607
7608
7609
7610
7611 func (c *ProjectsInstancesTablesDropRowRangeCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesDropRowRangeCall {
7612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7613 return c
7614 }
7615
7616
7617 func (c *ProjectsInstancesTablesDropRowRangeCall) Context(ctx context.Context) *ProjectsInstancesTablesDropRowRangeCall {
7618 c.ctx_ = ctx
7619 return c
7620 }
7621
7622
7623
7624 func (c *ProjectsInstancesTablesDropRowRangeCall) Header() http.Header {
7625 if c.header_ == nil {
7626 c.header_ = make(http.Header)
7627 }
7628 return c.header_
7629 }
7630
7631 func (c *ProjectsInstancesTablesDropRowRangeCall) doRequest(alt string) (*http.Response, error) {
7632 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7633 var body io.Reader = nil
7634 body, err := googleapi.WithoutDataWrapper.JSONReader(c.droprowrangerequest)
7635 if err != nil {
7636 return nil, err
7637 }
7638 c.urlParams_.Set("alt", alt)
7639 c.urlParams_.Set("prettyPrint", "false")
7640 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:dropRowRange")
7641 urls += "?" + c.urlParams_.Encode()
7642 req, err := http.NewRequest("POST", urls, body)
7643 if err != nil {
7644 return nil, err
7645 }
7646 req.Header = reqHeaders
7647 googleapi.Expand(req.URL, map[string]string{
7648 "name": c.name,
7649 })
7650 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7651 }
7652
7653
7654
7655
7656
7657
7658 func (c *ProjectsInstancesTablesDropRowRangeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7659 gensupport.SetOptions(c.urlParams_, opts...)
7660 res, err := c.doRequest("json")
7661 if res != nil && res.StatusCode == http.StatusNotModified {
7662 if res.Body != nil {
7663 res.Body.Close()
7664 }
7665 return nil, gensupport.WrapError(&googleapi.Error{
7666 Code: res.StatusCode,
7667 Header: res.Header,
7668 })
7669 }
7670 if err != nil {
7671 return nil, err
7672 }
7673 defer googleapi.CloseBody(res)
7674 if err := googleapi.CheckResponse(res); err != nil {
7675 return nil, gensupport.WrapError(err)
7676 }
7677 ret := &Empty{
7678 ServerResponse: googleapi.ServerResponse{
7679 Header: res.Header,
7680 HTTPStatusCode: res.StatusCode,
7681 },
7682 }
7683 target := &ret
7684 if err := gensupport.DecodeResponse(target, res); err != nil {
7685 return nil, err
7686 }
7687 return ret, nil
7688 }
7689
7690 type ProjectsInstancesTablesGenerateConsistencyTokenCall struct {
7691 s *Service
7692 name string
7693 generateconsistencytokenrequest *GenerateConsistencyTokenRequest
7694 urlParams_ gensupport.URLParams
7695 ctx_ context.Context
7696 header_ http.Header
7697 }
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707 func (r *ProjectsInstancesTablesService) GenerateConsistencyToken(name string, generateconsistencytokenrequest *GenerateConsistencyTokenRequest) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
7708 c := &ProjectsInstancesTablesGenerateConsistencyTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7709 c.name = name
7710 c.generateconsistencytokenrequest = generateconsistencytokenrequest
7711 return c
7712 }
7713
7714
7715
7716
7717 func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
7718 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7719 return c
7720 }
7721
7722
7723 func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Context(ctx context.Context) *ProjectsInstancesTablesGenerateConsistencyTokenCall {
7724 c.ctx_ = ctx
7725 return c
7726 }
7727
7728
7729
7730 func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Header() http.Header {
7731 if c.header_ == nil {
7732 c.header_ = make(http.Header)
7733 }
7734 return c.header_
7735 }
7736
7737 func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) doRequest(alt string) (*http.Response, error) {
7738 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7739 var body io.Reader = nil
7740 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateconsistencytokenrequest)
7741 if err != nil {
7742 return nil, err
7743 }
7744 c.urlParams_.Set("alt", alt)
7745 c.urlParams_.Set("prettyPrint", "false")
7746 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:generateConsistencyToken")
7747 urls += "?" + c.urlParams_.Encode()
7748 req, err := http.NewRequest("POST", urls, body)
7749 if err != nil {
7750 return nil, err
7751 }
7752 req.Header = reqHeaders
7753 googleapi.Expand(req.URL, map[string]string{
7754 "name": c.name,
7755 })
7756 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7757 }
7758
7759
7760
7761
7762
7763
7764
7765 func (c *ProjectsInstancesTablesGenerateConsistencyTokenCall) Do(opts ...googleapi.CallOption) (*GenerateConsistencyTokenResponse, error) {
7766 gensupport.SetOptions(c.urlParams_, opts...)
7767 res, err := c.doRequest("json")
7768 if res != nil && res.StatusCode == http.StatusNotModified {
7769 if res.Body != nil {
7770 res.Body.Close()
7771 }
7772 return nil, gensupport.WrapError(&googleapi.Error{
7773 Code: res.StatusCode,
7774 Header: res.Header,
7775 })
7776 }
7777 if err != nil {
7778 return nil, err
7779 }
7780 defer googleapi.CloseBody(res)
7781 if err := googleapi.CheckResponse(res); err != nil {
7782 return nil, gensupport.WrapError(err)
7783 }
7784 ret := &GenerateConsistencyTokenResponse{
7785 ServerResponse: googleapi.ServerResponse{
7786 Header: res.Header,
7787 HTTPStatusCode: res.StatusCode,
7788 },
7789 }
7790 target := &ret
7791 if err := gensupport.DecodeResponse(target, res); err != nil {
7792 return nil, err
7793 }
7794 return ret, nil
7795 }
7796
7797 type ProjectsInstancesTablesGetCall struct {
7798 s *Service
7799 name string
7800 urlParams_ gensupport.URLParams
7801 ifNoneMatch_ string
7802 ctx_ context.Context
7803 header_ http.Header
7804 }
7805
7806
7807
7808
7809
7810 func (r *ProjectsInstancesTablesService) Get(name string) *ProjectsInstancesTablesGetCall {
7811 c := &ProjectsInstancesTablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7812 c.name = name
7813 return c
7814 }
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845 func (c *ProjectsInstancesTablesGetCall) View(view string) *ProjectsInstancesTablesGetCall {
7846 c.urlParams_.Set("view", view)
7847 return c
7848 }
7849
7850
7851
7852
7853 func (c *ProjectsInstancesTablesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesGetCall {
7854 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7855 return c
7856 }
7857
7858
7859
7860
7861 func (c *ProjectsInstancesTablesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesGetCall {
7862 c.ifNoneMatch_ = entityTag
7863 return c
7864 }
7865
7866
7867 func (c *ProjectsInstancesTablesGetCall) Context(ctx context.Context) *ProjectsInstancesTablesGetCall {
7868 c.ctx_ = ctx
7869 return c
7870 }
7871
7872
7873
7874 func (c *ProjectsInstancesTablesGetCall) Header() http.Header {
7875 if c.header_ == nil {
7876 c.header_ = make(http.Header)
7877 }
7878 return c.header_
7879 }
7880
7881 func (c *ProjectsInstancesTablesGetCall) doRequest(alt string) (*http.Response, error) {
7882 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7883 if c.ifNoneMatch_ != "" {
7884 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7885 }
7886 var body io.Reader = nil
7887 c.urlParams_.Set("alt", alt)
7888 c.urlParams_.Set("prettyPrint", "false")
7889 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
7890 urls += "?" + c.urlParams_.Encode()
7891 req, err := http.NewRequest("GET", urls, body)
7892 if err != nil {
7893 return nil, err
7894 }
7895 req.Header = reqHeaders
7896 googleapi.Expand(req.URL, map[string]string{
7897 "name": c.name,
7898 })
7899 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7900 }
7901
7902
7903
7904
7905
7906
7907 func (c *ProjectsInstancesTablesGetCall) Do(opts ...googleapi.CallOption) (*Table, error) {
7908 gensupport.SetOptions(c.urlParams_, opts...)
7909 res, err := c.doRequest("json")
7910 if res != nil && res.StatusCode == http.StatusNotModified {
7911 if res.Body != nil {
7912 res.Body.Close()
7913 }
7914 return nil, gensupport.WrapError(&googleapi.Error{
7915 Code: res.StatusCode,
7916 Header: res.Header,
7917 })
7918 }
7919 if err != nil {
7920 return nil, err
7921 }
7922 defer googleapi.CloseBody(res)
7923 if err := googleapi.CheckResponse(res); err != nil {
7924 return nil, gensupport.WrapError(err)
7925 }
7926 ret := &Table{
7927 ServerResponse: googleapi.ServerResponse{
7928 Header: res.Header,
7929 HTTPStatusCode: res.StatusCode,
7930 },
7931 }
7932 target := &ret
7933 if err := gensupport.DecodeResponse(target, res); err != nil {
7934 return nil, err
7935 }
7936 return ret, nil
7937 }
7938
7939 type ProjectsInstancesTablesGetIamPolicyCall struct {
7940 s *Service
7941 resource string
7942 getiampolicyrequest *GetIamPolicyRequest
7943 urlParams_ gensupport.URLParams
7944 ctx_ context.Context
7945 header_ http.Header
7946 }
7947
7948
7949
7950
7951
7952
7953
7954
7955 func (r *ProjectsInstancesTablesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesTablesGetIamPolicyCall {
7956 c := &ProjectsInstancesTablesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7957 c.resource = resource
7958 c.getiampolicyrequest = getiampolicyrequest
7959 return c
7960 }
7961
7962
7963
7964
7965 func (c *ProjectsInstancesTablesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesGetIamPolicyCall {
7966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7967 return c
7968 }
7969
7970
7971 func (c *ProjectsInstancesTablesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesGetIamPolicyCall {
7972 c.ctx_ = ctx
7973 return c
7974 }
7975
7976
7977
7978 func (c *ProjectsInstancesTablesGetIamPolicyCall) Header() http.Header {
7979 if c.header_ == nil {
7980 c.header_ = make(http.Header)
7981 }
7982 return c.header_
7983 }
7984
7985 func (c *ProjectsInstancesTablesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7987 var body io.Reader = nil
7988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
7989 if err != nil {
7990 return nil, err
7991 }
7992 c.urlParams_.Set("alt", alt)
7993 c.urlParams_.Set("prettyPrint", "false")
7994 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
7995 urls += "?" + c.urlParams_.Encode()
7996 req, err := http.NewRequest("POST", urls, body)
7997 if err != nil {
7998 return nil, err
7999 }
8000 req.Header = reqHeaders
8001 googleapi.Expand(req.URL, map[string]string{
8002 "resource": c.resource,
8003 })
8004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8005 }
8006
8007
8008
8009
8010
8011
8012 func (c *ProjectsInstancesTablesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8013 gensupport.SetOptions(c.urlParams_, opts...)
8014 res, err := c.doRequest("json")
8015 if res != nil && res.StatusCode == http.StatusNotModified {
8016 if res.Body != nil {
8017 res.Body.Close()
8018 }
8019 return nil, gensupport.WrapError(&googleapi.Error{
8020 Code: res.StatusCode,
8021 Header: res.Header,
8022 })
8023 }
8024 if err != nil {
8025 return nil, err
8026 }
8027 defer googleapi.CloseBody(res)
8028 if err := googleapi.CheckResponse(res); err != nil {
8029 return nil, gensupport.WrapError(err)
8030 }
8031 ret := &Policy{
8032 ServerResponse: googleapi.ServerResponse{
8033 Header: res.Header,
8034 HTTPStatusCode: res.StatusCode,
8035 },
8036 }
8037 target := &ret
8038 if err := gensupport.DecodeResponse(target, res); err != nil {
8039 return nil, err
8040 }
8041 return ret, nil
8042 }
8043
8044 type ProjectsInstancesTablesListCall struct {
8045 s *Service
8046 parent string
8047 urlParams_ gensupport.URLParams
8048 ifNoneMatch_ string
8049 ctx_ context.Context
8050 header_ http.Header
8051 }
8052
8053
8054
8055
8056
8057 func (r *ProjectsInstancesTablesService) List(parent string) *ProjectsInstancesTablesListCall {
8058 c := &ProjectsInstancesTablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8059 c.parent = parent
8060 return c
8061 }
8062
8063
8064
8065
8066
8067
8068
8069
8070 func (c *ProjectsInstancesTablesListCall) PageSize(pageSize int64) *ProjectsInstancesTablesListCall {
8071 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8072 return c
8073 }
8074
8075
8076
8077 func (c *ProjectsInstancesTablesListCall) PageToken(pageToken string) *ProjectsInstancesTablesListCall {
8078 c.urlParams_.Set("pageToken", pageToken)
8079 return c
8080 }
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112 func (c *ProjectsInstancesTablesListCall) View(view string) *ProjectsInstancesTablesListCall {
8113 c.urlParams_.Set("view", view)
8114 return c
8115 }
8116
8117
8118
8119
8120 func (c *ProjectsInstancesTablesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesListCall {
8121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8122 return c
8123 }
8124
8125
8126
8127
8128 func (c *ProjectsInstancesTablesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesListCall {
8129 c.ifNoneMatch_ = entityTag
8130 return c
8131 }
8132
8133
8134 func (c *ProjectsInstancesTablesListCall) Context(ctx context.Context) *ProjectsInstancesTablesListCall {
8135 c.ctx_ = ctx
8136 return c
8137 }
8138
8139
8140
8141 func (c *ProjectsInstancesTablesListCall) Header() http.Header {
8142 if c.header_ == nil {
8143 c.header_ = make(http.Header)
8144 }
8145 return c.header_
8146 }
8147
8148 func (c *ProjectsInstancesTablesListCall) doRequest(alt string) (*http.Response, error) {
8149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8150 if c.ifNoneMatch_ != "" {
8151 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8152 }
8153 var body io.Reader = nil
8154 c.urlParams_.Set("alt", alt)
8155 c.urlParams_.Set("prettyPrint", "false")
8156 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tables")
8157 urls += "?" + c.urlParams_.Encode()
8158 req, err := http.NewRequest("GET", urls, body)
8159 if err != nil {
8160 return nil, err
8161 }
8162 req.Header = reqHeaders
8163 googleapi.Expand(req.URL, map[string]string{
8164 "parent": c.parent,
8165 })
8166 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8167 }
8168
8169
8170
8171
8172
8173
8174
8175 func (c *ProjectsInstancesTablesListCall) Do(opts ...googleapi.CallOption) (*ListTablesResponse, error) {
8176 gensupport.SetOptions(c.urlParams_, opts...)
8177 res, err := c.doRequest("json")
8178 if res != nil && res.StatusCode == http.StatusNotModified {
8179 if res.Body != nil {
8180 res.Body.Close()
8181 }
8182 return nil, gensupport.WrapError(&googleapi.Error{
8183 Code: res.StatusCode,
8184 Header: res.Header,
8185 })
8186 }
8187 if err != nil {
8188 return nil, err
8189 }
8190 defer googleapi.CloseBody(res)
8191 if err := googleapi.CheckResponse(res); err != nil {
8192 return nil, gensupport.WrapError(err)
8193 }
8194 ret := &ListTablesResponse{
8195 ServerResponse: googleapi.ServerResponse{
8196 Header: res.Header,
8197 HTTPStatusCode: res.StatusCode,
8198 },
8199 }
8200 target := &ret
8201 if err := gensupport.DecodeResponse(target, res); err != nil {
8202 return nil, err
8203 }
8204 return ret, nil
8205 }
8206
8207
8208
8209
8210 func (c *ProjectsInstancesTablesListCall) Pages(ctx context.Context, f func(*ListTablesResponse) error) error {
8211 c.ctx_ = ctx
8212 defer c.PageToken(c.urlParams_.Get("pageToken"))
8213 for {
8214 x, err := c.Do()
8215 if err != nil {
8216 return err
8217 }
8218 if err := f(x); err != nil {
8219 return err
8220 }
8221 if x.NextPageToken == "" {
8222 return nil
8223 }
8224 c.PageToken(x.NextPageToken)
8225 }
8226 }
8227
8228 type ProjectsInstancesTablesModifyColumnFamiliesCall struct {
8229 s *Service
8230 name string
8231 modifycolumnfamiliesrequest *ModifyColumnFamiliesRequest
8232 urlParams_ gensupport.URLParams
8233 ctx_ context.Context
8234 header_ http.Header
8235 }
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245 func (r *ProjectsInstancesTablesService) ModifyColumnFamilies(name string, modifycolumnfamiliesrequest *ModifyColumnFamiliesRequest) *ProjectsInstancesTablesModifyColumnFamiliesCall {
8246 c := &ProjectsInstancesTablesModifyColumnFamiliesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8247 c.name = name
8248 c.modifycolumnfamiliesrequest = modifycolumnfamiliesrequest
8249 return c
8250 }
8251
8252
8253
8254
8255 func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesModifyColumnFamiliesCall {
8256 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8257 return c
8258 }
8259
8260
8261 func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Context(ctx context.Context) *ProjectsInstancesTablesModifyColumnFamiliesCall {
8262 c.ctx_ = ctx
8263 return c
8264 }
8265
8266
8267
8268 func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Header() http.Header {
8269 if c.header_ == nil {
8270 c.header_ = make(http.Header)
8271 }
8272 return c.header_
8273 }
8274
8275 func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) doRequest(alt string) (*http.Response, error) {
8276 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8277 var body io.Reader = nil
8278 body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycolumnfamiliesrequest)
8279 if err != nil {
8280 return nil, err
8281 }
8282 c.urlParams_.Set("alt", alt)
8283 c.urlParams_.Set("prettyPrint", "false")
8284 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:modifyColumnFamilies")
8285 urls += "?" + c.urlParams_.Encode()
8286 req, err := http.NewRequest("POST", urls, body)
8287 if err != nil {
8288 return nil, err
8289 }
8290 req.Header = reqHeaders
8291 googleapi.Expand(req.URL, map[string]string{
8292 "name": c.name,
8293 })
8294 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8295 }
8296
8297
8298
8299
8300
8301
8302 func (c *ProjectsInstancesTablesModifyColumnFamiliesCall) Do(opts ...googleapi.CallOption) (*Table, error) {
8303 gensupport.SetOptions(c.urlParams_, opts...)
8304 res, err := c.doRequest("json")
8305 if res != nil && res.StatusCode == http.StatusNotModified {
8306 if res.Body != nil {
8307 res.Body.Close()
8308 }
8309 return nil, gensupport.WrapError(&googleapi.Error{
8310 Code: res.StatusCode,
8311 Header: res.Header,
8312 })
8313 }
8314 if err != nil {
8315 return nil, err
8316 }
8317 defer googleapi.CloseBody(res)
8318 if err := googleapi.CheckResponse(res); err != nil {
8319 return nil, gensupport.WrapError(err)
8320 }
8321 ret := &Table{
8322 ServerResponse: googleapi.ServerResponse{
8323 Header: res.Header,
8324 HTTPStatusCode: res.StatusCode,
8325 },
8326 }
8327 target := &ret
8328 if err := gensupport.DecodeResponse(target, res); err != nil {
8329 return nil, err
8330 }
8331 return ret, nil
8332 }
8333
8334 type ProjectsInstancesTablesPatchCall struct {
8335 s *Service
8336 name string
8337 table *Table
8338 urlParams_ gensupport.URLParams
8339 ctx_ context.Context
8340 header_ http.Header
8341 }
8342
8343
8344
8345
8346
8347
8348 func (r *ProjectsInstancesTablesService) Patch(name string, table *Table) *ProjectsInstancesTablesPatchCall {
8349 c := &ProjectsInstancesTablesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8350 c.name = name
8351 c.table = table
8352 return c
8353 }
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364 func (c *ProjectsInstancesTablesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesTablesPatchCall {
8365 c.urlParams_.Set("updateMask", updateMask)
8366 return c
8367 }
8368
8369
8370
8371
8372 func (c *ProjectsInstancesTablesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesPatchCall {
8373 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8374 return c
8375 }
8376
8377
8378 func (c *ProjectsInstancesTablesPatchCall) Context(ctx context.Context) *ProjectsInstancesTablesPatchCall {
8379 c.ctx_ = ctx
8380 return c
8381 }
8382
8383
8384
8385 func (c *ProjectsInstancesTablesPatchCall) Header() http.Header {
8386 if c.header_ == nil {
8387 c.header_ = make(http.Header)
8388 }
8389 return c.header_
8390 }
8391
8392 func (c *ProjectsInstancesTablesPatchCall) doRequest(alt string) (*http.Response, error) {
8393 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8394 var body io.Reader = nil
8395 body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
8396 if err != nil {
8397 return nil, err
8398 }
8399 c.urlParams_.Set("alt", alt)
8400 c.urlParams_.Set("prettyPrint", "false")
8401 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
8402 urls += "?" + c.urlParams_.Encode()
8403 req, err := http.NewRequest("PATCH", urls, body)
8404 if err != nil {
8405 return nil, err
8406 }
8407 req.Header = reqHeaders
8408 googleapi.Expand(req.URL, map[string]string{
8409 "name": c.name,
8410 })
8411 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8412 }
8413
8414
8415
8416
8417
8418
8419 func (c *ProjectsInstancesTablesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8420 gensupport.SetOptions(c.urlParams_, opts...)
8421 res, err := c.doRequest("json")
8422 if res != nil && res.StatusCode == http.StatusNotModified {
8423 if res.Body != nil {
8424 res.Body.Close()
8425 }
8426 return nil, gensupport.WrapError(&googleapi.Error{
8427 Code: res.StatusCode,
8428 Header: res.Header,
8429 })
8430 }
8431 if err != nil {
8432 return nil, err
8433 }
8434 defer googleapi.CloseBody(res)
8435 if err := googleapi.CheckResponse(res); err != nil {
8436 return nil, gensupport.WrapError(err)
8437 }
8438 ret := &Operation{
8439 ServerResponse: googleapi.ServerResponse{
8440 Header: res.Header,
8441 HTTPStatusCode: res.StatusCode,
8442 },
8443 }
8444 target := &ret
8445 if err := gensupport.DecodeResponse(target, res); err != nil {
8446 return nil, err
8447 }
8448 return ret, nil
8449 }
8450
8451 type ProjectsInstancesTablesRestoreCall struct {
8452 s *Service
8453 parent string
8454 restoretablerequest *RestoreTableRequest
8455 urlParams_ gensupport.URLParams
8456 ctx_ context.Context
8457 header_ http.Header
8458 }
8459
8460
8461
8462
8463
8464
8465
8466
8467 func (r *ProjectsInstancesTablesService) Restore(parent string, restoretablerequest *RestoreTableRequest) *ProjectsInstancesTablesRestoreCall {
8468 c := &ProjectsInstancesTablesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8469 c.parent = parent
8470 c.restoretablerequest = restoretablerequest
8471 return c
8472 }
8473
8474
8475
8476
8477 func (c *ProjectsInstancesTablesRestoreCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesRestoreCall {
8478 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8479 return c
8480 }
8481
8482
8483 func (c *ProjectsInstancesTablesRestoreCall) Context(ctx context.Context) *ProjectsInstancesTablesRestoreCall {
8484 c.ctx_ = ctx
8485 return c
8486 }
8487
8488
8489
8490 func (c *ProjectsInstancesTablesRestoreCall) Header() http.Header {
8491 if c.header_ == nil {
8492 c.header_ = make(http.Header)
8493 }
8494 return c.header_
8495 }
8496
8497 func (c *ProjectsInstancesTablesRestoreCall) doRequest(alt string) (*http.Response, error) {
8498 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8499 var body io.Reader = nil
8500 body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoretablerequest)
8501 if err != nil {
8502 return nil, err
8503 }
8504 c.urlParams_.Set("alt", alt)
8505 c.urlParams_.Set("prettyPrint", "false")
8506 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/tables:restore")
8507 urls += "?" + c.urlParams_.Encode()
8508 req, err := http.NewRequest("POST", urls, body)
8509 if err != nil {
8510 return nil, err
8511 }
8512 req.Header = reqHeaders
8513 googleapi.Expand(req.URL, map[string]string{
8514 "parent": c.parent,
8515 })
8516 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8517 }
8518
8519
8520
8521
8522
8523
8524 func (c *ProjectsInstancesTablesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8525 gensupport.SetOptions(c.urlParams_, opts...)
8526 res, err := c.doRequest("json")
8527 if res != nil && res.StatusCode == http.StatusNotModified {
8528 if res.Body != nil {
8529 res.Body.Close()
8530 }
8531 return nil, gensupport.WrapError(&googleapi.Error{
8532 Code: res.StatusCode,
8533 Header: res.Header,
8534 })
8535 }
8536 if err != nil {
8537 return nil, err
8538 }
8539 defer googleapi.CloseBody(res)
8540 if err := googleapi.CheckResponse(res); err != nil {
8541 return nil, gensupport.WrapError(err)
8542 }
8543 ret := &Operation{
8544 ServerResponse: googleapi.ServerResponse{
8545 Header: res.Header,
8546 HTTPStatusCode: res.StatusCode,
8547 },
8548 }
8549 target := &ret
8550 if err := gensupport.DecodeResponse(target, res); err != nil {
8551 return nil, err
8552 }
8553 return ret, nil
8554 }
8555
8556 type ProjectsInstancesTablesSetIamPolicyCall struct {
8557 s *Service
8558 resource string
8559 setiampolicyrequest *SetIamPolicyRequest
8560 urlParams_ gensupport.URLParams
8561 ctx_ context.Context
8562 header_ http.Header
8563 }
8564
8565
8566
8567
8568
8569
8570
8571 func (r *ProjectsInstancesTablesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesTablesSetIamPolicyCall {
8572 c := &ProjectsInstancesTablesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8573 c.resource = resource
8574 c.setiampolicyrequest = setiampolicyrequest
8575 return c
8576 }
8577
8578
8579
8580
8581 func (c *ProjectsInstancesTablesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesSetIamPolicyCall {
8582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8583 return c
8584 }
8585
8586
8587 func (c *ProjectsInstancesTablesSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesSetIamPolicyCall {
8588 c.ctx_ = ctx
8589 return c
8590 }
8591
8592
8593
8594 func (c *ProjectsInstancesTablesSetIamPolicyCall) Header() http.Header {
8595 if c.header_ == nil {
8596 c.header_ = make(http.Header)
8597 }
8598 return c.header_
8599 }
8600
8601 func (c *ProjectsInstancesTablesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8603 var body io.Reader = nil
8604 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
8605 if err != nil {
8606 return nil, err
8607 }
8608 c.urlParams_.Set("alt", alt)
8609 c.urlParams_.Set("prettyPrint", "false")
8610 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
8611 urls += "?" + c.urlParams_.Encode()
8612 req, err := http.NewRequest("POST", urls, body)
8613 if err != nil {
8614 return nil, err
8615 }
8616 req.Header = reqHeaders
8617 googleapi.Expand(req.URL, map[string]string{
8618 "resource": c.resource,
8619 })
8620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8621 }
8622
8623
8624
8625
8626
8627
8628 func (c *ProjectsInstancesTablesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8629 gensupport.SetOptions(c.urlParams_, opts...)
8630 res, err := c.doRequest("json")
8631 if res != nil && res.StatusCode == http.StatusNotModified {
8632 if res.Body != nil {
8633 res.Body.Close()
8634 }
8635 return nil, gensupport.WrapError(&googleapi.Error{
8636 Code: res.StatusCode,
8637 Header: res.Header,
8638 })
8639 }
8640 if err != nil {
8641 return nil, err
8642 }
8643 defer googleapi.CloseBody(res)
8644 if err := googleapi.CheckResponse(res); err != nil {
8645 return nil, gensupport.WrapError(err)
8646 }
8647 ret := &Policy{
8648 ServerResponse: googleapi.ServerResponse{
8649 Header: res.Header,
8650 HTTPStatusCode: res.StatusCode,
8651 },
8652 }
8653 target := &ret
8654 if err := gensupport.DecodeResponse(target, res); err != nil {
8655 return nil, err
8656 }
8657 return ret, nil
8658 }
8659
8660 type ProjectsInstancesTablesTestIamPermissionsCall struct {
8661 s *Service
8662 resource string
8663 testiampermissionsrequest *TestIamPermissionsRequest
8664 urlParams_ gensupport.URLParams
8665 ctx_ context.Context
8666 header_ http.Header
8667 }
8668
8669
8670
8671
8672
8673
8674
8675
8676 func (r *ProjectsInstancesTablesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTablesTestIamPermissionsCall {
8677 c := &ProjectsInstancesTablesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8678 c.resource = resource
8679 c.testiampermissionsrequest = testiampermissionsrequest
8680 return c
8681 }
8682
8683
8684
8685
8686 func (c *ProjectsInstancesTablesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesTestIamPermissionsCall {
8687 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8688 return c
8689 }
8690
8691
8692 func (c *ProjectsInstancesTablesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTablesTestIamPermissionsCall {
8693 c.ctx_ = ctx
8694 return c
8695 }
8696
8697
8698
8699 func (c *ProjectsInstancesTablesTestIamPermissionsCall) Header() http.Header {
8700 if c.header_ == nil {
8701 c.header_ = make(http.Header)
8702 }
8703 return c.header_
8704 }
8705
8706 func (c *ProjectsInstancesTablesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8707 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8708 var body io.Reader = nil
8709 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8710 if err != nil {
8711 return nil, err
8712 }
8713 c.urlParams_.Set("alt", alt)
8714 c.urlParams_.Set("prettyPrint", "false")
8715 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
8716 urls += "?" + c.urlParams_.Encode()
8717 req, err := http.NewRequest("POST", urls, body)
8718 if err != nil {
8719 return nil, err
8720 }
8721 req.Header = reqHeaders
8722 googleapi.Expand(req.URL, map[string]string{
8723 "resource": c.resource,
8724 })
8725 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8726 }
8727
8728
8729
8730
8731
8732
8733
8734 func (c *ProjectsInstancesTablesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8735 gensupport.SetOptions(c.urlParams_, opts...)
8736 res, err := c.doRequest("json")
8737 if res != nil && res.StatusCode == http.StatusNotModified {
8738 if res.Body != nil {
8739 res.Body.Close()
8740 }
8741 return nil, gensupport.WrapError(&googleapi.Error{
8742 Code: res.StatusCode,
8743 Header: res.Header,
8744 })
8745 }
8746 if err != nil {
8747 return nil, err
8748 }
8749 defer googleapi.CloseBody(res)
8750 if err := googleapi.CheckResponse(res); err != nil {
8751 return nil, gensupport.WrapError(err)
8752 }
8753 ret := &TestIamPermissionsResponse{
8754 ServerResponse: googleapi.ServerResponse{
8755 Header: res.Header,
8756 HTTPStatusCode: res.StatusCode,
8757 },
8758 }
8759 target := &ret
8760 if err := gensupport.DecodeResponse(target, res); err != nil {
8761 return nil, err
8762 }
8763 return ret, nil
8764 }
8765
8766 type ProjectsInstancesTablesUndeleteCall struct {
8767 s *Service
8768 name string
8769 undeletetablerequest *UndeleteTableRequest
8770 urlParams_ gensupport.URLParams
8771 ctx_ context.Context
8772 header_ http.Header
8773 }
8774
8775
8776
8777
8778
8779 func (r *ProjectsInstancesTablesService) Undelete(name string, undeletetablerequest *UndeleteTableRequest) *ProjectsInstancesTablesUndeleteCall {
8780 c := &ProjectsInstancesTablesUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8781 c.name = name
8782 c.undeletetablerequest = undeletetablerequest
8783 return c
8784 }
8785
8786
8787
8788
8789 func (c *ProjectsInstancesTablesUndeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesUndeleteCall {
8790 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8791 return c
8792 }
8793
8794
8795 func (c *ProjectsInstancesTablesUndeleteCall) Context(ctx context.Context) *ProjectsInstancesTablesUndeleteCall {
8796 c.ctx_ = ctx
8797 return c
8798 }
8799
8800
8801
8802 func (c *ProjectsInstancesTablesUndeleteCall) Header() http.Header {
8803 if c.header_ == nil {
8804 c.header_ = make(http.Header)
8805 }
8806 return c.header_
8807 }
8808
8809 func (c *ProjectsInstancesTablesUndeleteCall) doRequest(alt string) (*http.Response, error) {
8810 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8811 var body io.Reader = nil
8812 body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletetablerequest)
8813 if err != nil {
8814 return nil, err
8815 }
8816 c.urlParams_.Set("alt", alt)
8817 c.urlParams_.Set("prettyPrint", "false")
8818 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete")
8819 urls += "?" + c.urlParams_.Encode()
8820 req, err := http.NewRequest("POST", urls, body)
8821 if err != nil {
8822 return nil, err
8823 }
8824 req.Header = reqHeaders
8825 googleapi.Expand(req.URL, map[string]string{
8826 "name": c.name,
8827 })
8828 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8829 }
8830
8831
8832
8833
8834
8835
8836 func (c *ProjectsInstancesTablesUndeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8837 gensupport.SetOptions(c.urlParams_, opts...)
8838 res, err := c.doRequest("json")
8839 if res != nil && res.StatusCode == http.StatusNotModified {
8840 if res.Body != nil {
8841 res.Body.Close()
8842 }
8843 return nil, gensupport.WrapError(&googleapi.Error{
8844 Code: res.StatusCode,
8845 Header: res.Header,
8846 })
8847 }
8848 if err != nil {
8849 return nil, err
8850 }
8851 defer googleapi.CloseBody(res)
8852 if err := googleapi.CheckResponse(res); err != nil {
8853 return nil, gensupport.WrapError(err)
8854 }
8855 ret := &Operation{
8856 ServerResponse: googleapi.ServerResponse{
8857 Header: res.Header,
8858 HTTPStatusCode: res.StatusCode,
8859 },
8860 }
8861 target := &ret
8862 if err := gensupport.DecodeResponse(target, res); err != nil {
8863 return nil, err
8864 }
8865 return ret, nil
8866 }
8867
8868 type ProjectsInstancesTablesAuthorizedViewsCreateCall struct {
8869 s *Service
8870 parent string
8871 authorizedview *AuthorizedView
8872 urlParams_ gensupport.URLParams
8873 ctx_ context.Context
8874 header_ http.Header
8875 }
8876
8877
8878
8879
8880
8881
8882 func (r *ProjectsInstancesTablesAuthorizedViewsService) Create(parent string, authorizedview *AuthorizedView) *ProjectsInstancesTablesAuthorizedViewsCreateCall {
8883 c := &ProjectsInstancesTablesAuthorizedViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8884 c.parent = parent
8885 c.authorizedview = authorizedview
8886 return c
8887 }
8888
8889
8890
8891
8892
8893
8894
8895 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) AuthorizedViewId(authorizedViewId string) *ProjectsInstancesTablesAuthorizedViewsCreateCall {
8896 c.urlParams_.Set("authorizedViewId", authorizedViewId)
8897 return c
8898 }
8899
8900
8901
8902
8903 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsCreateCall {
8904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8905 return c
8906 }
8907
8908
8909 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsCreateCall {
8910 c.ctx_ = ctx
8911 return c
8912 }
8913
8914
8915
8916 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) Header() http.Header {
8917 if c.header_ == nil {
8918 c.header_ = make(http.Header)
8919 }
8920 return c.header_
8921 }
8922
8923 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) doRequest(alt string) (*http.Response, error) {
8924 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8925 var body io.Reader = nil
8926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedview)
8927 if err != nil {
8928 return nil, err
8929 }
8930 c.urlParams_.Set("alt", alt)
8931 c.urlParams_.Set("prettyPrint", "false")
8932 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/authorizedViews")
8933 urls += "?" + c.urlParams_.Encode()
8934 req, err := http.NewRequest("POST", urls, body)
8935 if err != nil {
8936 return nil, err
8937 }
8938 req.Header = reqHeaders
8939 googleapi.Expand(req.URL, map[string]string{
8940 "parent": c.parent,
8941 })
8942 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8943 }
8944
8945
8946
8947
8948
8949
8950 func (c *ProjectsInstancesTablesAuthorizedViewsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8951 gensupport.SetOptions(c.urlParams_, opts...)
8952 res, err := c.doRequest("json")
8953 if res != nil && res.StatusCode == http.StatusNotModified {
8954 if res.Body != nil {
8955 res.Body.Close()
8956 }
8957 return nil, gensupport.WrapError(&googleapi.Error{
8958 Code: res.StatusCode,
8959 Header: res.Header,
8960 })
8961 }
8962 if err != nil {
8963 return nil, err
8964 }
8965 defer googleapi.CloseBody(res)
8966 if err := googleapi.CheckResponse(res); err != nil {
8967 return nil, gensupport.WrapError(err)
8968 }
8969 ret := &Operation{
8970 ServerResponse: googleapi.ServerResponse{
8971 Header: res.Header,
8972 HTTPStatusCode: res.StatusCode,
8973 },
8974 }
8975 target := &ret
8976 if err := gensupport.DecodeResponse(target, res); err != nil {
8977 return nil, err
8978 }
8979 return ret, nil
8980 }
8981
8982 type ProjectsInstancesTablesAuthorizedViewsDeleteCall struct {
8983 s *Service
8984 name string
8985 urlParams_ gensupport.URLParams
8986 ctx_ context.Context
8987 header_ http.Header
8988 }
8989
8990
8991
8992
8993
8994
8995
8996 func (r *ProjectsInstancesTablesAuthorizedViewsService) Delete(name string) *ProjectsInstancesTablesAuthorizedViewsDeleteCall {
8997 c := &ProjectsInstancesTablesAuthorizedViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8998 c.name = name
8999 return c
9000 }
9001
9002
9003
9004
9005
9006 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) Etag(etag string) *ProjectsInstancesTablesAuthorizedViewsDeleteCall {
9007 c.urlParams_.Set("etag", etag)
9008 return c
9009 }
9010
9011
9012
9013
9014 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsDeleteCall {
9015 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9016 return c
9017 }
9018
9019
9020 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsDeleteCall {
9021 c.ctx_ = ctx
9022 return c
9023 }
9024
9025
9026
9027 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) Header() http.Header {
9028 if c.header_ == nil {
9029 c.header_ = make(http.Header)
9030 }
9031 return c.header_
9032 }
9033
9034 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
9035 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9036 var body io.Reader = nil
9037 c.urlParams_.Set("alt", alt)
9038 c.urlParams_.Set("prettyPrint", "false")
9039 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9040 urls += "?" + c.urlParams_.Encode()
9041 req, err := http.NewRequest("DELETE", urls, body)
9042 if err != nil {
9043 return nil, err
9044 }
9045 req.Header = reqHeaders
9046 googleapi.Expand(req.URL, map[string]string{
9047 "name": c.name,
9048 })
9049 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9050 }
9051
9052
9053
9054
9055
9056
9057 func (c *ProjectsInstancesTablesAuthorizedViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9058 gensupport.SetOptions(c.urlParams_, opts...)
9059 res, err := c.doRequest("json")
9060 if res != nil && res.StatusCode == http.StatusNotModified {
9061 if res.Body != nil {
9062 res.Body.Close()
9063 }
9064 return nil, gensupport.WrapError(&googleapi.Error{
9065 Code: res.StatusCode,
9066 Header: res.Header,
9067 })
9068 }
9069 if err != nil {
9070 return nil, err
9071 }
9072 defer googleapi.CloseBody(res)
9073 if err := googleapi.CheckResponse(res); err != nil {
9074 return nil, gensupport.WrapError(err)
9075 }
9076 ret := &Empty{
9077 ServerResponse: googleapi.ServerResponse{
9078 Header: res.Header,
9079 HTTPStatusCode: res.StatusCode,
9080 },
9081 }
9082 target := &ret
9083 if err := gensupport.DecodeResponse(target, res); err != nil {
9084 return nil, err
9085 }
9086 return ret, nil
9087 }
9088
9089 type ProjectsInstancesTablesAuthorizedViewsGetCall struct {
9090 s *Service
9091 name string
9092 urlParams_ gensupport.URLParams
9093 ifNoneMatch_ string
9094 ctx_ context.Context
9095 header_ http.Header
9096 }
9097
9098
9099
9100
9101
9102
9103
9104 func (r *ProjectsInstancesTablesAuthorizedViewsService) Get(name string) *ProjectsInstancesTablesAuthorizedViewsGetCall {
9105 c := &ProjectsInstancesTablesAuthorizedViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9106 c.name = name
9107 return c
9108 }
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) View(view string) *ProjectsInstancesTablesAuthorizedViewsGetCall {
9126 c.urlParams_.Set("view", view)
9127 return c
9128 }
9129
9130
9131
9132
9133 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsGetCall {
9134 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9135 return c
9136 }
9137
9138
9139
9140
9141 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesAuthorizedViewsGetCall {
9142 c.ifNoneMatch_ = entityTag
9143 return c
9144 }
9145
9146
9147 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsGetCall {
9148 c.ctx_ = ctx
9149 return c
9150 }
9151
9152
9153
9154 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) Header() http.Header {
9155 if c.header_ == nil {
9156 c.header_ = make(http.Header)
9157 }
9158 return c.header_
9159 }
9160
9161 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) doRequest(alt string) (*http.Response, error) {
9162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9163 if c.ifNoneMatch_ != "" {
9164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9165 }
9166 var body io.Reader = nil
9167 c.urlParams_.Set("alt", alt)
9168 c.urlParams_.Set("prettyPrint", "false")
9169 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9170 urls += "?" + c.urlParams_.Encode()
9171 req, err := http.NewRequest("GET", urls, body)
9172 if err != nil {
9173 return nil, err
9174 }
9175 req.Header = reqHeaders
9176 googleapi.Expand(req.URL, map[string]string{
9177 "name": c.name,
9178 })
9179 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9180 }
9181
9182
9183
9184
9185
9186
9187 func (c *ProjectsInstancesTablesAuthorizedViewsGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedView, error) {
9188 gensupport.SetOptions(c.urlParams_, opts...)
9189 res, err := c.doRequest("json")
9190 if res != nil && res.StatusCode == http.StatusNotModified {
9191 if res.Body != nil {
9192 res.Body.Close()
9193 }
9194 return nil, gensupport.WrapError(&googleapi.Error{
9195 Code: res.StatusCode,
9196 Header: res.Header,
9197 })
9198 }
9199 if err != nil {
9200 return nil, err
9201 }
9202 defer googleapi.CloseBody(res)
9203 if err := googleapi.CheckResponse(res); err != nil {
9204 return nil, gensupport.WrapError(err)
9205 }
9206 ret := &AuthorizedView{
9207 ServerResponse: googleapi.ServerResponse{
9208 Header: res.Header,
9209 HTTPStatusCode: res.StatusCode,
9210 },
9211 }
9212 target := &ret
9213 if err := gensupport.DecodeResponse(target, res); err != nil {
9214 return nil, err
9215 }
9216 return ret, nil
9217 }
9218
9219 type ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall struct {
9220 s *Service
9221 resource string
9222 getiampolicyrequest *GetIamPolicyRequest
9223 urlParams_ gensupport.URLParams
9224 ctx_ context.Context
9225 header_ http.Header
9226 }
9227
9228
9229
9230
9231
9232
9233
9234
9235 func (r *ProjectsInstancesTablesAuthorizedViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall {
9236 c := &ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9237 c.resource = resource
9238 c.getiampolicyrequest = getiampolicyrequest
9239 return c
9240 }
9241
9242
9243
9244
9245 func (c *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall {
9246 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9247 return c
9248 }
9249
9250
9251 func (c *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall {
9252 c.ctx_ = ctx
9253 return c
9254 }
9255
9256
9257
9258 func (c *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall) Header() http.Header {
9259 if c.header_ == nil {
9260 c.header_ = make(http.Header)
9261 }
9262 return c.header_
9263 }
9264
9265 func (c *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9266 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9267 var body io.Reader = nil
9268 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
9269 if err != nil {
9270 return nil, err
9271 }
9272 c.urlParams_.Set("alt", alt)
9273 c.urlParams_.Set("prettyPrint", "false")
9274 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy")
9275 urls += "?" + c.urlParams_.Encode()
9276 req, err := http.NewRequest("POST", urls, body)
9277 if err != nil {
9278 return nil, err
9279 }
9280 req.Header = reqHeaders
9281 googleapi.Expand(req.URL, map[string]string{
9282 "resource": c.resource,
9283 })
9284 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9285 }
9286
9287
9288
9289
9290
9291
9292 func (c *ProjectsInstancesTablesAuthorizedViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9293 gensupport.SetOptions(c.urlParams_, opts...)
9294 res, err := c.doRequest("json")
9295 if res != nil && res.StatusCode == http.StatusNotModified {
9296 if res.Body != nil {
9297 res.Body.Close()
9298 }
9299 return nil, gensupport.WrapError(&googleapi.Error{
9300 Code: res.StatusCode,
9301 Header: res.Header,
9302 })
9303 }
9304 if err != nil {
9305 return nil, err
9306 }
9307 defer googleapi.CloseBody(res)
9308 if err := googleapi.CheckResponse(res); err != nil {
9309 return nil, gensupport.WrapError(err)
9310 }
9311 ret := &Policy{
9312 ServerResponse: googleapi.ServerResponse{
9313 Header: res.Header,
9314 HTTPStatusCode: res.StatusCode,
9315 },
9316 }
9317 target := &ret
9318 if err := gensupport.DecodeResponse(target, res); err != nil {
9319 return nil, err
9320 }
9321 return ret, nil
9322 }
9323
9324 type ProjectsInstancesTablesAuthorizedViewsListCall struct {
9325 s *Service
9326 parent string
9327 urlParams_ gensupport.URLParams
9328 ifNoneMatch_ string
9329 ctx_ context.Context
9330 header_ http.Header
9331 }
9332
9333
9334
9335
9336
9337
9338 func (r *ProjectsInstancesTablesAuthorizedViewsService) List(parent string) *ProjectsInstancesTablesAuthorizedViewsListCall {
9339 c := &ProjectsInstancesTablesAuthorizedViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9340 c.parent = parent
9341 return c
9342 }
9343
9344
9345
9346
9347
9348
9349
9350
9351 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) PageSize(pageSize int64) *ProjectsInstancesTablesAuthorizedViewsListCall {
9352 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9353 return c
9354 }
9355
9356
9357
9358 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) PageToken(pageToken string) *ProjectsInstancesTablesAuthorizedViewsListCall {
9359 c.urlParams_.Set("pageToken", pageToken)
9360 return c
9361 }
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) View(view string) *ProjectsInstancesTablesAuthorizedViewsListCall {
9379 c.urlParams_.Set("view", view)
9380 return c
9381 }
9382
9383
9384
9385
9386 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsListCall {
9387 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9388 return c
9389 }
9390
9391
9392
9393
9394 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesTablesAuthorizedViewsListCall {
9395 c.ifNoneMatch_ = entityTag
9396 return c
9397 }
9398
9399
9400 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsListCall {
9401 c.ctx_ = ctx
9402 return c
9403 }
9404
9405
9406
9407 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) Header() http.Header {
9408 if c.header_ == nil {
9409 c.header_ = make(http.Header)
9410 }
9411 return c.header_
9412 }
9413
9414 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) doRequest(alt string) (*http.Response, error) {
9415 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9416 if c.ifNoneMatch_ != "" {
9417 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9418 }
9419 var body io.Reader = nil
9420 c.urlParams_.Set("alt", alt)
9421 c.urlParams_.Set("prettyPrint", "false")
9422 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/authorizedViews")
9423 urls += "?" + c.urlParams_.Encode()
9424 req, err := http.NewRequest("GET", urls, body)
9425 if err != nil {
9426 return nil, err
9427 }
9428 req.Header = reqHeaders
9429 googleapi.Expand(req.URL, map[string]string{
9430 "parent": c.parent,
9431 })
9432 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9433 }
9434
9435
9436
9437
9438
9439
9440
9441 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedViewsResponse, error) {
9442 gensupport.SetOptions(c.urlParams_, opts...)
9443 res, err := c.doRequest("json")
9444 if res != nil && res.StatusCode == http.StatusNotModified {
9445 if res.Body != nil {
9446 res.Body.Close()
9447 }
9448 return nil, gensupport.WrapError(&googleapi.Error{
9449 Code: res.StatusCode,
9450 Header: res.Header,
9451 })
9452 }
9453 if err != nil {
9454 return nil, err
9455 }
9456 defer googleapi.CloseBody(res)
9457 if err := googleapi.CheckResponse(res); err != nil {
9458 return nil, gensupport.WrapError(err)
9459 }
9460 ret := &ListAuthorizedViewsResponse{
9461 ServerResponse: googleapi.ServerResponse{
9462 Header: res.Header,
9463 HTTPStatusCode: res.StatusCode,
9464 },
9465 }
9466 target := &ret
9467 if err := gensupport.DecodeResponse(target, res); err != nil {
9468 return nil, err
9469 }
9470 return ret, nil
9471 }
9472
9473
9474
9475
9476 func (c *ProjectsInstancesTablesAuthorizedViewsListCall) Pages(ctx context.Context, f func(*ListAuthorizedViewsResponse) error) error {
9477 c.ctx_ = ctx
9478 defer c.PageToken(c.urlParams_.Get("pageToken"))
9479 for {
9480 x, err := c.Do()
9481 if err != nil {
9482 return err
9483 }
9484 if err := f(x); err != nil {
9485 return err
9486 }
9487 if x.NextPageToken == "" {
9488 return nil
9489 }
9490 c.PageToken(x.NextPageToken)
9491 }
9492 }
9493
9494 type ProjectsInstancesTablesAuthorizedViewsPatchCall struct {
9495 s *Service
9496 name string
9497 authorizedview *AuthorizedView
9498 urlParams_ gensupport.URLParams
9499 ctx_ context.Context
9500 header_ http.Header
9501 }
9502
9503
9504
9505
9506
9507
9508 func (r *ProjectsInstancesTablesAuthorizedViewsService) Patch(name string, authorizedview *AuthorizedView) *ProjectsInstancesTablesAuthorizedViewsPatchCall {
9509 c := &ProjectsInstancesTablesAuthorizedViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9510 c.name = name
9511 c.authorizedview = authorizedview
9512 return c
9513 }
9514
9515
9516
9517 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) IgnoreWarnings(ignoreWarnings bool) *ProjectsInstancesTablesAuthorizedViewsPatchCall {
9518 c.urlParams_.Set("ignoreWarnings", fmt.Sprint(ignoreWarnings))
9519 return c
9520 }
9521
9522
9523
9524
9525
9526
9527
9528 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) UpdateMask(updateMask string) *ProjectsInstancesTablesAuthorizedViewsPatchCall {
9529 c.urlParams_.Set("updateMask", updateMask)
9530 return c
9531 }
9532
9533
9534
9535
9536 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsPatchCall {
9537 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9538 return c
9539 }
9540
9541
9542 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsPatchCall {
9543 c.ctx_ = ctx
9544 return c
9545 }
9546
9547
9548
9549 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) Header() http.Header {
9550 if c.header_ == nil {
9551 c.header_ = make(http.Header)
9552 }
9553 return c.header_
9554 }
9555
9556 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) doRequest(alt string) (*http.Response, error) {
9557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9558 var body io.Reader = nil
9559 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedview)
9560 if err != nil {
9561 return nil, err
9562 }
9563 c.urlParams_.Set("alt", alt)
9564 c.urlParams_.Set("prettyPrint", "false")
9565 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
9566 urls += "?" + c.urlParams_.Encode()
9567 req, err := http.NewRequest("PATCH", urls, body)
9568 if err != nil {
9569 return nil, err
9570 }
9571 req.Header = reqHeaders
9572 googleapi.Expand(req.URL, map[string]string{
9573 "name": c.name,
9574 })
9575 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9576 }
9577
9578
9579
9580
9581
9582
9583 func (c *ProjectsInstancesTablesAuthorizedViewsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9584 gensupport.SetOptions(c.urlParams_, opts...)
9585 res, err := c.doRequest("json")
9586 if res != nil && res.StatusCode == http.StatusNotModified {
9587 if res.Body != nil {
9588 res.Body.Close()
9589 }
9590 return nil, gensupport.WrapError(&googleapi.Error{
9591 Code: res.StatusCode,
9592 Header: res.Header,
9593 })
9594 }
9595 if err != nil {
9596 return nil, err
9597 }
9598 defer googleapi.CloseBody(res)
9599 if err := googleapi.CheckResponse(res); err != nil {
9600 return nil, gensupport.WrapError(err)
9601 }
9602 ret := &Operation{
9603 ServerResponse: googleapi.ServerResponse{
9604 Header: res.Header,
9605 HTTPStatusCode: res.StatusCode,
9606 },
9607 }
9608 target := &ret
9609 if err := gensupport.DecodeResponse(target, res); err != nil {
9610 return nil, err
9611 }
9612 return ret, nil
9613 }
9614
9615 type ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall struct {
9616 s *Service
9617 resource string
9618 setiampolicyrequest *SetIamPolicyRequest
9619 urlParams_ gensupport.URLParams
9620 ctx_ context.Context
9621 header_ http.Header
9622 }
9623
9624
9625
9626
9627
9628
9629
9630 func (r *ProjectsInstancesTablesAuthorizedViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall {
9631 c := &ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9632 c.resource = resource
9633 c.setiampolicyrequest = setiampolicyrequest
9634 return c
9635 }
9636
9637
9638
9639
9640 func (c *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall {
9641 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9642 return c
9643 }
9644
9645
9646 func (c *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall {
9647 c.ctx_ = ctx
9648 return c
9649 }
9650
9651
9652
9653 func (c *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall) Header() http.Header {
9654 if c.header_ == nil {
9655 c.header_ = make(http.Header)
9656 }
9657 return c.header_
9658 }
9659
9660 func (c *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9662 var body io.Reader = nil
9663 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9664 if err != nil {
9665 return nil, err
9666 }
9667 c.urlParams_.Set("alt", alt)
9668 c.urlParams_.Set("prettyPrint", "false")
9669 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy")
9670 urls += "?" + c.urlParams_.Encode()
9671 req, err := http.NewRequest("POST", urls, body)
9672 if err != nil {
9673 return nil, err
9674 }
9675 req.Header = reqHeaders
9676 googleapi.Expand(req.URL, map[string]string{
9677 "resource": c.resource,
9678 })
9679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9680 }
9681
9682
9683
9684
9685
9686
9687 func (c *ProjectsInstancesTablesAuthorizedViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9688 gensupport.SetOptions(c.urlParams_, opts...)
9689 res, err := c.doRequest("json")
9690 if res != nil && res.StatusCode == http.StatusNotModified {
9691 if res.Body != nil {
9692 res.Body.Close()
9693 }
9694 return nil, gensupport.WrapError(&googleapi.Error{
9695 Code: res.StatusCode,
9696 Header: res.Header,
9697 })
9698 }
9699 if err != nil {
9700 return nil, err
9701 }
9702 defer googleapi.CloseBody(res)
9703 if err := googleapi.CheckResponse(res); err != nil {
9704 return nil, gensupport.WrapError(err)
9705 }
9706 ret := &Policy{
9707 ServerResponse: googleapi.ServerResponse{
9708 Header: res.Header,
9709 HTTPStatusCode: res.StatusCode,
9710 },
9711 }
9712 target := &ret
9713 if err := gensupport.DecodeResponse(target, res); err != nil {
9714 return nil, err
9715 }
9716 return ret, nil
9717 }
9718
9719 type ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall struct {
9720 s *Service
9721 resource string
9722 testiampermissionsrequest *TestIamPermissionsRequest
9723 urlParams_ gensupport.URLParams
9724 ctx_ context.Context
9725 header_ http.Header
9726 }
9727
9728
9729
9730
9731
9732
9733
9734
9735 func (r *ProjectsInstancesTablesAuthorizedViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall {
9736 c := &ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9737 c.resource = resource
9738 c.testiampermissionsrequest = testiampermissionsrequest
9739 return c
9740 }
9741
9742
9743
9744
9745 func (c *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall {
9746 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9747 return c
9748 }
9749
9750
9751 func (c *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall {
9752 c.ctx_ = ctx
9753 return c
9754 }
9755
9756
9757
9758 func (c *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall) Header() http.Header {
9759 if c.header_ == nil {
9760 c.header_ = make(http.Header)
9761 }
9762 return c.header_
9763 }
9764
9765 func (c *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9766 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9767 var body io.Reader = nil
9768 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
9769 if err != nil {
9770 return nil, err
9771 }
9772 c.urlParams_.Set("alt", alt)
9773 c.urlParams_.Set("prettyPrint", "false")
9774 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions")
9775 urls += "?" + c.urlParams_.Encode()
9776 req, err := http.NewRequest("POST", urls, body)
9777 if err != nil {
9778 return nil, err
9779 }
9780 req.Header = reqHeaders
9781 googleapi.Expand(req.URL, map[string]string{
9782 "resource": c.resource,
9783 })
9784 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9785 }
9786
9787
9788
9789
9790
9791
9792
9793 func (c *ProjectsInstancesTablesAuthorizedViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9794 gensupport.SetOptions(c.urlParams_, opts...)
9795 res, err := c.doRequest("json")
9796 if res != nil && res.StatusCode == http.StatusNotModified {
9797 if res.Body != nil {
9798 res.Body.Close()
9799 }
9800 return nil, gensupport.WrapError(&googleapi.Error{
9801 Code: res.StatusCode,
9802 Header: res.Header,
9803 })
9804 }
9805 if err != nil {
9806 return nil, err
9807 }
9808 defer googleapi.CloseBody(res)
9809 if err := googleapi.CheckResponse(res); err != nil {
9810 return nil, gensupport.WrapError(err)
9811 }
9812 ret := &TestIamPermissionsResponse{
9813 ServerResponse: googleapi.ServerResponse{
9814 Header: res.Header,
9815 HTTPStatusCode: res.StatusCode,
9816 },
9817 }
9818 target := &ret
9819 if err := gensupport.DecodeResponse(target, res); err != nil {
9820 return nil, err
9821 }
9822 return ret, nil
9823 }
9824
9825 type ProjectsLocationsListCall struct {
9826 s *Service
9827 name string
9828 urlParams_ gensupport.URLParams
9829 ifNoneMatch_ string
9830 ctx_ context.Context
9831 header_ http.Header
9832 }
9833
9834
9835
9836
9837 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
9838 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9839 c.name = name
9840 return c
9841 }
9842
9843
9844
9845
9846
9847 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
9848 c.urlParams_.Set("filter", filter)
9849 return c
9850 }
9851
9852
9853
9854 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
9855 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9856 return c
9857 }
9858
9859
9860
9861
9862 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
9863 c.urlParams_.Set("pageToken", pageToken)
9864 return c
9865 }
9866
9867
9868
9869
9870 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
9871 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9872 return c
9873 }
9874
9875
9876
9877
9878 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
9879 c.ifNoneMatch_ = entityTag
9880 return c
9881 }
9882
9883
9884 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
9885 c.ctx_ = ctx
9886 return c
9887 }
9888
9889
9890
9891 func (c *ProjectsLocationsListCall) Header() http.Header {
9892 if c.header_ == nil {
9893 c.header_ = make(http.Header)
9894 }
9895 return c.header_
9896 }
9897
9898 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
9899 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9900 if c.ifNoneMatch_ != "" {
9901 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9902 }
9903 var body io.Reader = nil
9904 c.urlParams_.Set("alt", alt)
9905 c.urlParams_.Set("prettyPrint", "false")
9906 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations")
9907 urls += "?" + c.urlParams_.Encode()
9908 req, err := http.NewRequest("GET", urls, body)
9909 if err != nil {
9910 return nil, err
9911 }
9912 req.Header = reqHeaders
9913 googleapi.Expand(req.URL, map[string]string{
9914 "name": c.name,
9915 })
9916 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9917 }
9918
9919
9920
9921
9922
9923
9924
9925 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
9926 gensupport.SetOptions(c.urlParams_, opts...)
9927 res, err := c.doRequest("json")
9928 if res != nil && res.StatusCode == http.StatusNotModified {
9929 if res.Body != nil {
9930 res.Body.Close()
9931 }
9932 return nil, gensupport.WrapError(&googleapi.Error{
9933 Code: res.StatusCode,
9934 Header: res.Header,
9935 })
9936 }
9937 if err != nil {
9938 return nil, err
9939 }
9940 defer googleapi.CloseBody(res)
9941 if err := googleapi.CheckResponse(res); err != nil {
9942 return nil, gensupport.WrapError(err)
9943 }
9944 ret := &ListLocationsResponse{
9945 ServerResponse: googleapi.ServerResponse{
9946 Header: res.Header,
9947 HTTPStatusCode: res.StatusCode,
9948 },
9949 }
9950 target := &ret
9951 if err := gensupport.DecodeResponse(target, res); err != nil {
9952 return nil, err
9953 }
9954 return ret, nil
9955 }
9956
9957
9958
9959
9960 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
9961 c.ctx_ = ctx
9962 defer c.PageToken(c.urlParams_.Get("pageToken"))
9963 for {
9964 x, err := c.Do()
9965 if err != nil {
9966 return err
9967 }
9968 if err := f(x); err != nil {
9969 return err
9970 }
9971 if x.NextPageToken == "" {
9972 return nil
9973 }
9974 c.PageToken(x.NextPageToken)
9975 }
9976 }
9977
View as plain text