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 dns
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 = "dns:v1beta2"
95 const apiName = "dns"
96 const apiVersion = "v1beta2"
97 const basePath = "https://dns.googleapis.com/"
98 const basePathTemplate = "https://dns.UNIVERSE_DOMAIN/"
99 const mtlsBasePath = "https://dns.mtls.googleapis.com/"
100
101
102 const (
103
104
105 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
106
107
108
109 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
110
111
112 NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly"
113
114
115 NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite"
116 )
117
118
119 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
120 scopesOption := internaloption.WithDefaultScopes(
121 "https://www.googleapis.com/auth/cloud-platform",
122 "https://www.googleapis.com/auth/cloud-platform.read-only",
123 "https://www.googleapis.com/auth/ndev.clouddns.readonly",
124 "https://www.googleapis.com/auth/ndev.clouddns.readwrite",
125 )
126
127 opts = append([]option.ClientOption{scopesOption}, opts...)
128 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
129 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
130 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
131 opts = append(opts, internaloption.EnableNewAuthLibrary())
132 client, endpoint, err := htransport.NewClient(ctx, opts...)
133 if err != nil {
134 return nil, err
135 }
136 s, err := New(client)
137 if err != nil {
138 return nil, err
139 }
140 if endpoint != "" {
141 s.BasePath = endpoint
142 }
143 return s, nil
144 }
145
146
147
148
149
150
151 func New(client *http.Client) (*Service, error) {
152 if client == nil {
153 return nil, errors.New("client is nil")
154 }
155 s := &Service{client: client, BasePath: basePath}
156 s.Changes = NewChangesService(s)
157 s.DnsKeys = NewDnsKeysService(s)
158 s.ManagedZoneOperations = NewManagedZoneOperationsService(s)
159 s.ManagedZones = NewManagedZonesService(s)
160 s.Policies = NewPoliciesService(s)
161 s.Projects = NewProjectsService(s)
162 s.ResourceRecordSets = NewResourceRecordSetsService(s)
163 s.ResponsePolicies = NewResponsePoliciesService(s)
164 s.ResponsePolicyRules = NewResponsePolicyRulesService(s)
165 return s, nil
166 }
167
168 type Service struct {
169 client *http.Client
170 BasePath string
171 UserAgent string
172
173 Changes *ChangesService
174
175 DnsKeys *DnsKeysService
176
177 ManagedZoneOperations *ManagedZoneOperationsService
178
179 ManagedZones *ManagedZonesService
180
181 Policies *PoliciesService
182
183 Projects *ProjectsService
184
185 ResourceRecordSets *ResourceRecordSetsService
186
187 ResponsePolicies *ResponsePoliciesService
188
189 ResponsePolicyRules *ResponsePolicyRulesService
190 }
191
192 func (s *Service) userAgent() string {
193 if s.UserAgent == "" {
194 return googleapi.UserAgent
195 }
196 return googleapi.UserAgent + " " + s.UserAgent
197 }
198
199 func NewChangesService(s *Service) *ChangesService {
200 rs := &ChangesService{s: s}
201 return rs
202 }
203
204 type ChangesService struct {
205 s *Service
206 }
207
208 func NewDnsKeysService(s *Service) *DnsKeysService {
209 rs := &DnsKeysService{s: s}
210 return rs
211 }
212
213 type DnsKeysService struct {
214 s *Service
215 }
216
217 func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService {
218 rs := &ManagedZoneOperationsService{s: s}
219 return rs
220 }
221
222 type ManagedZoneOperationsService struct {
223 s *Service
224 }
225
226 func NewManagedZonesService(s *Service) *ManagedZonesService {
227 rs := &ManagedZonesService{s: s}
228 return rs
229 }
230
231 type ManagedZonesService struct {
232 s *Service
233 }
234
235 func NewPoliciesService(s *Service) *PoliciesService {
236 rs := &PoliciesService{s: s}
237 return rs
238 }
239
240 type PoliciesService struct {
241 s *Service
242 }
243
244 func NewProjectsService(s *Service) *ProjectsService {
245 rs := &ProjectsService{s: s}
246 return rs
247 }
248
249 type ProjectsService struct {
250 s *Service
251 }
252
253 func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService {
254 rs := &ResourceRecordSetsService{s: s}
255 return rs
256 }
257
258 type ResourceRecordSetsService struct {
259 s *Service
260 }
261
262 func NewResponsePoliciesService(s *Service) *ResponsePoliciesService {
263 rs := &ResponsePoliciesService{s: s}
264 return rs
265 }
266
267 type ResponsePoliciesService struct {
268 s *Service
269 }
270
271 func NewResponsePolicyRulesService(s *Service) *ResponsePolicyRulesService {
272 rs := &ResponsePolicyRulesService{s: s}
273 return rs
274 }
275
276 type ResponsePolicyRulesService struct {
277 s *Service
278 }
279
280
281
282
283
284
285
286
287 type Change struct {
288
289 Additions []*ResourceRecordSet `json:"additions,omitempty"`
290
291
292 Deletions []*ResourceRecordSet `json:"deletions,omitempty"`
293
294 Id string `json:"id,omitempty"`
295
296 IsServing bool `json:"isServing,omitempty"`
297 Kind string `json:"kind,omitempty"`
298
299
300 StartTime string `json:"startTime,omitempty"`
301
302
303
304
305
306
307
308 Status string `json:"status,omitempty"`
309
310
311 googleapi.ServerResponse `json:"-"`
312
313
314
315
316
317 ForceSendFields []string `json:"-"`
318
319
320
321
322 NullFields []string `json:"-"`
323 }
324
325 func (s *Change) MarshalJSON() ([]byte, error) {
326 type NoMethod Change
327 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
328 }
329
330
331
332 type ChangesListResponse struct {
333
334 Changes []*Change `json:"changes,omitempty"`
335 Header *ResponseHeader `json:"header,omitempty"`
336
337 Kind string `json:"kind,omitempty"`
338
339
340
341
342
343
344
345
346 NextPageToken string `json:"nextPageToken,omitempty"`
347
348
349 googleapi.ServerResponse `json:"-"`
350
351
352
353
354
355 ForceSendFields []string `json:"-"`
356
357
358
359
360 NullFields []string `json:"-"`
361 }
362
363 func (s *ChangesListResponse) MarshalJSON() ([]byte, error) {
364 type NoMethod ChangesListResponse
365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
366 }
367
368
369 type DnsKey struct {
370
371
372
373
374
375
376
377
378
379 Algorithm string `json:"algorithm,omitempty"`
380
381
382 CreationTime string `json:"creationTime,omitempty"`
383
384
385
386 Description string `json:"description,omitempty"`
387
388
389
390 Digests []*DnsKeyDigest `json:"digests,omitempty"`
391
392 Id string `json:"id,omitempty"`
393
394
395
396 IsActive bool `json:"isActive,omitempty"`
397
398
399 KeyLength int64 `json:"keyLength,omitempty"`
400
401
402
403
404
405
406 KeyTag int64 `json:"keyTag,omitempty"`
407 Kind string `json:"kind,omitempty"`
408
409 PublicKey string `json:"publicKey,omitempty"`
410
411
412
413
414
415
416
417
418
419 Type string `json:"type,omitempty"`
420
421
422 googleapi.ServerResponse `json:"-"`
423
424
425
426
427
428 ForceSendFields []string `json:"-"`
429
430
431
432
433 NullFields []string `json:"-"`
434 }
435
436 func (s *DnsKey) MarshalJSON() ([]byte, error) {
437 type NoMethod DnsKey
438 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
439 }
440
441 type DnsKeyDigest struct {
442
443
444 Digest string `json:"digest,omitempty"`
445
446
447
448
449
450
451 Type string `json:"type,omitempty"`
452
453
454
455
456
457 ForceSendFields []string `json:"-"`
458
459
460
461
462 NullFields []string `json:"-"`
463 }
464
465 func (s *DnsKeyDigest) MarshalJSON() ([]byte, error) {
466 type NoMethod DnsKeyDigest
467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
468 }
469
470
471
472 type DnsKeySpec struct {
473
474
475
476
477
478
479
480
481 Algorithm string `json:"algorithm,omitempty"`
482
483 KeyLength int64 `json:"keyLength,omitempty"`
484
485
486
487
488
489
490
491
492
493 KeyType string `json:"keyType,omitempty"`
494 Kind string `json:"kind,omitempty"`
495
496
497
498
499
500 ForceSendFields []string `json:"-"`
501
502
503
504
505 NullFields []string `json:"-"`
506 }
507
508 func (s *DnsKeySpec) MarshalJSON() ([]byte, error) {
509 type NoMethod DnsKeySpec
510 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
511 }
512
513
514
515 type DnsKeysListResponse struct {
516
517 DnsKeys []*DnsKey `json:"dnsKeys,omitempty"`
518 Header *ResponseHeader `json:"header,omitempty"`
519
520 Kind string `json:"kind,omitempty"`
521
522
523
524
525
526
527
528
529
530 NextPageToken string `json:"nextPageToken,omitempty"`
531
532
533 googleapi.ServerResponse `json:"-"`
534
535
536
537
538
539 ForceSendFields []string `json:"-"`
540
541
542
543
544 NullFields []string `json:"-"`
545 }
546
547 func (s *DnsKeysListResponse) MarshalJSON() ([]byte, error) {
548 type NoMethod DnsKeysListResponse
549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
550 }
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568 type Expr struct {
569
570
571 Description string `json:"description,omitempty"`
572
573
574 Expression string `json:"expression,omitempty"`
575
576
577 Location string `json:"location,omitempty"`
578
579
580
581 Title string `json:"title,omitempty"`
582
583
584
585
586
587 ForceSendFields []string `json:"-"`
588
589
590
591
592 NullFields []string `json:"-"`
593 }
594
595 func (s *Expr) MarshalJSON() ([]byte, error) {
596 type NoMethod Expr
597 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
598 }
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616 type GoogleIamV1AuditConfig struct {
617
618 AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"`
619
620
621
622 Service string `json:"service,omitempty"`
623
624
625
626
627
628 ForceSendFields []string `json:"-"`
629
630
631
632
633 NullFields []string `json:"-"`
634 }
635
636 func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) {
637 type NoMethod GoogleIamV1AuditConfig
638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
639 }
640
641
642
643
644
645
646 type GoogleIamV1AuditLogConfig struct {
647
648
649 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
650
651
652
653
654
655
656
657 LogType string `json:"logType,omitempty"`
658
659
660
661
662
663 ForceSendFields []string `json:"-"`
664
665
666
667
668 NullFields []string `json:"-"`
669 }
670
671 func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) {
672 type NoMethod GoogleIamV1AuditLogConfig
673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
674 }
675
676
677 type GoogleIamV1Binding struct {
678
679
680
681
682
683
684
685
686 Condition *Expr `json:"condition,omitempty"`
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749 Members []string `json:"members,omitempty"`
750
751
752
753
754
755
756 Role string `json:"role,omitempty"`
757
758
759
760
761
762 ForceSendFields []string `json:"-"`
763
764
765
766
767 NullFields []string `json:"-"`
768 }
769
770 func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) {
771 type NoMethod GoogleIamV1Binding
772 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
773 }
774
775
776 type GoogleIamV1GetIamPolicyRequest struct {
777
778
779 Options *GoogleIamV1GetPolicyOptions `json:"options,omitempty"`
780
781
782
783
784
785 ForceSendFields []string `json:"-"`
786
787
788
789
790 NullFields []string `json:"-"`
791 }
792
793 func (s *GoogleIamV1GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
794 type NoMethod GoogleIamV1GetIamPolicyRequest
795 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
796 }
797
798
799 type GoogleIamV1GetPolicyOptions struct {
800
801
802
803
804
805
806
807
808
809
810
811 RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
812
813
814
815
816
817 ForceSendFields []string `json:"-"`
818
819
820
821
822 NullFields []string `json:"-"`
823 }
824
825 func (s *GoogleIamV1GetPolicyOptions) MarshalJSON() ([]byte, error) {
826 type NoMethod GoogleIamV1GetPolicyOptions
827 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
828 }
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860 type GoogleIamV1Policy struct {
861
862 AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"`
863
864
865
866
867
868
869
870
871
872 Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"`
873
874
875
876
877
878
879
880
881
882
883
884 Etag string `json:"etag,omitempty"`
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900 Version int64 `json:"version,omitempty"`
901
902
903 googleapi.ServerResponse `json:"-"`
904
905
906
907
908
909 ForceSendFields []string `json:"-"`
910
911
912
913
914 NullFields []string `json:"-"`
915 }
916
917 func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) {
918 type NoMethod GoogleIamV1Policy
919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
920 }
921
922
923 type GoogleIamV1SetIamPolicyRequest struct {
924
925
926
927
928 Policy *GoogleIamV1Policy `json:"policy,omitempty"`
929
930
931
932 UpdateMask string `json:"updateMask,omitempty"`
933
934
935
936
937
938 ForceSendFields []string `json:"-"`
939
940
941
942
943 NullFields []string `json:"-"`
944 }
945
946 func (s *GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
947 type NoMethod GoogleIamV1SetIamPolicyRequest
948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
949 }
950
951
952
953 type GoogleIamV1TestIamPermissionsRequest struct {
954
955
956
957
958 Permissions []string `json:"permissions,omitempty"`
959
960
961
962
963
964 ForceSendFields []string `json:"-"`
965
966
967
968
969 NullFields []string `json:"-"`
970 }
971
972 func (s *GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
973 type NoMethod GoogleIamV1TestIamPermissionsRequest
974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
975 }
976
977
978
979 type GoogleIamV1TestIamPermissionsResponse struct {
980
981
982 Permissions []string `json:"permissions,omitempty"`
983
984
985 googleapi.ServerResponse `json:"-"`
986
987
988
989
990
991 ForceSendFields []string `json:"-"`
992
993
994
995
996 NullFields []string `json:"-"`
997 }
998
999 func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
1000 type NoMethod GoogleIamV1TestIamPermissionsResponse
1001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1002 }
1003
1004
1005
1006
1007 type ManagedZone struct {
1008 CloudLoggingConfig *ManagedZoneCloudLoggingConfig `json:"cloudLoggingConfig,omitempty"`
1009
1010
1011 CreationTime string `json:"creationTime,omitempty"`
1012
1013
1014
1015 Description string `json:"description,omitempty"`
1016
1017 DnsName string `json:"dnsName,omitempty"`
1018
1019 DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"`
1020
1021
1022
1023 ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"`
1024
1025 Id uint64 `json:"id,omitempty,string"`
1026 Kind string `json:"kind,omitempty"`
1027
1028 Labels map[string]string `json:"labels,omitempty"`
1029
1030
1031
1032
1033 Name string `json:"name,omitempty"`
1034
1035
1036
1037
1038 NameServerSet string `json:"nameServerSet,omitempty"`
1039
1040
1041 NameServers []string `json:"nameServers,omitempty"`
1042
1043
1044
1045 PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"`
1046
1047
1048 PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"`
1049
1050
1051
1052
1053 ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"`
1054
1055
1056 ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"`
1057
1058
1059
1060
1061
1062
1063 Visibility string `json:"visibility,omitempty"`
1064
1065
1066 googleapi.ServerResponse `json:"-"`
1067
1068
1069
1070
1071
1072 ForceSendFields []string `json:"-"`
1073
1074
1075
1076
1077 NullFields []string `json:"-"`
1078 }
1079
1080 func (s *ManagedZone) MarshalJSON() ([]byte, error) {
1081 type NoMethod ManagedZone
1082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1083 }
1084
1085
1086
1087 type ManagedZoneCloudLoggingConfig struct {
1088
1089
1090 EnableLogging bool `json:"enableLogging,omitempty"`
1091 Kind string `json:"kind,omitempty"`
1092
1093
1094
1095
1096
1097 ForceSendFields []string `json:"-"`
1098
1099
1100
1101
1102 NullFields []string `json:"-"`
1103 }
1104
1105 func (s *ManagedZoneCloudLoggingConfig) MarshalJSON() ([]byte, error) {
1106 type NoMethod ManagedZoneCloudLoggingConfig
1107 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1108 }
1109
1110 type ManagedZoneDnsSecConfig struct {
1111
1112
1113 DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"`
1114 Kind string `json:"kind,omitempty"`
1115
1116
1117
1118
1119
1120
1121 NonExistence string `json:"nonExistence,omitempty"`
1122
1123
1124
1125
1126
1127
1128 State string `json:"state,omitempty"`
1129
1130
1131
1132
1133
1134 ForceSendFields []string `json:"-"`
1135
1136
1137
1138
1139 NullFields []string `json:"-"`
1140 }
1141
1142 func (s *ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) {
1143 type NoMethod ManagedZoneDnsSecConfig
1144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1145 }
1146
1147 type ManagedZoneForwardingConfig struct {
1148 Kind string `json:"kind,omitempty"`
1149
1150
1151 TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"`
1152
1153
1154
1155
1156
1157 ForceSendFields []string `json:"-"`
1158
1159
1160
1161
1162 NullFields []string `json:"-"`
1163 }
1164
1165 func (s *ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) {
1166 type NoMethod ManagedZoneForwardingConfig
1167 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1168 }
1169
1170 type ManagedZoneForwardingConfigNameServerTarget struct {
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182 ForwardingPath string `json:"forwardingPath,omitempty"`
1183
1184 Ipv4Address string `json:"ipv4Address,omitempty"`
1185
1186
1187 Ipv6Address string `json:"ipv6Address,omitempty"`
1188 Kind string `json:"kind,omitempty"`
1189
1190
1191
1192
1193
1194 ForceSendFields []string `json:"-"`
1195
1196
1197
1198
1199 NullFields []string `json:"-"`
1200 }
1201
1202 func (s *ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) {
1203 type NoMethod ManagedZoneForwardingConfigNameServerTarget
1204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1205 }
1206
1207 type ManagedZoneOperationsListResponse struct {
1208 Header *ResponseHeader `json:"header,omitempty"`
1209
1210 Kind string `json:"kind,omitempty"`
1211
1212
1213
1214
1215
1216
1217
1218
1219 NextPageToken string `json:"nextPageToken,omitempty"`
1220
1221 Operations []*Operation `json:"operations,omitempty"`
1222
1223
1224 googleapi.ServerResponse `json:"-"`
1225
1226
1227
1228
1229
1230 ForceSendFields []string `json:"-"`
1231
1232
1233
1234
1235 NullFields []string `json:"-"`
1236 }
1237
1238 func (s *ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) {
1239 type NoMethod ManagedZoneOperationsListResponse
1240 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1241 }
1242
1243 type ManagedZonePeeringConfig struct {
1244 Kind string `json:"kind,omitempty"`
1245
1246 TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"`
1247
1248
1249
1250
1251
1252 ForceSendFields []string `json:"-"`
1253
1254
1255
1256
1257 NullFields []string `json:"-"`
1258 }
1259
1260 func (s *ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) {
1261 type NoMethod ManagedZonePeeringConfig
1262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1263 }
1264
1265 type ManagedZonePeeringConfigTargetNetwork struct {
1266
1267
1268
1269
1270
1271 DeactivateTime string `json:"deactivateTime,omitempty"`
1272 Kind string `json:"kind,omitempty"`
1273
1274
1275
1276 NetworkUrl string `json:"networkUrl,omitempty"`
1277
1278
1279
1280
1281
1282 ForceSendFields []string `json:"-"`
1283
1284
1285
1286
1287 NullFields []string `json:"-"`
1288 }
1289
1290 func (s *ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) {
1291 type NoMethod ManagedZonePeeringConfigTargetNetwork
1292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1293 }
1294
1295 type ManagedZonePrivateVisibilityConfig struct {
1296
1297
1298 GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"`
1299 Kind string `json:"kind,omitempty"`
1300
1301 Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"`
1302
1303
1304
1305
1306
1307 ForceSendFields []string `json:"-"`
1308
1309
1310
1311
1312 NullFields []string `json:"-"`
1313 }
1314
1315 func (s *ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) {
1316 type NoMethod ManagedZonePrivateVisibilityConfig
1317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1318 }
1319
1320 type ManagedZonePrivateVisibilityConfigGKECluster struct {
1321
1322
1323
1324
1325
1326 GkeClusterName string `json:"gkeClusterName,omitempty"`
1327 Kind string `json:"kind,omitempty"`
1328
1329
1330
1331
1332
1333 ForceSendFields []string `json:"-"`
1334
1335
1336
1337
1338 NullFields []string `json:"-"`
1339 }
1340
1341 func (s *ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) {
1342 type NoMethod ManagedZonePrivateVisibilityConfigGKECluster
1343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1344 }
1345
1346 type ManagedZonePrivateVisibilityConfigNetwork struct {
1347 Kind string `json:"kind,omitempty"`
1348
1349
1350
1351 NetworkUrl string `json:"networkUrl,omitempty"`
1352
1353
1354
1355
1356
1357 ForceSendFields []string `json:"-"`
1358
1359
1360
1361
1362 NullFields []string `json:"-"`
1363 }
1364
1365 func (s *ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) {
1366 type NoMethod ManagedZonePrivateVisibilityConfigNetwork
1367 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1368 }
1369
1370 type ManagedZoneReverseLookupConfig struct {
1371 Kind string `json:"kind,omitempty"`
1372
1373
1374
1375
1376
1377 ForceSendFields []string `json:"-"`
1378
1379
1380
1381
1382 NullFields []string `json:"-"`
1383 }
1384
1385 func (s *ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) {
1386 type NoMethod ManagedZoneReverseLookupConfig
1387 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1388 }
1389
1390
1391
1392 type ManagedZoneServiceDirectoryConfig struct {
1393 Kind string `json:"kind,omitempty"`
1394
1395
1396 Namespace *ManagedZoneServiceDirectoryConfigNamespace `json:"namespace,omitempty"`
1397
1398
1399
1400
1401
1402 ForceSendFields []string `json:"-"`
1403
1404
1405
1406
1407 NullFields []string `json:"-"`
1408 }
1409
1410 func (s *ManagedZoneServiceDirectoryConfig) MarshalJSON() ([]byte, error) {
1411 type NoMethod ManagedZoneServiceDirectoryConfig
1412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1413 }
1414
1415 type ManagedZoneServiceDirectoryConfigNamespace struct {
1416
1417
1418
1419 DeletionTime string `json:"deletionTime,omitempty"`
1420 Kind string `json:"kind,omitempty"`
1421
1422
1423
1424 NamespaceUrl string `json:"namespaceUrl,omitempty"`
1425
1426
1427
1428
1429
1430 ForceSendFields []string `json:"-"`
1431
1432
1433
1434
1435 NullFields []string `json:"-"`
1436 }
1437
1438 func (s *ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, error) {
1439 type NoMethod ManagedZoneServiceDirectoryConfigNamespace
1440 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1441 }
1442
1443 type ManagedZonesListResponse struct {
1444 Header *ResponseHeader `json:"header,omitempty"`
1445
1446 Kind string `json:"kind,omitempty"`
1447
1448 ManagedZones []*ManagedZone `json:"managedZones,omitempty"`
1449
1450
1451
1452
1453
1454
1455
1456
1457 NextPageToken string `json:"nextPageToken,omitempty"`
1458
1459
1460 googleapi.ServerResponse `json:"-"`
1461
1462
1463
1464
1465
1466 ForceSendFields []string `json:"-"`
1467
1468
1469
1470
1471 NullFields []string `json:"-"`
1472 }
1473
1474 func (s *ManagedZonesListResponse) MarshalJSON() ([]byte, error) {
1475 type NoMethod ManagedZonesListResponse
1476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1477 }
1478
1479
1480
1481
1482
1483
1484 type Operation struct {
1485
1486
1487 DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"`
1488
1489
1490
1491
1492 Id string `json:"id,omitempty"`
1493 Kind string `json:"kind,omitempty"`
1494
1495
1496 StartTime string `json:"startTime,omitempty"`
1497
1498
1499
1500
1501
1502
1503
1504
1505 Status string `json:"status,omitempty"`
1506
1507
1508 Type string `json:"type,omitempty"`
1509
1510
1511
1512 User string `json:"user,omitempty"`
1513
1514
1515 ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"`
1516
1517
1518 googleapi.ServerResponse `json:"-"`
1519
1520
1521
1522
1523
1524 ForceSendFields []string `json:"-"`
1525
1526
1527
1528
1529 NullFields []string `json:"-"`
1530 }
1531
1532 func (s *Operation) MarshalJSON() ([]byte, error) {
1533 type NoMethod Operation
1534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1535 }
1536
1537 type OperationDnsKeyContext struct {
1538
1539 NewValue *DnsKey `json:"newValue,omitempty"`
1540
1541 OldValue *DnsKey `json:"oldValue,omitempty"`
1542
1543
1544
1545
1546
1547 ForceSendFields []string `json:"-"`
1548
1549
1550
1551
1552 NullFields []string `json:"-"`
1553 }
1554
1555 func (s *OperationDnsKeyContext) MarshalJSON() ([]byte, error) {
1556 type NoMethod OperationDnsKeyContext
1557 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1558 }
1559
1560 type OperationManagedZoneContext struct {
1561
1562 NewValue *ManagedZone `json:"newValue,omitempty"`
1563
1564 OldValue *ManagedZone `json:"oldValue,omitempty"`
1565
1566
1567
1568
1569
1570 ForceSendFields []string `json:"-"`
1571
1572
1573
1574
1575 NullFields []string `json:"-"`
1576 }
1577
1578 func (s *OperationManagedZoneContext) MarshalJSON() ([]byte, error) {
1579 type NoMethod OperationManagedZoneContext
1580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1581 }
1582
1583 type PoliciesListResponse struct {
1584 Header *ResponseHeader `json:"header,omitempty"`
1585
1586 Kind string `json:"kind,omitempty"`
1587
1588
1589
1590
1591
1592
1593
1594
1595 NextPageToken string `json:"nextPageToken,omitempty"`
1596
1597 Policies []*Policy `json:"policies,omitempty"`
1598
1599
1600 googleapi.ServerResponse `json:"-"`
1601
1602
1603
1604
1605
1606 ForceSendFields []string `json:"-"`
1607
1608
1609
1610
1611 NullFields []string `json:"-"`
1612 }
1613
1614 func (s *PoliciesListResponse) MarshalJSON() ([]byte, error) {
1615 type NoMethod PoliciesListResponse
1616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1617 }
1618
1619 type PoliciesPatchResponse struct {
1620 Header *ResponseHeader `json:"header,omitempty"`
1621 Policy *Policy `json:"policy,omitempty"`
1622
1623
1624 googleapi.ServerResponse `json:"-"`
1625
1626
1627
1628
1629
1630 ForceSendFields []string `json:"-"`
1631
1632
1633
1634
1635 NullFields []string `json:"-"`
1636 }
1637
1638 func (s *PoliciesPatchResponse) MarshalJSON() ([]byte, error) {
1639 type NoMethod PoliciesPatchResponse
1640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1641 }
1642
1643 type PoliciesUpdateResponse struct {
1644 Header *ResponseHeader `json:"header,omitempty"`
1645 Policy *Policy `json:"policy,omitempty"`
1646
1647
1648 googleapi.ServerResponse `json:"-"`
1649
1650
1651
1652
1653
1654 ForceSendFields []string `json:"-"`
1655
1656
1657
1658
1659 NullFields []string `json:"-"`
1660 }
1661
1662 func (s *PoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
1663 type NoMethod PoliciesUpdateResponse
1664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1665 }
1666
1667
1668
1669 type Policy struct {
1670
1671
1672
1673
1674 AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"`
1675
1676
1677
1678 Description string `json:"description,omitempty"`
1679
1680
1681
1682
1683 EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"`
1684
1685
1686 EnableLogging bool `json:"enableLogging,omitempty"`
1687
1688 Id uint64 `json:"id,omitempty,string"`
1689 Kind string `json:"kind,omitempty"`
1690
1691 Name string `json:"name,omitempty"`
1692
1693
1694 Networks []*PolicyNetwork `json:"networks,omitempty"`
1695
1696
1697 googleapi.ServerResponse `json:"-"`
1698
1699
1700
1701
1702
1703 ForceSendFields []string `json:"-"`
1704
1705
1706
1707
1708 NullFields []string `json:"-"`
1709 }
1710
1711 func (s *Policy) MarshalJSON() ([]byte, error) {
1712 type NoMethod Policy
1713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1714 }
1715
1716 type PolicyAlternativeNameServerConfig struct {
1717 Kind string `json:"kind,omitempty"`
1718
1719
1720
1721
1722 TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"`
1723
1724
1725
1726
1727
1728 ForceSendFields []string `json:"-"`
1729
1730
1731
1732
1733 NullFields []string `json:"-"`
1734 }
1735
1736 func (s *PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) {
1737 type NoMethod PolicyAlternativeNameServerConfig
1738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1739 }
1740
1741 type PolicyAlternativeNameServerConfigTargetNameServer struct {
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753 ForwardingPath string `json:"forwardingPath,omitempty"`
1754
1755 Ipv4Address string `json:"ipv4Address,omitempty"`
1756
1757
1758 Ipv6Address string `json:"ipv6Address,omitempty"`
1759 Kind string `json:"kind,omitempty"`
1760
1761
1762
1763
1764
1765 ForceSendFields []string `json:"-"`
1766
1767
1768
1769
1770 NullFields []string `json:"-"`
1771 }
1772
1773 func (s *PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) {
1774 type NoMethod PolicyAlternativeNameServerConfigTargetNameServer
1775 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1776 }
1777
1778 type PolicyNetwork struct {
1779 Kind string `json:"kind,omitempty"`
1780
1781
1782
1783 NetworkUrl string `json:"networkUrl,omitempty"`
1784
1785
1786
1787
1788
1789 ForceSendFields []string `json:"-"`
1790
1791
1792
1793
1794 NullFields []string `json:"-"`
1795 }
1796
1797 func (s *PolicyNetwork) MarshalJSON() ([]byte, error) {
1798 type NoMethod PolicyNetwork
1799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1800 }
1801
1802
1803
1804
1805 type Project struct {
1806
1807 Id string `json:"id,omitempty"`
1808 Kind string `json:"kind,omitempty"`
1809
1810
1811 Number uint64 `json:"number,omitempty,string"`
1812
1813 Quota *Quota `json:"quota,omitempty"`
1814
1815
1816 googleapi.ServerResponse `json:"-"`
1817
1818
1819
1820
1821
1822 ForceSendFields []string `json:"-"`
1823
1824
1825
1826
1827 NullFields []string `json:"-"`
1828 }
1829
1830 func (s *Project) MarshalJSON() ([]byte, error) {
1831 type NoMethod Project
1832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1833 }
1834
1835
1836 type Quota struct {
1837
1838 DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"`
1839
1840
1841 GkeClustersPerManagedZone int64 `json:"gkeClustersPerManagedZone,omitempty"`
1842
1843 GkeClustersPerPolicy int64 `json:"gkeClustersPerPolicy,omitempty"`
1844
1845
1846 GkeClustersPerResponsePolicy int64 `json:"gkeClustersPerResponsePolicy,omitempty"`
1847
1848 ItemsPerRoutingPolicy int64 `json:"itemsPerRoutingPolicy,omitempty"`
1849 Kind string `json:"kind,omitempty"`
1850
1851 ManagedZones int64 `json:"managedZones,omitempty"`
1852
1853
1854 ManagedZonesPerGkeCluster int64 `json:"managedZonesPerGkeCluster,omitempty"`
1855
1856
1857 ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"`
1858
1859
1860 NameserversPerDelegation int64 `json:"nameserversPerDelegation,omitempty"`
1861
1862
1863 NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"`
1864
1865 NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"`
1866
1867
1868 NetworksPerResponsePolicy int64 `json:"networksPerResponsePolicy,omitempty"`
1869
1870
1871 PeeringZonesPerTargetNetwork int64 `json:"peeringZonesPerTargetNetwork,omitempty"`
1872
1873 Policies int64 `json:"policies,omitempty"`
1874
1875
1876 ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"`
1877
1878 ResponsePolicies int64 `json:"responsePolicies,omitempty"`
1879
1880
1881 ResponsePolicyRulesPerResponsePolicy int64 `json:"responsePolicyRulesPerResponsePolicy,omitempty"`
1882
1883
1884 RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"`
1885
1886
1887 RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"`
1888
1889
1890 RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"`
1891
1892
1893 TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"`
1894
1895
1896 TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"`
1897
1898
1899 TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"`
1900
1901
1902 WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"`
1903
1904
1905
1906
1907
1908 ForceSendFields []string `json:"-"`
1909
1910
1911
1912
1913 NullFields []string `json:"-"`
1914 }
1915
1916 func (s *Quota) MarshalJSON() ([]byte, error) {
1917 type NoMethod Quota
1918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1919 }
1920
1921
1922
1923
1924 type RRSetRoutingPolicy struct {
1925 Geo *RRSetRoutingPolicyGeoPolicy `json:"geo,omitempty"`
1926 GeoPolicy *RRSetRoutingPolicyGeoPolicy `json:"geoPolicy,omitempty"`
1927 Kind string `json:"kind,omitempty"`
1928 PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"`
1929 Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"`
1930 WrrPolicy *RRSetRoutingPolicyWrrPolicy `json:"wrrPolicy,omitempty"`
1931
1932
1933
1934
1935
1936 ForceSendFields []string `json:"-"`
1937
1938
1939
1940
1941 NullFields []string `json:"-"`
1942 }
1943
1944 func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
1945 type NoMethod RRSetRoutingPolicy
1946 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1947 }
1948
1949
1950
1951 type RRSetRoutingPolicyGeoPolicy struct {
1952
1953
1954
1955
1956
1957
1958
1959 EnableFencing bool `json:"enableFencing,omitempty"`
1960
1961
1962 Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"`
1963 Kind string `json:"kind,omitempty"`
1964
1965
1966
1967
1968
1969 ForceSendFields []string `json:"-"`
1970
1971
1972
1973
1974 NullFields []string `json:"-"`
1975 }
1976
1977 func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) {
1978 type NoMethod RRSetRoutingPolicyGeoPolicy
1979 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1980 }
1981
1982
1983
1984 type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct {
1985
1986
1987
1988 HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
1989 Kind string `json:"kind,omitempty"`
1990
1991
1992
1993 Location string `json:"location,omitempty"`
1994 Rrdatas []string `json:"rrdatas,omitempty"`
1995
1996
1997
1998 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
1999
2000
2001
2002
2003
2004 ForceSendFields []string `json:"-"`
2005
2006
2007
2008
2009 NullFields []string `json:"-"`
2010 }
2011
2012 func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) {
2013 type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem
2014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2015 }
2016
2017
2018
2019
2020
2021 type RRSetRoutingPolicyHealthCheckTargets struct {
2022
2023
2024 InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"`
2025
2026
2027
2028
2029
2030 ForceSendFields []string `json:"-"`
2031
2032
2033
2034
2035 NullFields []string `json:"-"`
2036 }
2037
2038 func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) {
2039 type NoMethod RRSetRoutingPolicyHealthCheckTargets
2040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2041 }
2042
2043
2044
2045 type RRSetRoutingPolicyLoadBalancerTarget struct {
2046
2047 IpAddress string `json:"ipAddress,omitempty"`
2048
2049
2050
2051
2052
2053
2054 IpProtocol string `json:"ipProtocol,omitempty"`
2055 Kind string `json:"kind,omitempty"`
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068 LoadBalancerType string `json:"loadBalancerType,omitempty"`
2069
2070
2071
2072
2073 NetworkUrl string `json:"networkUrl,omitempty"`
2074
2075 Port string `json:"port,omitempty"`
2076
2077 Project string `json:"project,omitempty"`
2078
2079 Region string `json:"region,omitempty"`
2080
2081
2082
2083
2084
2085 ForceSendFields []string `json:"-"`
2086
2087
2088
2089
2090 NullFields []string `json:"-"`
2091 }
2092
2093 func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) {
2094 type NoMethod RRSetRoutingPolicyLoadBalancerTarget
2095 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2096 }
2097
2098
2099
2100
2101
2102 type RRSetRoutingPolicyPrimaryBackupPolicy struct {
2103
2104
2105
2106 BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"`
2107 Kind string `json:"kind,omitempty"`
2108
2109
2110
2111 PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"`
2112
2113
2114 TrickleTraffic float64 `json:"trickleTraffic,omitempty"`
2115
2116
2117
2118
2119
2120 ForceSendFields []string `json:"-"`
2121
2122
2123
2124
2125 NullFields []string `json:"-"`
2126 }
2127
2128 func (s *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) {
2129 type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
2130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2131 }
2132
2133 func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error {
2134 type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
2135 var s1 struct {
2136 TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"`
2137 *NoMethod
2138 }
2139 s1.NoMethod = (*NoMethod)(s)
2140 if err := json.Unmarshal(data, &s1); err != nil {
2141 return err
2142 }
2143 s.TrickleTraffic = float64(s1.TrickleTraffic)
2144 return nil
2145 }
2146
2147
2148
2149 type RRSetRoutingPolicyWrrPolicy struct {
2150 Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"`
2151 Kind string `json:"kind,omitempty"`
2152
2153
2154
2155
2156
2157 ForceSendFields []string `json:"-"`
2158
2159
2160
2161
2162 NullFields []string `json:"-"`
2163 }
2164
2165 func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) {
2166 type NoMethod RRSetRoutingPolicyWrrPolicy
2167 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2168 }
2169
2170
2171
2172 type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct {
2173
2174
2175
2176
2177
2178 HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
2179 Kind string `json:"kind,omitempty"`
2180 Rrdatas []string `json:"rrdatas,omitempty"`
2181
2182
2183
2184 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
2185
2186
2187
2188
2189 Weight float64 `json:"weight,omitempty"`
2190
2191
2192
2193
2194
2195 ForceSendFields []string `json:"-"`
2196
2197
2198
2199
2200 NullFields []string `json:"-"`
2201 }
2202
2203 func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) {
2204 type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
2205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2206 }
2207
2208 func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error {
2209 type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
2210 var s1 struct {
2211 Weight gensupport.JSONFloat64 `json:"weight"`
2212 *NoMethod
2213 }
2214 s1.NoMethod = (*NoMethod)(s)
2215 if err := json.Unmarshal(data, &s1); err != nil {
2216 return err
2217 }
2218 s.Weight = float64(s1.Weight)
2219 return nil
2220 }
2221
2222
2223 type ResourceRecordSet struct {
2224 Kind string `json:"kind,omitempty"`
2225
2226 Name string `json:"name,omitempty"`
2227
2228
2229
2230
2231 RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
2232
2233
2234 Rrdatas []string `json:"rrdatas,omitempty"`
2235
2236 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
2237
2238
2239 Ttl int64 `json:"ttl,omitempty"`
2240
2241
2242 Type string `json:"type,omitempty"`
2243
2244
2245 googleapi.ServerResponse `json:"-"`
2246
2247
2248
2249
2250
2251 ForceSendFields []string `json:"-"`
2252
2253
2254
2255
2256 NullFields []string `json:"-"`
2257 }
2258
2259 func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
2260 type NoMethod ResourceRecordSet
2261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2262 }
2263
2264 type ResourceRecordSetsListResponse struct {
2265 Header *ResponseHeader `json:"header,omitempty"`
2266
2267 Kind string `json:"kind,omitempty"`
2268
2269
2270
2271
2272
2273
2274
2275
2276 NextPageToken string `json:"nextPageToken,omitempty"`
2277
2278 Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
2279
2280
2281 googleapi.ServerResponse `json:"-"`
2282
2283
2284
2285
2286
2287 ForceSendFields []string `json:"-"`
2288
2289
2290
2291
2292 NullFields []string `json:"-"`
2293 }
2294
2295 func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
2296 type NoMethod ResourceRecordSetsListResponse
2297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2298 }
2299
2300
2301 type ResponseHeader struct {
2302
2303
2304
2305 OperationId string `json:"operationId,omitempty"`
2306
2307
2308
2309
2310
2311 ForceSendFields []string `json:"-"`
2312
2313
2314
2315
2316 NullFields []string `json:"-"`
2317 }
2318
2319 func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
2320 type NoMethod ResponseHeader
2321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2322 }
2323
2324 type ResponsePoliciesListResponse struct {
2325 Header *ResponseHeader `json:"header,omitempty"`
2326
2327
2328
2329
2330
2331
2332
2333
2334 NextPageToken string `json:"nextPageToken,omitempty"`
2335
2336 ResponsePolicies []*ResponsePolicy `json:"responsePolicies,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 *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) {
2354 type NoMethod ResponsePoliciesListResponse
2355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2356 }
2357
2358 type ResponsePoliciesPatchResponse struct {
2359 Header *ResponseHeader `json:"header,omitempty"`
2360 ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
2361
2362
2363 googleapi.ServerResponse `json:"-"`
2364
2365
2366
2367
2368
2369 ForceSendFields []string `json:"-"`
2370
2371
2372
2373
2374 NullFields []string `json:"-"`
2375 }
2376
2377 func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) {
2378 type NoMethod ResponsePoliciesPatchResponse
2379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2380 }
2381
2382 type ResponsePoliciesUpdateResponse struct {
2383 Header *ResponseHeader `json:"header,omitempty"`
2384 ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
2385
2386
2387 googleapi.ServerResponse `json:"-"`
2388
2389
2390
2391
2392
2393 ForceSendFields []string `json:"-"`
2394
2395
2396
2397
2398 NullFields []string `json:"-"`
2399 }
2400
2401 func (s *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
2402 type NoMethod ResponsePoliciesUpdateResponse
2403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2404 }
2405
2406
2407
2408 type ResponsePolicy struct {
2409
2410 Description string `json:"description,omitempty"`
2411
2412
2413 GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"`
2414
2415 Id int64 `json:"id,omitempty,string"`
2416 Kind string `json:"kind,omitempty"`
2417
2418 Labels map[string]string `json:"labels,omitempty"`
2419
2420
2421 Networks []*ResponsePolicyNetwork `json:"networks,omitempty"`
2422
2423 ResponsePolicyName string `json:"responsePolicyName,omitempty"`
2424
2425
2426 googleapi.ServerResponse `json:"-"`
2427
2428
2429
2430
2431
2432 ForceSendFields []string `json:"-"`
2433
2434
2435
2436
2437 NullFields []string `json:"-"`
2438 }
2439
2440 func (s *ResponsePolicy) MarshalJSON() ([]byte, error) {
2441 type NoMethod ResponsePolicy
2442 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2443 }
2444
2445 type ResponsePolicyGKECluster struct {
2446
2447
2448
2449
2450
2451 GkeClusterName string `json:"gkeClusterName,omitempty"`
2452 Kind string `json:"kind,omitempty"`
2453
2454
2455
2456
2457
2458 ForceSendFields []string `json:"-"`
2459
2460
2461
2462
2463 NullFields []string `json:"-"`
2464 }
2465
2466 func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) {
2467 type NoMethod ResponsePolicyGKECluster
2468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2469 }
2470
2471 type ResponsePolicyNetwork struct {
2472 Kind string `json:"kind,omitempty"`
2473
2474
2475
2476 NetworkUrl string `json:"networkUrl,omitempty"`
2477
2478
2479
2480
2481
2482 ForceSendFields []string `json:"-"`
2483
2484
2485
2486
2487 NullFields []string `json:"-"`
2488 }
2489
2490 func (s *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) {
2491 type NoMethod ResponsePolicyNetwork
2492 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2493 }
2494
2495
2496
2497
2498
2499
2500 type ResponsePolicyRule struct {
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517 Behavior string `json:"behavior,omitempty"`
2518
2519
2520 DnsName string `json:"dnsName,omitempty"`
2521 Kind string `json:"kind,omitempty"`
2522
2523
2524
2525
2526 LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"`
2527
2528
2529 RuleName string `json:"ruleName,omitempty"`
2530
2531
2532 googleapi.ServerResponse `json:"-"`
2533
2534
2535
2536
2537
2538 ForceSendFields []string `json:"-"`
2539
2540
2541
2542
2543 NullFields []string `json:"-"`
2544 }
2545
2546 func (s *ResponsePolicyRule) MarshalJSON() ([]byte, error) {
2547 type NoMethod ResponsePolicyRule
2548 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2549 }
2550
2551 type ResponsePolicyRuleLocalData struct {
2552
2553
2554 LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"`
2555
2556
2557
2558
2559
2560 ForceSendFields []string `json:"-"`
2561
2562
2563
2564
2565 NullFields []string `json:"-"`
2566 }
2567
2568 func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) {
2569 type NoMethod ResponsePolicyRuleLocalData
2570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2571 }
2572
2573 type ResponsePolicyRulesListResponse struct {
2574 Header *ResponseHeader `json:"header,omitempty"`
2575
2576
2577
2578
2579
2580
2581
2582
2583 NextPageToken string `json:"nextPageToken,omitempty"`
2584
2585 ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"`
2586
2587
2588 googleapi.ServerResponse `json:"-"`
2589
2590
2591
2592
2593
2594 ForceSendFields []string `json:"-"`
2595
2596
2597
2598
2599 NullFields []string `json:"-"`
2600 }
2601
2602 func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) {
2603 type NoMethod ResponsePolicyRulesListResponse
2604 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2605 }
2606
2607 type ResponsePolicyRulesPatchResponse struct {
2608 Header *ResponseHeader `json:"header,omitempty"`
2609 ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
2610
2611
2612 googleapi.ServerResponse `json:"-"`
2613
2614
2615
2616
2617
2618 ForceSendFields []string `json:"-"`
2619
2620
2621
2622
2623 NullFields []string `json:"-"`
2624 }
2625
2626 func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) {
2627 type NoMethod ResponsePolicyRulesPatchResponse
2628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2629 }
2630
2631 type ResponsePolicyRulesUpdateResponse struct {
2632 Header *ResponseHeader `json:"header,omitempty"`
2633 ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
2634
2635
2636 googleapi.ServerResponse `json:"-"`
2637
2638
2639
2640
2641
2642 ForceSendFields []string `json:"-"`
2643
2644
2645
2646
2647 NullFields []string `json:"-"`
2648 }
2649
2650 func (s *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) {
2651 type NoMethod ResponsePolicyRulesUpdateResponse
2652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2653 }
2654
2655 type ChangesCreateCall struct {
2656 s *Service
2657 project string
2658 managedZone string
2659 change *Change
2660 urlParams_ gensupport.URLParams
2661 ctx_ context.Context
2662 header_ http.Header
2663 }
2664
2665
2666
2667
2668
2669
2670 func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
2671 c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2672 c.project = project
2673 c.managedZone = managedZone
2674 c.change = change
2675 return c
2676 }
2677
2678
2679
2680
2681 func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
2682 c.urlParams_.Set("clientOperationId", clientOperationId)
2683 return c
2684 }
2685
2686
2687
2688
2689 func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
2690 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2691 return c
2692 }
2693
2694
2695 func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
2696 c.ctx_ = ctx
2697 return c
2698 }
2699
2700
2701
2702 func (c *ChangesCreateCall) Header() http.Header {
2703 if c.header_ == nil {
2704 c.header_ = make(http.Header)
2705 }
2706 return c.header_
2707 }
2708
2709 func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
2710 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2711 var body io.Reader = nil
2712 body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
2713 if err != nil {
2714 return nil, err
2715 }
2716 c.urlParams_.Set("alt", alt)
2717 c.urlParams_.Set("prettyPrint", "false")
2718 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes")
2719 urls += "?" + c.urlParams_.Encode()
2720 req, err := http.NewRequest("POST", urls, body)
2721 if err != nil {
2722 return nil, err
2723 }
2724 req.Header = reqHeaders
2725 googleapi.Expand(req.URL, map[string]string{
2726 "project": c.project,
2727 "managedZone": c.managedZone,
2728 })
2729 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2730 }
2731
2732
2733
2734
2735
2736
2737 func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
2738 gensupport.SetOptions(c.urlParams_, opts...)
2739 res, err := c.doRequest("json")
2740 if res != nil && res.StatusCode == http.StatusNotModified {
2741 if res.Body != nil {
2742 res.Body.Close()
2743 }
2744 return nil, gensupport.WrapError(&googleapi.Error{
2745 Code: res.StatusCode,
2746 Header: res.Header,
2747 })
2748 }
2749 if err != nil {
2750 return nil, err
2751 }
2752 defer googleapi.CloseBody(res)
2753 if err := googleapi.CheckResponse(res); err != nil {
2754 return nil, gensupport.WrapError(err)
2755 }
2756 ret := &Change{
2757 ServerResponse: googleapi.ServerResponse{
2758 Header: res.Header,
2759 HTTPStatusCode: res.StatusCode,
2760 },
2761 }
2762 target := &ret
2763 if err := gensupport.DecodeResponse(target, res); err != nil {
2764 return nil, err
2765 }
2766 return ret, nil
2767 }
2768
2769 type ChangesGetCall struct {
2770 s *Service
2771 project string
2772 managedZone string
2773 changeId string
2774 urlParams_ gensupport.URLParams
2775 ifNoneMatch_ string
2776 ctx_ context.Context
2777 header_ http.Header
2778 }
2779
2780
2781
2782
2783
2784
2785
2786
2787 func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
2788 c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2789 c.project = project
2790 c.managedZone = managedZone
2791 c.changeId = changeId
2792 return c
2793 }
2794
2795
2796
2797
2798 func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
2799 c.urlParams_.Set("clientOperationId", clientOperationId)
2800 return c
2801 }
2802
2803
2804
2805
2806 func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
2807 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2808 return c
2809 }
2810
2811
2812
2813
2814 func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
2815 c.ifNoneMatch_ = entityTag
2816 return c
2817 }
2818
2819
2820 func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
2821 c.ctx_ = ctx
2822 return c
2823 }
2824
2825
2826
2827 func (c *ChangesGetCall) Header() http.Header {
2828 if c.header_ == nil {
2829 c.header_ = make(http.Header)
2830 }
2831 return c.header_
2832 }
2833
2834 func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
2835 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2836 if c.ifNoneMatch_ != "" {
2837 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2838 }
2839 var body io.Reader = nil
2840 c.urlParams_.Set("alt", alt)
2841 c.urlParams_.Set("prettyPrint", "false")
2842 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes/{changeId}")
2843 urls += "?" + c.urlParams_.Encode()
2844 req, err := http.NewRequest("GET", urls, body)
2845 if err != nil {
2846 return nil, err
2847 }
2848 req.Header = reqHeaders
2849 googleapi.Expand(req.URL, map[string]string{
2850 "project": c.project,
2851 "managedZone": c.managedZone,
2852 "changeId": c.changeId,
2853 })
2854 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2855 }
2856
2857
2858
2859
2860
2861
2862 func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
2863 gensupport.SetOptions(c.urlParams_, opts...)
2864 res, err := c.doRequest("json")
2865 if res != nil && res.StatusCode == http.StatusNotModified {
2866 if res.Body != nil {
2867 res.Body.Close()
2868 }
2869 return nil, gensupport.WrapError(&googleapi.Error{
2870 Code: res.StatusCode,
2871 Header: res.Header,
2872 })
2873 }
2874 if err != nil {
2875 return nil, err
2876 }
2877 defer googleapi.CloseBody(res)
2878 if err := googleapi.CheckResponse(res); err != nil {
2879 return nil, gensupport.WrapError(err)
2880 }
2881 ret := &Change{
2882 ServerResponse: googleapi.ServerResponse{
2883 Header: res.Header,
2884 HTTPStatusCode: res.StatusCode,
2885 },
2886 }
2887 target := &ret
2888 if err := gensupport.DecodeResponse(target, res); err != nil {
2889 return nil, err
2890 }
2891 return ret, nil
2892 }
2893
2894 type ChangesListCall struct {
2895 s *Service
2896 project string
2897 managedZone string
2898 urlParams_ gensupport.URLParams
2899 ifNoneMatch_ string
2900 ctx_ context.Context
2901 header_ http.Header
2902 }
2903
2904
2905
2906
2907
2908
2909 func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
2910 c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2911 c.project = project
2912 c.managedZone = managedZone
2913 return c
2914 }
2915
2916
2917
2918
2919 func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
2920 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
2921 return c
2922 }
2923
2924
2925
2926
2927 func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
2928 c.urlParams_.Set("pageToken", pageToken)
2929 return c
2930 }
2931
2932
2933
2934
2935
2936
2937
2938 func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
2939 c.urlParams_.Set("sortBy", sortBy)
2940 return c
2941 }
2942
2943
2944
2945 func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
2946 c.urlParams_.Set("sortOrder", sortOrder)
2947 return c
2948 }
2949
2950
2951
2952
2953 func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
2954 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2955 return c
2956 }
2957
2958
2959
2960
2961 func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
2962 c.ifNoneMatch_ = entityTag
2963 return c
2964 }
2965
2966
2967 func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
2968 c.ctx_ = ctx
2969 return c
2970 }
2971
2972
2973
2974 func (c *ChangesListCall) Header() http.Header {
2975 if c.header_ == nil {
2976 c.header_ = make(http.Header)
2977 }
2978 return c.header_
2979 }
2980
2981 func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
2982 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2983 if c.ifNoneMatch_ != "" {
2984 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2985 }
2986 var body io.Reader = nil
2987 c.urlParams_.Set("alt", alt)
2988 c.urlParams_.Set("prettyPrint", "false")
2989 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/changes")
2990 urls += "?" + c.urlParams_.Encode()
2991 req, err := http.NewRequest("GET", urls, body)
2992 if err != nil {
2993 return nil, err
2994 }
2995 req.Header = reqHeaders
2996 googleapi.Expand(req.URL, map[string]string{
2997 "project": c.project,
2998 "managedZone": c.managedZone,
2999 })
3000 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3001 }
3002
3003
3004
3005
3006
3007
3008
3009 func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
3010 gensupport.SetOptions(c.urlParams_, opts...)
3011 res, err := c.doRequest("json")
3012 if res != nil && res.StatusCode == http.StatusNotModified {
3013 if res.Body != nil {
3014 res.Body.Close()
3015 }
3016 return nil, gensupport.WrapError(&googleapi.Error{
3017 Code: res.StatusCode,
3018 Header: res.Header,
3019 })
3020 }
3021 if err != nil {
3022 return nil, err
3023 }
3024 defer googleapi.CloseBody(res)
3025 if err := googleapi.CheckResponse(res); err != nil {
3026 return nil, gensupport.WrapError(err)
3027 }
3028 ret := &ChangesListResponse{
3029 ServerResponse: googleapi.ServerResponse{
3030 Header: res.Header,
3031 HTTPStatusCode: res.StatusCode,
3032 },
3033 }
3034 target := &ret
3035 if err := gensupport.DecodeResponse(target, res); err != nil {
3036 return nil, err
3037 }
3038 return ret, nil
3039 }
3040
3041
3042
3043
3044 func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
3045 c.ctx_ = ctx
3046 defer c.PageToken(c.urlParams_.Get("pageToken"))
3047 for {
3048 x, err := c.Do()
3049 if err != nil {
3050 return err
3051 }
3052 if err := f(x); err != nil {
3053 return err
3054 }
3055 if x.NextPageToken == "" {
3056 return nil
3057 }
3058 c.PageToken(x.NextPageToken)
3059 }
3060 }
3061
3062 type DnsKeysGetCall struct {
3063 s *Service
3064 project string
3065 managedZone string
3066 dnsKeyId string
3067 urlParams_ gensupport.URLParams
3068 ifNoneMatch_ string
3069 ctx_ context.Context
3070 header_ http.Header
3071 }
3072
3073
3074
3075
3076
3077
3078
3079 func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
3080 c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3081 c.project = project
3082 c.managedZone = managedZone
3083 c.dnsKeyId = dnsKeyId
3084 return c
3085 }
3086
3087
3088
3089
3090 func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
3091 c.urlParams_.Set("clientOperationId", clientOperationId)
3092 return c
3093 }
3094
3095
3096
3097
3098 func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
3099 c.urlParams_.Set("digestType", digestType)
3100 return c
3101 }
3102
3103
3104
3105
3106 func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
3107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3108 return c
3109 }
3110
3111
3112
3113
3114 func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
3115 c.ifNoneMatch_ = entityTag
3116 return c
3117 }
3118
3119
3120 func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
3121 c.ctx_ = ctx
3122 return c
3123 }
3124
3125
3126
3127 func (c *DnsKeysGetCall) Header() http.Header {
3128 if c.header_ == nil {
3129 c.header_ = make(http.Header)
3130 }
3131 return c.header_
3132 }
3133
3134 func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
3135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3136 if c.ifNoneMatch_ != "" {
3137 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3138 }
3139 var body io.Reader = nil
3140 c.urlParams_.Set("alt", alt)
3141 c.urlParams_.Set("prettyPrint", "false")
3142 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
3143 urls += "?" + c.urlParams_.Encode()
3144 req, err := http.NewRequest("GET", urls, body)
3145 if err != nil {
3146 return nil, err
3147 }
3148 req.Header = reqHeaders
3149 googleapi.Expand(req.URL, map[string]string{
3150 "project": c.project,
3151 "managedZone": c.managedZone,
3152 "dnsKeyId": c.dnsKeyId,
3153 })
3154 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3155 }
3156
3157
3158
3159
3160
3161
3162 func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
3163 gensupport.SetOptions(c.urlParams_, opts...)
3164 res, err := c.doRequest("json")
3165 if res != nil && res.StatusCode == http.StatusNotModified {
3166 if res.Body != nil {
3167 res.Body.Close()
3168 }
3169 return nil, gensupport.WrapError(&googleapi.Error{
3170 Code: res.StatusCode,
3171 Header: res.Header,
3172 })
3173 }
3174 if err != nil {
3175 return nil, err
3176 }
3177 defer googleapi.CloseBody(res)
3178 if err := googleapi.CheckResponse(res); err != nil {
3179 return nil, gensupport.WrapError(err)
3180 }
3181 ret := &DnsKey{
3182 ServerResponse: googleapi.ServerResponse{
3183 Header: res.Header,
3184 HTTPStatusCode: res.StatusCode,
3185 },
3186 }
3187 target := &ret
3188 if err := gensupport.DecodeResponse(target, res); err != nil {
3189 return nil, err
3190 }
3191 return ret, nil
3192 }
3193
3194 type DnsKeysListCall struct {
3195 s *Service
3196 project string
3197 managedZone string
3198 urlParams_ gensupport.URLParams
3199 ifNoneMatch_ string
3200 ctx_ context.Context
3201 header_ http.Header
3202 }
3203
3204
3205
3206
3207
3208
3209 func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall {
3210 c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3211 c.project = project
3212 c.managedZone = managedZone
3213 return c
3214 }
3215
3216
3217
3218
3219 func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
3220 c.urlParams_.Set("digestType", digestType)
3221 return c
3222 }
3223
3224
3225
3226
3227 func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
3228 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3229 return c
3230 }
3231
3232
3233
3234
3235 func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
3236 c.urlParams_.Set("pageToken", pageToken)
3237 return c
3238 }
3239
3240
3241
3242
3243 func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
3244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3245 return c
3246 }
3247
3248
3249
3250
3251 func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
3252 c.ifNoneMatch_ = entityTag
3253 return c
3254 }
3255
3256
3257 func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
3258 c.ctx_ = ctx
3259 return c
3260 }
3261
3262
3263
3264 func (c *DnsKeysListCall) Header() http.Header {
3265 if c.header_ == nil {
3266 c.header_ = make(http.Header)
3267 }
3268 return c.header_
3269 }
3270
3271 func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
3272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3273 if c.ifNoneMatch_ != "" {
3274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3275 }
3276 var body io.Reader = nil
3277 c.urlParams_.Set("alt", alt)
3278 c.urlParams_.Set("prettyPrint", "false")
3279 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/dnsKeys")
3280 urls += "?" + c.urlParams_.Encode()
3281 req, err := http.NewRequest("GET", urls, body)
3282 if err != nil {
3283 return nil, err
3284 }
3285 req.Header = reqHeaders
3286 googleapi.Expand(req.URL, map[string]string{
3287 "project": c.project,
3288 "managedZone": c.managedZone,
3289 })
3290 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3291 }
3292
3293
3294
3295
3296
3297
3298
3299 func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
3300 gensupport.SetOptions(c.urlParams_, opts...)
3301 res, err := c.doRequest("json")
3302 if res != nil && res.StatusCode == http.StatusNotModified {
3303 if res.Body != nil {
3304 res.Body.Close()
3305 }
3306 return nil, gensupport.WrapError(&googleapi.Error{
3307 Code: res.StatusCode,
3308 Header: res.Header,
3309 })
3310 }
3311 if err != nil {
3312 return nil, err
3313 }
3314 defer googleapi.CloseBody(res)
3315 if err := googleapi.CheckResponse(res); err != nil {
3316 return nil, gensupport.WrapError(err)
3317 }
3318 ret := &DnsKeysListResponse{
3319 ServerResponse: googleapi.ServerResponse{
3320 Header: res.Header,
3321 HTTPStatusCode: res.StatusCode,
3322 },
3323 }
3324 target := &ret
3325 if err := gensupport.DecodeResponse(target, res); err != nil {
3326 return nil, err
3327 }
3328 return ret, nil
3329 }
3330
3331
3332
3333
3334 func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
3335 c.ctx_ = ctx
3336 defer c.PageToken(c.urlParams_.Get("pageToken"))
3337 for {
3338 x, err := c.Do()
3339 if err != nil {
3340 return err
3341 }
3342 if err := f(x); err != nil {
3343 return err
3344 }
3345 if x.NextPageToken == "" {
3346 return nil
3347 }
3348 c.PageToken(x.NextPageToken)
3349 }
3350 }
3351
3352 type ManagedZoneOperationsGetCall struct {
3353 s *Service
3354 project string
3355 managedZone string
3356 operation string
3357 urlParams_ gensupport.URLParams
3358 ifNoneMatch_ string
3359 ctx_ context.Context
3360 header_ http.Header
3361 }
3362
3363
3364
3365
3366
3367
3368
3369 func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
3370 c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3371 c.project = project
3372 c.managedZone = managedZone
3373 c.operation = operation
3374 return c
3375 }
3376
3377
3378
3379
3380 func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
3381 c.urlParams_.Set("clientOperationId", clientOperationId)
3382 return c
3383 }
3384
3385
3386
3387
3388 func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
3389 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3390 return c
3391 }
3392
3393
3394
3395
3396 func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
3397 c.ifNoneMatch_ = entityTag
3398 return c
3399 }
3400
3401
3402 func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
3403 c.ctx_ = ctx
3404 return c
3405 }
3406
3407
3408
3409 func (c *ManagedZoneOperationsGetCall) Header() http.Header {
3410 if c.header_ == nil {
3411 c.header_ = make(http.Header)
3412 }
3413 return c.header_
3414 }
3415
3416 func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3417 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3418 if c.ifNoneMatch_ != "" {
3419 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3420 }
3421 var body io.Reader = nil
3422 c.urlParams_.Set("alt", alt)
3423 c.urlParams_.Set("prettyPrint", "false")
3424 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations/{operation}")
3425 urls += "?" + c.urlParams_.Encode()
3426 req, err := http.NewRequest("GET", urls, body)
3427 if err != nil {
3428 return nil, err
3429 }
3430 req.Header = reqHeaders
3431 googleapi.Expand(req.URL, map[string]string{
3432 "project": c.project,
3433 "managedZone": c.managedZone,
3434 "operation": c.operation,
3435 })
3436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3437 }
3438
3439
3440
3441
3442
3443
3444 func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3445 gensupport.SetOptions(c.urlParams_, opts...)
3446 res, err := c.doRequest("json")
3447 if res != nil && res.StatusCode == http.StatusNotModified {
3448 if res.Body != nil {
3449 res.Body.Close()
3450 }
3451 return nil, gensupport.WrapError(&googleapi.Error{
3452 Code: res.StatusCode,
3453 Header: res.Header,
3454 })
3455 }
3456 if err != nil {
3457 return nil, err
3458 }
3459 defer googleapi.CloseBody(res)
3460 if err := googleapi.CheckResponse(res); err != nil {
3461 return nil, gensupport.WrapError(err)
3462 }
3463 ret := &Operation{
3464 ServerResponse: googleapi.ServerResponse{
3465 Header: res.Header,
3466 HTTPStatusCode: res.StatusCode,
3467 },
3468 }
3469 target := &ret
3470 if err := gensupport.DecodeResponse(target, res); err != nil {
3471 return nil, err
3472 }
3473 return ret, nil
3474 }
3475
3476 type ManagedZoneOperationsListCall struct {
3477 s *Service
3478 project string
3479 managedZone string
3480 urlParams_ gensupport.URLParams
3481 ifNoneMatch_ string
3482 ctx_ context.Context
3483 header_ http.Header
3484 }
3485
3486
3487
3488
3489
3490 func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall {
3491 c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3492 c.project = project
3493 c.managedZone = managedZone
3494 return c
3495 }
3496
3497
3498
3499
3500 func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
3501 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3502 return c
3503 }
3504
3505
3506
3507
3508 func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
3509 c.urlParams_.Set("pageToken", pageToken)
3510 return c
3511 }
3512
3513
3514
3515
3516
3517
3518
3519
3520 func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
3521 c.urlParams_.Set("sortBy", sortBy)
3522 return c
3523 }
3524
3525
3526
3527
3528 func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
3529 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3530 return c
3531 }
3532
3533
3534
3535
3536 func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
3537 c.ifNoneMatch_ = entityTag
3538 return c
3539 }
3540
3541
3542 func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
3543 c.ctx_ = ctx
3544 return c
3545 }
3546
3547
3548
3549 func (c *ManagedZoneOperationsListCall) Header() http.Header {
3550 if c.header_ == nil {
3551 c.header_ = make(http.Header)
3552 }
3553 return c.header_
3554 }
3555
3556 func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
3557 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3558 if c.ifNoneMatch_ != "" {
3559 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3560 }
3561 var body io.Reader = nil
3562 c.urlParams_.Set("alt", alt)
3563 c.urlParams_.Set("prettyPrint", "false")
3564 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/operations")
3565 urls += "?" + c.urlParams_.Encode()
3566 req, err := http.NewRequest("GET", urls, body)
3567 if err != nil {
3568 return nil, err
3569 }
3570 req.Header = reqHeaders
3571 googleapi.Expand(req.URL, map[string]string{
3572 "project": c.project,
3573 "managedZone": c.managedZone,
3574 })
3575 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3576 }
3577
3578
3579
3580
3581
3582
3583
3584 func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
3585 gensupport.SetOptions(c.urlParams_, opts...)
3586 res, err := c.doRequest("json")
3587 if res != nil && res.StatusCode == http.StatusNotModified {
3588 if res.Body != nil {
3589 res.Body.Close()
3590 }
3591 return nil, gensupport.WrapError(&googleapi.Error{
3592 Code: res.StatusCode,
3593 Header: res.Header,
3594 })
3595 }
3596 if err != nil {
3597 return nil, err
3598 }
3599 defer googleapi.CloseBody(res)
3600 if err := googleapi.CheckResponse(res); err != nil {
3601 return nil, gensupport.WrapError(err)
3602 }
3603 ret := &ManagedZoneOperationsListResponse{
3604 ServerResponse: googleapi.ServerResponse{
3605 Header: res.Header,
3606 HTTPStatusCode: res.StatusCode,
3607 },
3608 }
3609 target := &ret
3610 if err := gensupport.DecodeResponse(target, res); err != nil {
3611 return nil, err
3612 }
3613 return ret, nil
3614 }
3615
3616
3617
3618
3619 func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
3620 c.ctx_ = ctx
3621 defer c.PageToken(c.urlParams_.Get("pageToken"))
3622 for {
3623 x, err := c.Do()
3624 if err != nil {
3625 return err
3626 }
3627 if err := f(x); err != nil {
3628 return err
3629 }
3630 if x.NextPageToken == "" {
3631 return nil
3632 }
3633 c.PageToken(x.NextPageToken)
3634 }
3635 }
3636
3637 type ManagedZonesCreateCall struct {
3638 s *Service
3639 project string
3640 managedzone *ManagedZone
3641 urlParams_ gensupport.URLParams
3642 ctx_ context.Context
3643 header_ http.Header
3644 }
3645
3646
3647
3648
3649 func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
3650 c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3651 c.project = project
3652 c.managedzone = managedzone
3653 return c
3654 }
3655
3656
3657
3658
3659 func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
3660 c.urlParams_.Set("clientOperationId", clientOperationId)
3661 return c
3662 }
3663
3664
3665
3666
3667 func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
3668 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3669 return c
3670 }
3671
3672
3673 func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
3674 c.ctx_ = ctx
3675 return c
3676 }
3677
3678
3679
3680 func (c *ManagedZonesCreateCall) Header() http.Header {
3681 if c.header_ == nil {
3682 c.header_ = make(http.Header)
3683 }
3684 return c.header_
3685 }
3686
3687 func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
3688 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3689 var body io.Reader = nil
3690 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
3691 if err != nil {
3692 return nil, err
3693 }
3694 c.urlParams_.Set("alt", alt)
3695 c.urlParams_.Set("prettyPrint", "false")
3696 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones")
3697 urls += "?" + c.urlParams_.Encode()
3698 req, err := http.NewRequest("POST", urls, body)
3699 if err != nil {
3700 return nil, err
3701 }
3702 req.Header = reqHeaders
3703 googleapi.Expand(req.URL, map[string]string{
3704 "project": c.project,
3705 })
3706 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3707 }
3708
3709
3710
3711
3712
3713
3714 func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
3715 gensupport.SetOptions(c.urlParams_, opts...)
3716 res, err := c.doRequest("json")
3717 if res != nil && res.StatusCode == http.StatusNotModified {
3718 if res.Body != nil {
3719 res.Body.Close()
3720 }
3721 return nil, gensupport.WrapError(&googleapi.Error{
3722 Code: res.StatusCode,
3723 Header: res.Header,
3724 })
3725 }
3726 if err != nil {
3727 return nil, err
3728 }
3729 defer googleapi.CloseBody(res)
3730 if err := googleapi.CheckResponse(res); err != nil {
3731 return nil, gensupport.WrapError(err)
3732 }
3733 ret := &ManagedZone{
3734 ServerResponse: googleapi.ServerResponse{
3735 Header: res.Header,
3736 HTTPStatusCode: res.StatusCode,
3737 },
3738 }
3739 target := &ret
3740 if err := gensupport.DecodeResponse(target, res); err != nil {
3741 return nil, err
3742 }
3743 return ret, nil
3744 }
3745
3746 type ManagedZonesDeleteCall struct {
3747 s *Service
3748 project string
3749 managedZone string
3750 urlParams_ gensupport.URLParams
3751 ctx_ context.Context
3752 header_ http.Header
3753 }
3754
3755
3756
3757
3758
3759
3760 func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
3761 c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3762 c.project = project
3763 c.managedZone = managedZone
3764 return c
3765 }
3766
3767
3768
3769
3770 func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
3771 c.urlParams_.Set("clientOperationId", clientOperationId)
3772 return c
3773 }
3774
3775
3776
3777
3778 func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
3779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3780 return c
3781 }
3782
3783
3784 func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
3785 c.ctx_ = ctx
3786 return c
3787 }
3788
3789
3790
3791 func (c *ManagedZonesDeleteCall) Header() http.Header {
3792 if c.header_ == nil {
3793 c.header_ = make(http.Header)
3794 }
3795 return c.header_
3796 }
3797
3798 func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
3799 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3800 var body io.Reader = nil
3801 c.urlParams_.Set("alt", alt)
3802 c.urlParams_.Set("prettyPrint", "false")
3803 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
3804 urls += "?" + c.urlParams_.Encode()
3805 req, err := http.NewRequest("DELETE", urls, body)
3806 if err != nil {
3807 return nil, err
3808 }
3809 req.Header = reqHeaders
3810 googleapi.Expand(req.URL, map[string]string{
3811 "project": c.project,
3812 "managedZone": c.managedZone,
3813 })
3814 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3815 }
3816
3817
3818 func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
3819 gensupport.SetOptions(c.urlParams_, opts...)
3820 res, err := c.doRequest("json")
3821 if err != nil {
3822 return err
3823 }
3824 defer googleapi.CloseBody(res)
3825 if err := googleapi.CheckResponse(res); err != nil {
3826 return gensupport.WrapError(err)
3827 }
3828 return nil
3829 }
3830
3831 type ManagedZonesGetCall struct {
3832 s *Service
3833 project string
3834 managedZone string
3835 urlParams_ gensupport.URLParams
3836 ifNoneMatch_ string
3837 ctx_ context.Context
3838 header_ http.Header
3839 }
3840
3841
3842
3843
3844
3845
3846 func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
3847 c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3848 c.project = project
3849 c.managedZone = managedZone
3850 return c
3851 }
3852
3853
3854
3855
3856 func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
3857 c.urlParams_.Set("clientOperationId", clientOperationId)
3858 return c
3859 }
3860
3861
3862
3863
3864 func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
3865 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3866 return c
3867 }
3868
3869
3870
3871
3872 func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
3873 c.ifNoneMatch_ = entityTag
3874 return c
3875 }
3876
3877
3878 func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
3879 c.ctx_ = ctx
3880 return c
3881 }
3882
3883
3884
3885 func (c *ManagedZonesGetCall) Header() http.Header {
3886 if c.header_ == nil {
3887 c.header_ = make(http.Header)
3888 }
3889 return c.header_
3890 }
3891
3892 func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
3893 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3894 if c.ifNoneMatch_ != "" {
3895 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3896 }
3897 var body io.Reader = nil
3898 c.urlParams_.Set("alt", alt)
3899 c.urlParams_.Set("prettyPrint", "false")
3900 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
3901 urls += "?" + c.urlParams_.Encode()
3902 req, err := http.NewRequest("GET", urls, body)
3903 if err != nil {
3904 return nil, err
3905 }
3906 req.Header = reqHeaders
3907 googleapi.Expand(req.URL, map[string]string{
3908 "project": c.project,
3909 "managedZone": c.managedZone,
3910 })
3911 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3912 }
3913
3914
3915
3916
3917
3918
3919 func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
3920 gensupport.SetOptions(c.urlParams_, opts...)
3921 res, err := c.doRequest("json")
3922 if res != nil && res.StatusCode == http.StatusNotModified {
3923 if res.Body != nil {
3924 res.Body.Close()
3925 }
3926 return nil, gensupport.WrapError(&googleapi.Error{
3927 Code: res.StatusCode,
3928 Header: res.Header,
3929 })
3930 }
3931 if err != nil {
3932 return nil, err
3933 }
3934 defer googleapi.CloseBody(res)
3935 if err := googleapi.CheckResponse(res); err != nil {
3936 return nil, gensupport.WrapError(err)
3937 }
3938 ret := &ManagedZone{
3939 ServerResponse: googleapi.ServerResponse{
3940 Header: res.Header,
3941 HTTPStatusCode: res.StatusCode,
3942 },
3943 }
3944 target := &ret
3945 if err := gensupport.DecodeResponse(target, res); err != nil {
3946 return nil, err
3947 }
3948 return ret, nil
3949 }
3950
3951 type ManagedZonesGetIamPolicyCall struct {
3952 s *Service
3953 resource string
3954 googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest
3955 urlParams_ gensupport.URLParams
3956 ctx_ context.Context
3957 header_ http.Header
3958 }
3959
3960
3961
3962
3963
3964
3965
3966 func (r *ManagedZonesService) GetIamPolicy(resource string, googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest) *ManagedZonesGetIamPolicyCall {
3967 c := &ManagedZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3968 c.resource = resource
3969 c.googleiamv1getiampolicyrequest = googleiamv1getiampolicyrequest
3970 return c
3971 }
3972
3973
3974
3975
3976 func (c *ManagedZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesGetIamPolicyCall {
3977 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3978 return c
3979 }
3980
3981
3982 func (c *ManagedZonesGetIamPolicyCall) Context(ctx context.Context) *ManagedZonesGetIamPolicyCall {
3983 c.ctx_ = ctx
3984 return c
3985 }
3986
3987
3988
3989 func (c *ManagedZonesGetIamPolicyCall) Header() http.Header {
3990 if c.header_ == nil {
3991 c.header_ = make(http.Header)
3992 }
3993 return c.header_
3994 }
3995
3996 func (c *ManagedZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3997 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3998 var body io.Reader = nil
3999 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1getiampolicyrequest)
4000 if err != nil {
4001 return nil, err
4002 }
4003 c.urlParams_.Set("alt", alt)
4004 c.urlParams_.Set("prettyPrint", "false")
4005 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:getIamPolicy")
4006 urls += "?" + c.urlParams_.Encode()
4007 req, err := http.NewRequest("POST", urls, body)
4008 if err != nil {
4009 return nil, err
4010 }
4011 req.Header = reqHeaders
4012 googleapi.Expand(req.URL, map[string]string{
4013 "resource": c.resource,
4014 })
4015 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4016 }
4017
4018
4019
4020
4021
4022
4023
4024 func (c *ManagedZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
4025 gensupport.SetOptions(c.urlParams_, opts...)
4026 res, err := c.doRequest("json")
4027 if res != nil && res.StatusCode == http.StatusNotModified {
4028 if res.Body != nil {
4029 res.Body.Close()
4030 }
4031 return nil, gensupport.WrapError(&googleapi.Error{
4032 Code: res.StatusCode,
4033 Header: res.Header,
4034 })
4035 }
4036 if err != nil {
4037 return nil, err
4038 }
4039 defer googleapi.CloseBody(res)
4040 if err := googleapi.CheckResponse(res); err != nil {
4041 return nil, gensupport.WrapError(err)
4042 }
4043 ret := &GoogleIamV1Policy{
4044 ServerResponse: googleapi.ServerResponse{
4045 Header: res.Header,
4046 HTTPStatusCode: res.StatusCode,
4047 },
4048 }
4049 target := &ret
4050 if err := gensupport.DecodeResponse(target, res); err != nil {
4051 return nil, err
4052 }
4053 return ret, nil
4054 }
4055
4056 type ManagedZonesListCall struct {
4057 s *Service
4058 project string
4059 urlParams_ gensupport.URLParams
4060 ifNoneMatch_ string
4061 ctx_ context.Context
4062 header_ http.Header
4063 }
4064
4065
4066
4067
4068 func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
4069 c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4070 c.project = project
4071 return c
4072 }
4073
4074
4075
4076 func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
4077 c.urlParams_.Set("dnsName", dnsName)
4078 return c
4079 }
4080
4081
4082
4083
4084 func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
4085 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4086 return c
4087 }
4088
4089
4090
4091
4092 func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
4093 c.urlParams_.Set("pageToken", pageToken)
4094 return c
4095 }
4096
4097
4098
4099
4100 func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
4101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4102 return c
4103 }
4104
4105
4106
4107
4108 func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
4109 c.ifNoneMatch_ = entityTag
4110 return c
4111 }
4112
4113
4114 func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
4115 c.ctx_ = ctx
4116 return c
4117 }
4118
4119
4120
4121 func (c *ManagedZonesListCall) Header() http.Header {
4122 if c.header_ == nil {
4123 c.header_ = make(http.Header)
4124 }
4125 return c.header_
4126 }
4127
4128 func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
4129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4130 if c.ifNoneMatch_ != "" {
4131 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4132 }
4133 var body io.Reader = nil
4134 c.urlParams_.Set("alt", alt)
4135 c.urlParams_.Set("prettyPrint", "false")
4136 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones")
4137 urls += "?" + c.urlParams_.Encode()
4138 req, err := http.NewRequest("GET", urls, body)
4139 if err != nil {
4140 return nil, err
4141 }
4142 req.Header = reqHeaders
4143 googleapi.Expand(req.URL, map[string]string{
4144 "project": c.project,
4145 })
4146 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4147 }
4148
4149
4150
4151
4152
4153
4154
4155 func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
4156 gensupport.SetOptions(c.urlParams_, opts...)
4157 res, err := c.doRequest("json")
4158 if res != nil && res.StatusCode == http.StatusNotModified {
4159 if res.Body != nil {
4160 res.Body.Close()
4161 }
4162 return nil, gensupport.WrapError(&googleapi.Error{
4163 Code: res.StatusCode,
4164 Header: res.Header,
4165 })
4166 }
4167 if err != nil {
4168 return nil, err
4169 }
4170 defer googleapi.CloseBody(res)
4171 if err := googleapi.CheckResponse(res); err != nil {
4172 return nil, gensupport.WrapError(err)
4173 }
4174 ret := &ManagedZonesListResponse{
4175 ServerResponse: googleapi.ServerResponse{
4176 Header: res.Header,
4177 HTTPStatusCode: res.StatusCode,
4178 },
4179 }
4180 target := &ret
4181 if err := gensupport.DecodeResponse(target, res); err != nil {
4182 return nil, err
4183 }
4184 return ret, nil
4185 }
4186
4187
4188
4189
4190 func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
4191 c.ctx_ = ctx
4192 defer c.PageToken(c.urlParams_.Get("pageToken"))
4193 for {
4194 x, err := c.Do()
4195 if err != nil {
4196 return err
4197 }
4198 if err := f(x); err != nil {
4199 return err
4200 }
4201 if x.NextPageToken == "" {
4202 return nil
4203 }
4204 c.PageToken(x.NextPageToken)
4205 }
4206 }
4207
4208 type ManagedZonesPatchCall struct {
4209 s *Service
4210 project string
4211 managedZone string
4212 managedzone *ManagedZone
4213 urlParams_ gensupport.URLParams
4214 ctx_ context.Context
4215 header_ http.Header
4216 }
4217
4218
4219
4220
4221
4222
4223 func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
4224 c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4225 c.project = project
4226 c.managedZone = managedZone
4227 c.managedzone = managedzone
4228 return c
4229 }
4230
4231
4232
4233
4234 func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
4235 c.urlParams_.Set("clientOperationId", clientOperationId)
4236 return c
4237 }
4238
4239
4240
4241
4242 func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
4243 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4244 return c
4245 }
4246
4247
4248 func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
4249 c.ctx_ = ctx
4250 return c
4251 }
4252
4253
4254
4255 func (c *ManagedZonesPatchCall) Header() http.Header {
4256 if c.header_ == nil {
4257 c.header_ = make(http.Header)
4258 }
4259 return c.header_
4260 }
4261
4262 func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
4263 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4264 var body io.Reader = nil
4265 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
4266 if err != nil {
4267 return nil, err
4268 }
4269 c.urlParams_.Set("alt", alt)
4270 c.urlParams_.Set("prettyPrint", "false")
4271 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
4272 urls += "?" + c.urlParams_.Encode()
4273 req, err := http.NewRequest("PATCH", urls, body)
4274 if err != nil {
4275 return nil, err
4276 }
4277 req.Header = reqHeaders
4278 googleapi.Expand(req.URL, map[string]string{
4279 "project": c.project,
4280 "managedZone": c.managedZone,
4281 })
4282 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4283 }
4284
4285
4286
4287
4288
4289
4290 func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4291 gensupport.SetOptions(c.urlParams_, opts...)
4292 res, err := c.doRequest("json")
4293 if res != nil && res.StatusCode == http.StatusNotModified {
4294 if res.Body != nil {
4295 res.Body.Close()
4296 }
4297 return nil, gensupport.WrapError(&googleapi.Error{
4298 Code: res.StatusCode,
4299 Header: res.Header,
4300 })
4301 }
4302 if err != nil {
4303 return nil, err
4304 }
4305 defer googleapi.CloseBody(res)
4306 if err := googleapi.CheckResponse(res); err != nil {
4307 return nil, gensupport.WrapError(err)
4308 }
4309 ret := &Operation{
4310 ServerResponse: googleapi.ServerResponse{
4311 Header: res.Header,
4312 HTTPStatusCode: res.StatusCode,
4313 },
4314 }
4315 target := &ret
4316 if err := gensupport.DecodeResponse(target, res); err != nil {
4317 return nil, err
4318 }
4319 return ret, nil
4320 }
4321
4322 type ManagedZonesSetIamPolicyCall struct {
4323 s *Service
4324 resource string
4325 googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest
4326 urlParams_ gensupport.URLParams
4327 ctx_ context.Context
4328 header_ http.Header
4329 }
4330
4331
4332
4333
4334
4335
4336
4337
4338 func (r *ManagedZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ManagedZonesSetIamPolicyCall {
4339 c := &ManagedZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4340 c.resource = resource
4341 c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest
4342 return c
4343 }
4344
4345
4346
4347
4348 func (c *ManagedZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesSetIamPolicyCall {
4349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4350 return c
4351 }
4352
4353
4354 func (c *ManagedZonesSetIamPolicyCall) Context(ctx context.Context) *ManagedZonesSetIamPolicyCall {
4355 c.ctx_ = ctx
4356 return c
4357 }
4358
4359
4360
4361 func (c *ManagedZonesSetIamPolicyCall) Header() http.Header {
4362 if c.header_ == nil {
4363 c.header_ = make(http.Header)
4364 }
4365 return c.header_
4366 }
4367
4368 func (c *ManagedZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4369 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4370 var body io.Reader = nil
4371 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest)
4372 if err != nil {
4373 return nil, err
4374 }
4375 c.urlParams_.Set("alt", alt)
4376 c.urlParams_.Set("prettyPrint", "false")
4377 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:setIamPolicy")
4378 urls += "?" + c.urlParams_.Encode()
4379 req, err := http.NewRequest("POST", urls, body)
4380 if err != nil {
4381 return nil, err
4382 }
4383 req.Header = reqHeaders
4384 googleapi.Expand(req.URL, map[string]string{
4385 "resource": c.resource,
4386 })
4387 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4388 }
4389
4390
4391
4392
4393
4394
4395
4396 func (c *ManagedZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
4397 gensupport.SetOptions(c.urlParams_, opts...)
4398 res, err := c.doRequest("json")
4399 if res != nil && res.StatusCode == http.StatusNotModified {
4400 if res.Body != nil {
4401 res.Body.Close()
4402 }
4403 return nil, gensupport.WrapError(&googleapi.Error{
4404 Code: res.StatusCode,
4405 Header: res.Header,
4406 })
4407 }
4408 if err != nil {
4409 return nil, err
4410 }
4411 defer googleapi.CloseBody(res)
4412 if err := googleapi.CheckResponse(res); err != nil {
4413 return nil, gensupport.WrapError(err)
4414 }
4415 ret := &GoogleIamV1Policy{
4416 ServerResponse: googleapi.ServerResponse{
4417 Header: res.Header,
4418 HTTPStatusCode: res.StatusCode,
4419 },
4420 }
4421 target := &ret
4422 if err := gensupport.DecodeResponse(target, res); err != nil {
4423 return nil, err
4424 }
4425 return ret, nil
4426 }
4427
4428 type ManagedZonesTestIamPermissionsCall struct {
4429 s *Service
4430 resource string
4431 googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest
4432 urlParams_ gensupport.URLParams
4433 ctx_ context.Context
4434 header_ http.Header
4435 }
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447 func (r *ManagedZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ManagedZonesTestIamPermissionsCall {
4448 c := &ManagedZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4449 c.resource = resource
4450 c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest
4451 return c
4452 }
4453
4454
4455
4456
4457 func (c *ManagedZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedZonesTestIamPermissionsCall {
4458 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4459 return c
4460 }
4461
4462
4463 func (c *ManagedZonesTestIamPermissionsCall) Context(ctx context.Context) *ManagedZonesTestIamPermissionsCall {
4464 c.ctx_ = ctx
4465 return c
4466 }
4467
4468
4469
4470 func (c *ManagedZonesTestIamPermissionsCall) Header() http.Header {
4471 if c.header_ == nil {
4472 c.header_ = make(http.Header)
4473 }
4474 return c.header_
4475 }
4476
4477 func (c *ManagedZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4479 var body io.Reader = nil
4480 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest)
4481 if err != nil {
4482 return nil, err
4483 }
4484 c.urlParams_.Set("alt", alt)
4485 c.urlParams_.Set("prettyPrint", "false")
4486 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/{+resource}:testIamPermissions")
4487 urls += "?" + c.urlParams_.Encode()
4488 req, err := http.NewRequest("POST", urls, body)
4489 if err != nil {
4490 return nil, err
4491 }
4492 req.Header = reqHeaders
4493 googleapi.Expand(req.URL, map[string]string{
4494 "resource": c.resource,
4495 })
4496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4497 }
4498
4499
4500
4501
4502
4503
4504
4505 func (c *ManagedZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) {
4506 gensupport.SetOptions(c.urlParams_, opts...)
4507 res, err := c.doRequest("json")
4508 if res != nil && res.StatusCode == http.StatusNotModified {
4509 if res.Body != nil {
4510 res.Body.Close()
4511 }
4512 return nil, gensupport.WrapError(&googleapi.Error{
4513 Code: res.StatusCode,
4514 Header: res.Header,
4515 })
4516 }
4517 if err != nil {
4518 return nil, err
4519 }
4520 defer googleapi.CloseBody(res)
4521 if err := googleapi.CheckResponse(res); err != nil {
4522 return nil, gensupport.WrapError(err)
4523 }
4524 ret := &GoogleIamV1TestIamPermissionsResponse{
4525 ServerResponse: googleapi.ServerResponse{
4526 Header: res.Header,
4527 HTTPStatusCode: res.StatusCode,
4528 },
4529 }
4530 target := &ret
4531 if err := gensupport.DecodeResponse(target, res); err != nil {
4532 return nil, err
4533 }
4534 return ret, nil
4535 }
4536
4537 type ManagedZonesUpdateCall struct {
4538 s *Service
4539 project string
4540 managedZone string
4541 managedzone *ManagedZone
4542 urlParams_ gensupport.URLParams
4543 ctx_ context.Context
4544 header_ http.Header
4545 }
4546
4547
4548
4549
4550
4551
4552 func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
4553 c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4554 c.project = project
4555 c.managedZone = managedZone
4556 c.managedzone = managedzone
4557 return c
4558 }
4559
4560
4561
4562
4563 func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
4564 c.urlParams_.Set("clientOperationId", clientOperationId)
4565 return c
4566 }
4567
4568
4569
4570
4571 func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
4572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4573 return c
4574 }
4575
4576
4577 func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
4578 c.ctx_ = ctx
4579 return c
4580 }
4581
4582
4583
4584 func (c *ManagedZonesUpdateCall) Header() http.Header {
4585 if c.header_ == nil {
4586 c.header_ = make(http.Header)
4587 }
4588 return c.header_
4589 }
4590
4591 func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
4592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4593 var body io.Reader = nil
4594 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
4595 if err != nil {
4596 return nil, err
4597 }
4598 c.urlParams_.Set("alt", alt)
4599 c.urlParams_.Set("prettyPrint", "false")
4600 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}")
4601 urls += "?" + c.urlParams_.Encode()
4602 req, err := http.NewRequest("PUT", urls, body)
4603 if err != nil {
4604 return nil, err
4605 }
4606 req.Header = reqHeaders
4607 googleapi.Expand(req.URL, map[string]string{
4608 "project": c.project,
4609 "managedZone": c.managedZone,
4610 })
4611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4612 }
4613
4614
4615
4616
4617
4618
4619 func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4620 gensupport.SetOptions(c.urlParams_, opts...)
4621 res, err := c.doRequest("json")
4622 if res != nil && res.StatusCode == http.StatusNotModified {
4623 if res.Body != nil {
4624 res.Body.Close()
4625 }
4626 return nil, gensupport.WrapError(&googleapi.Error{
4627 Code: res.StatusCode,
4628 Header: res.Header,
4629 })
4630 }
4631 if err != nil {
4632 return nil, err
4633 }
4634 defer googleapi.CloseBody(res)
4635 if err := googleapi.CheckResponse(res); err != nil {
4636 return nil, gensupport.WrapError(err)
4637 }
4638 ret := &Operation{
4639 ServerResponse: googleapi.ServerResponse{
4640 Header: res.Header,
4641 HTTPStatusCode: res.StatusCode,
4642 },
4643 }
4644 target := &ret
4645 if err := gensupport.DecodeResponse(target, res); err != nil {
4646 return nil, err
4647 }
4648 return ret, nil
4649 }
4650
4651 type PoliciesCreateCall struct {
4652 s *Service
4653 project string
4654 policy *Policy
4655 urlParams_ gensupport.URLParams
4656 ctx_ context.Context
4657 header_ http.Header
4658 }
4659
4660
4661
4662
4663 func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall {
4664 c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4665 c.project = project
4666 c.policy = policy
4667 return c
4668 }
4669
4670
4671
4672
4673 func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
4674 c.urlParams_.Set("clientOperationId", clientOperationId)
4675 return c
4676 }
4677
4678
4679
4680
4681 func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
4682 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4683 return c
4684 }
4685
4686
4687 func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
4688 c.ctx_ = ctx
4689 return c
4690 }
4691
4692
4693
4694 func (c *PoliciesCreateCall) Header() http.Header {
4695 if c.header_ == nil {
4696 c.header_ = make(http.Header)
4697 }
4698 return c.header_
4699 }
4700
4701 func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4702 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4703 var body io.Reader = nil
4704 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
4705 if err != nil {
4706 return nil, err
4707 }
4708 c.urlParams_.Set("alt", alt)
4709 c.urlParams_.Set("prettyPrint", "false")
4710 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies")
4711 urls += "?" + c.urlParams_.Encode()
4712 req, err := http.NewRequest("POST", urls, body)
4713 if err != nil {
4714 return nil, err
4715 }
4716 req.Header = reqHeaders
4717 googleapi.Expand(req.URL, map[string]string{
4718 "project": c.project,
4719 })
4720 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4721 }
4722
4723
4724
4725
4726
4727
4728 func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4729 gensupport.SetOptions(c.urlParams_, opts...)
4730 res, err := c.doRequest("json")
4731 if res != nil && res.StatusCode == http.StatusNotModified {
4732 if res.Body != nil {
4733 res.Body.Close()
4734 }
4735 return nil, gensupport.WrapError(&googleapi.Error{
4736 Code: res.StatusCode,
4737 Header: res.Header,
4738 })
4739 }
4740 if err != nil {
4741 return nil, err
4742 }
4743 defer googleapi.CloseBody(res)
4744 if err := googleapi.CheckResponse(res); err != nil {
4745 return nil, gensupport.WrapError(err)
4746 }
4747 ret := &Policy{
4748 ServerResponse: googleapi.ServerResponse{
4749 Header: res.Header,
4750 HTTPStatusCode: res.StatusCode,
4751 },
4752 }
4753 target := &ret
4754 if err := gensupport.DecodeResponse(target, res); err != nil {
4755 return nil, err
4756 }
4757 return ret, nil
4758 }
4759
4760 type PoliciesDeleteCall struct {
4761 s *Service
4762 project string
4763 policy string
4764 urlParams_ gensupport.URLParams
4765 ctx_ context.Context
4766 header_ http.Header
4767 }
4768
4769
4770
4771
4772
4773
4774 func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall {
4775 c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4776 c.project = project
4777 c.policy = policy
4778 return c
4779 }
4780
4781
4782
4783
4784 func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
4785 c.urlParams_.Set("clientOperationId", clientOperationId)
4786 return c
4787 }
4788
4789
4790
4791
4792 func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
4793 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4794 return c
4795 }
4796
4797
4798 func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
4799 c.ctx_ = ctx
4800 return c
4801 }
4802
4803
4804
4805 func (c *PoliciesDeleteCall) Header() http.Header {
4806 if c.header_ == nil {
4807 c.header_ = make(http.Header)
4808 }
4809 return c.header_
4810 }
4811
4812 func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4813 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4814 var body io.Reader = nil
4815 c.urlParams_.Set("alt", alt)
4816 c.urlParams_.Set("prettyPrint", "false")
4817 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
4818 urls += "?" + c.urlParams_.Encode()
4819 req, err := http.NewRequest("DELETE", urls, body)
4820 if err != nil {
4821 return nil, err
4822 }
4823 req.Header = reqHeaders
4824 googleapi.Expand(req.URL, map[string]string{
4825 "project": c.project,
4826 "policy": c.policy,
4827 })
4828 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4829 }
4830
4831
4832 func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
4833 gensupport.SetOptions(c.urlParams_, opts...)
4834 res, err := c.doRequest("json")
4835 if err != nil {
4836 return err
4837 }
4838 defer googleapi.CloseBody(res)
4839 if err := googleapi.CheckResponse(res); err != nil {
4840 return gensupport.WrapError(err)
4841 }
4842 return nil
4843 }
4844
4845 type PoliciesGetCall struct {
4846 s *Service
4847 project string
4848 policy string
4849 urlParams_ gensupport.URLParams
4850 ifNoneMatch_ string
4851 ctx_ context.Context
4852 header_ http.Header
4853 }
4854
4855
4856
4857
4858
4859 func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall {
4860 c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4861 c.project = project
4862 c.policy = policy
4863 return c
4864 }
4865
4866
4867
4868
4869 func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
4870 c.urlParams_.Set("clientOperationId", clientOperationId)
4871 return c
4872 }
4873
4874
4875
4876
4877 func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
4878 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4879 return c
4880 }
4881
4882
4883
4884
4885 func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
4886 c.ifNoneMatch_ = entityTag
4887 return c
4888 }
4889
4890
4891 func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
4892 c.ctx_ = ctx
4893 return c
4894 }
4895
4896
4897
4898 func (c *PoliciesGetCall) Header() http.Header {
4899 if c.header_ == nil {
4900 c.header_ = make(http.Header)
4901 }
4902 return c.header_
4903 }
4904
4905 func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4906 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4907 if c.ifNoneMatch_ != "" {
4908 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4909 }
4910 var body io.Reader = nil
4911 c.urlParams_.Set("alt", alt)
4912 c.urlParams_.Set("prettyPrint", "false")
4913 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
4914 urls += "?" + c.urlParams_.Encode()
4915 req, err := http.NewRequest("GET", urls, body)
4916 if err != nil {
4917 return nil, err
4918 }
4919 req.Header = reqHeaders
4920 googleapi.Expand(req.URL, map[string]string{
4921 "project": c.project,
4922 "policy": c.policy,
4923 })
4924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4925 }
4926
4927
4928
4929
4930
4931
4932 func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4933 gensupport.SetOptions(c.urlParams_, opts...)
4934 res, err := c.doRequest("json")
4935 if res != nil && res.StatusCode == http.StatusNotModified {
4936 if res.Body != nil {
4937 res.Body.Close()
4938 }
4939 return nil, gensupport.WrapError(&googleapi.Error{
4940 Code: res.StatusCode,
4941 Header: res.Header,
4942 })
4943 }
4944 if err != nil {
4945 return nil, err
4946 }
4947 defer googleapi.CloseBody(res)
4948 if err := googleapi.CheckResponse(res); err != nil {
4949 return nil, gensupport.WrapError(err)
4950 }
4951 ret := &Policy{
4952 ServerResponse: googleapi.ServerResponse{
4953 Header: res.Header,
4954 HTTPStatusCode: res.StatusCode,
4955 },
4956 }
4957 target := &ret
4958 if err := gensupport.DecodeResponse(target, res); err != nil {
4959 return nil, err
4960 }
4961 return ret, nil
4962 }
4963
4964 type PoliciesListCall struct {
4965 s *Service
4966 project string
4967 urlParams_ gensupport.URLParams
4968 ifNoneMatch_ string
4969 ctx_ context.Context
4970 header_ http.Header
4971 }
4972
4973
4974
4975
4976 func (r *PoliciesService) List(project string) *PoliciesListCall {
4977 c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4978 c.project = project
4979 return c
4980 }
4981
4982
4983
4984
4985 func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
4986 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4987 return c
4988 }
4989
4990
4991
4992
4993 func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
4994 c.urlParams_.Set("pageToken", pageToken)
4995 return c
4996 }
4997
4998
4999
5000
5001 func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
5002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5003 return c
5004 }
5005
5006
5007
5008
5009 func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
5010 c.ifNoneMatch_ = entityTag
5011 return c
5012 }
5013
5014
5015 func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
5016 c.ctx_ = ctx
5017 return c
5018 }
5019
5020
5021
5022 func (c *PoliciesListCall) Header() http.Header {
5023 if c.header_ == nil {
5024 c.header_ = make(http.Header)
5025 }
5026 return c.header_
5027 }
5028
5029 func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
5030 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5031 if c.ifNoneMatch_ != "" {
5032 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5033 }
5034 var body io.Reader = nil
5035 c.urlParams_.Set("alt", alt)
5036 c.urlParams_.Set("prettyPrint", "false")
5037 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies")
5038 urls += "?" + c.urlParams_.Encode()
5039 req, err := http.NewRequest("GET", urls, body)
5040 if err != nil {
5041 return nil, err
5042 }
5043 req.Header = reqHeaders
5044 googleapi.Expand(req.URL, map[string]string{
5045 "project": c.project,
5046 })
5047 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5048 }
5049
5050
5051
5052
5053
5054
5055
5056 func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
5057 gensupport.SetOptions(c.urlParams_, opts...)
5058 res, err := c.doRequest("json")
5059 if res != nil && res.StatusCode == http.StatusNotModified {
5060 if res.Body != nil {
5061 res.Body.Close()
5062 }
5063 return nil, gensupport.WrapError(&googleapi.Error{
5064 Code: res.StatusCode,
5065 Header: res.Header,
5066 })
5067 }
5068 if err != nil {
5069 return nil, err
5070 }
5071 defer googleapi.CloseBody(res)
5072 if err := googleapi.CheckResponse(res); err != nil {
5073 return nil, gensupport.WrapError(err)
5074 }
5075 ret := &PoliciesListResponse{
5076 ServerResponse: googleapi.ServerResponse{
5077 Header: res.Header,
5078 HTTPStatusCode: res.StatusCode,
5079 },
5080 }
5081 target := &ret
5082 if err := gensupport.DecodeResponse(target, res); err != nil {
5083 return nil, err
5084 }
5085 return ret, nil
5086 }
5087
5088
5089
5090
5091 func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
5092 c.ctx_ = ctx
5093 defer c.PageToken(c.urlParams_.Get("pageToken"))
5094 for {
5095 x, err := c.Do()
5096 if err != nil {
5097 return err
5098 }
5099 if err := f(x); err != nil {
5100 return err
5101 }
5102 if x.NextPageToken == "" {
5103 return nil
5104 }
5105 c.PageToken(x.NextPageToken)
5106 }
5107 }
5108
5109 type PoliciesPatchCall struct {
5110 s *Service
5111 project string
5112 policy string
5113 policy2 *Policy
5114 urlParams_ gensupport.URLParams
5115 ctx_ context.Context
5116 header_ http.Header
5117 }
5118
5119
5120
5121
5122
5123 func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall {
5124 c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5125 c.project = project
5126 c.policy = policy
5127 c.policy2 = policy2
5128 return c
5129 }
5130
5131
5132
5133
5134 func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
5135 c.urlParams_.Set("clientOperationId", clientOperationId)
5136 return c
5137 }
5138
5139
5140
5141
5142 func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
5143 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5144 return c
5145 }
5146
5147
5148 func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
5149 c.ctx_ = ctx
5150 return c
5151 }
5152
5153
5154
5155 func (c *PoliciesPatchCall) Header() http.Header {
5156 if c.header_ == nil {
5157 c.header_ = make(http.Header)
5158 }
5159 return c.header_
5160 }
5161
5162 func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
5163 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5164 var body io.Reader = nil
5165 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
5166 if err != nil {
5167 return nil, err
5168 }
5169 c.urlParams_.Set("alt", alt)
5170 c.urlParams_.Set("prettyPrint", "false")
5171 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
5172 urls += "?" + c.urlParams_.Encode()
5173 req, err := http.NewRequest("PATCH", urls, body)
5174 if err != nil {
5175 return nil, err
5176 }
5177 req.Header = reqHeaders
5178 googleapi.Expand(req.URL, map[string]string{
5179 "project": c.project,
5180 "policy": c.policy,
5181 })
5182 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5183 }
5184
5185
5186
5187
5188
5189
5190
5191 func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
5192 gensupport.SetOptions(c.urlParams_, opts...)
5193 res, err := c.doRequest("json")
5194 if res != nil && res.StatusCode == http.StatusNotModified {
5195 if res.Body != nil {
5196 res.Body.Close()
5197 }
5198 return nil, gensupport.WrapError(&googleapi.Error{
5199 Code: res.StatusCode,
5200 Header: res.Header,
5201 })
5202 }
5203 if err != nil {
5204 return nil, err
5205 }
5206 defer googleapi.CloseBody(res)
5207 if err := googleapi.CheckResponse(res); err != nil {
5208 return nil, gensupport.WrapError(err)
5209 }
5210 ret := &PoliciesPatchResponse{
5211 ServerResponse: googleapi.ServerResponse{
5212 Header: res.Header,
5213 HTTPStatusCode: res.StatusCode,
5214 },
5215 }
5216 target := &ret
5217 if err := gensupport.DecodeResponse(target, res); err != nil {
5218 return nil, err
5219 }
5220 return ret, nil
5221 }
5222
5223 type PoliciesUpdateCall struct {
5224 s *Service
5225 project string
5226 policy string
5227 policy2 *Policy
5228 urlParams_ gensupport.URLParams
5229 ctx_ context.Context
5230 header_ http.Header
5231 }
5232
5233
5234
5235
5236
5237 func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall {
5238 c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5239 c.project = project
5240 c.policy = policy
5241 c.policy2 = policy2
5242 return c
5243 }
5244
5245
5246
5247
5248 func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
5249 c.urlParams_.Set("clientOperationId", clientOperationId)
5250 return c
5251 }
5252
5253
5254
5255
5256 func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
5257 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5258 return c
5259 }
5260
5261
5262 func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
5263 c.ctx_ = ctx
5264 return c
5265 }
5266
5267
5268
5269 func (c *PoliciesUpdateCall) Header() http.Header {
5270 if c.header_ == nil {
5271 c.header_ = make(http.Header)
5272 }
5273 return c.header_
5274 }
5275
5276 func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
5277 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5278 var body io.Reader = nil
5279 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
5280 if err != nil {
5281 return nil, err
5282 }
5283 c.urlParams_.Set("alt", alt)
5284 c.urlParams_.Set("prettyPrint", "false")
5285 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/policies/{policy}")
5286 urls += "?" + c.urlParams_.Encode()
5287 req, err := http.NewRequest("PUT", urls, body)
5288 if err != nil {
5289 return nil, err
5290 }
5291 req.Header = reqHeaders
5292 googleapi.Expand(req.URL, map[string]string{
5293 "project": c.project,
5294 "policy": c.policy,
5295 })
5296 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5297 }
5298
5299
5300
5301
5302
5303
5304
5305 func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
5306 gensupport.SetOptions(c.urlParams_, opts...)
5307 res, err := c.doRequest("json")
5308 if res != nil && res.StatusCode == http.StatusNotModified {
5309 if res.Body != nil {
5310 res.Body.Close()
5311 }
5312 return nil, gensupport.WrapError(&googleapi.Error{
5313 Code: res.StatusCode,
5314 Header: res.Header,
5315 })
5316 }
5317 if err != nil {
5318 return nil, err
5319 }
5320 defer googleapi.CloseBody(res)
5321 if err := googleapi.CheckResponse(res); err != nil {
5322 return nil, gensupport.WrapError(err)
5323 }
5324 ret := &PoliciesUpdateResponse{
5325 ServerResponse: googleapi.ServerResponse{
5326 Header: res.Header,
5327 HTTPStatusCode: res.StatusCode,
5328 },
5329 }
5330 target := &ret
5331 if err := gensupport.DecodeResponse(target, res); err != nil {
5332 return nil, err
5333 }
5334 return ret, nil
5335 }
5336
5337 type ProjectsGetCall struct {
5338 s *Service
5339 project string
5340 urlParams_ gensupport.URLParams
5341 ifNoneMatch_ string
5342 ctx_ context.Context
5343 header_ http.Header
5344 }
5345
5346
5347
5348
5349 func (r *ProjectsService) Get(project string) *ProjectsGetCall {
5350 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5351 c.project = project
5352 return c
5353 }
5354
5355
5356
5357
5358 func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
5359 c.urlParams_.Set("clientOperationId", clientOperationId)
5360 return c
5361 }
5362
5363
5364
5365
5366 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
5367 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5368 return c
5369 }
5370
5371
5372
5373
5374 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
5375 c.ifNoneMatch_ = entityTag
5376 return c
5377 }
5378
5379
5380 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
5381 c.ctx_ = ctx
5382 return c
5383 }
5384
5385
5386
5387 func (c *ProjectsGetCall) Header() http.Header {
5388 if c.header_ == nil {
5389 c.header_ = make(http.Header)
5390 }
5391 return c.header_
5392 }
5393
5394 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
5395 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5396 if c.ifNoneMatch_ != "" {
5397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5398 }
5399 var body io.Reader = nil
5400 c.urlParams_.Set("alt", alt)
5401 c.urlParams_.Set("prettyPrint", "false")
5402 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}")
5403 urls += "?" + c.urlParams_.Encode()
5404 req, err := http.NewRequest("GET", urls, body)
5405 if err != nil {
5406 return nil, err
5407 }
5408 req.Header = reqHeaders
5409 googleapi.Expand(req.URL, map[string]string{
5410 "project": c.project,
5411 })
5412 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5413 }
5414
5415
5416
5417
5418
5419
5420 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
5421 gensupport.SetOptions(c.urlParams_, opts...)
5422 res, err := c.doRequest("json")
5423 if res != nil && res.StatusCode == http.StatusNotModified {
5424 if res.Body != nil {
5425 res.Body.Close()
5426 }
5427 return nil, gensupport.WrapError(&googleapi.Error{
5428 Code: res.StatusCode,
5429 Header: res.Header,
5430 })
5431 }
5432 if err != nil {
5433 return nil, err
5434 }
5435 defer googleapi.CloseBody(res)
5436 if err := googleapi.CheckResponse(res); err != nil {
5437 return nil, gensupport.WrapError(err)
5438 }
5439 ret := &Project{
5440 ServerResponse: googleapi.ServerResponse{
5441 Header: res.Header,
5442 HTTPStatusCode: res.StatusCode,
5443 },
5444 }
5445 target := &ret
5446 if err := gensupport.DecodeResponse(target, res); err != nil {
5447 return nil, err
5448 }
5449 return ret, nil
5450 }
5451
5452 type ResourceRecordSetsCreateCall struct {
5453 s *Service
5454 project string
5455 managedZone string
5456 resourcerecordset *ResourceRecordSet
5457 urlParams_ gensupport.URLParams
5458 ctx_ context.Context
5459 header_ http.Header
5460 }
5461
5462
5463
5464
5465
5466
5467 func (r *ResourceRecordSetsService) Create(project string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall {
5468 c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5469 c.project = project
5470 c.managedZone = managedZone
5471 c.resourcerecordset = resourcerecordset
5472 return c
5473 }
5474
5475
5476
5477
5478 func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall {
5479 c.urlParams_.Set("clientOperationId", clientOperationId)
5480 return c
5481 }
5482
5483
5484
5485
5486 func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall {
5487 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5488 return c
5489 }
5490
5491
5492 func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall {
5493 c.ctx_ = ctx
5494 return c
5495 }
5496
5497
5498
5499 func (c *ResourceRecordSetsCreateCall) Header() http.Header {
5500 if c.header_ == nil {
5501 c.header_ = make(http.Header)
5502 }
5503 return c.header_
5504 }
5505
5506 func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) {
5507 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5508 var body io.Reader = nil
5509 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
5510 if err != nil {
5511 return nil, err
5512 }
5513 c.urlParams_.Set("alt", alt)
5514 c.urlParams_.Set("prettyPrint", "false")
5515 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets")
5516 urls += "?" + c.urlParams_.Encode()
5517 req, err := http.NewRequest("POST", urls, body)
5518 if err != nil {
5519 return nil, err
5520 }
5521 req.Header = reqHeaders
5522 googleapi.Expand(req.URL, map[string]string{
5523 "project": c.project,
5524 "managedZone": c.managedZone,
5525 })
5526 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5527 }
5528
5529
5530
5531
5532
5533
5534
5535 func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
5536 gensupport.SetOptions(c.urlParams_, opts...)
5537 res, err := c.doRequest("json")
5538 if res != nil && res.StatusCode == http.StatusNotModified {
5539 if res.Body != nil {
5540 res.Body.Close()
5541 }
5542 return nil, gensupport.WrapError(&googleapi.Error{
5543 Code: res.StatusCode,
5544 Header: res.Header,
5545 })
5546 }
5547 if err != nil {
5548 return nil, err
5549 }
5550 defer googleapi.CloseBody(res)
5551 if err := googleapi.CheckResponse(res); err != nil {
5552 return nil, gensupport.WrapError(err)
5553 }
5554 ret := &ResourceRecordSet{
5555 ServerResponse: googleapi.ServerResponse{
5556 Header: res.Header,
5557 HTTPStatusCode: res.StatusCode,
5558 },
5559 }
5560 target := &ret
5561 if err := gensupport.DecodeResponse(target, res); err != nil {
5562 return nil, err
5563 }
5564 return ret, nil
5565 }
5566
5567 type ResourceRecordSetsDeleteCall struct {
5568 s *Service
5569 project string
5570 managedZone string
5571 name string
5572 type_ string
5573 urlParams_ gensupport.URLParams
5574 ctx_ context.Context
5575 header_ http.Header
5576 }
5577
5578
5579
5580
5581
5582
5583
5584
5585 func (r *ResourceRecordSetsService) Delete(project string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall {
5586 c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5587 c.project = project
5588 c.managedZone = managedZone
5589 c.name = name
5590 c.type_ = type_
5591 return c
5592 }
5593
5594
5595
5596
5597 func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall {
5598 c.urlParams_.Set("clientOperationId", clientOperationId)
5599 return c
5600 }
5601
5602
5603
5604
5605 func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall {
5606 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5607 return c
5608 }
5609
5610
5611 func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall {
5612 c.ctx_ = ctx
5613 return c
5614 }
5615
5616
5617
5618 func (c *ResourceRecordSetsDeleteCall) Header() http.Header {
5619 if c.header_ == nil {
5620 c.header_ = make(http.Header)
5621 }
5622 return c.header_
5623 }
5624
5625 func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
5626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5627 var body io.Reader = nil
5628 c.urlParams_.Set("alt", alt)
5629 c.urlParams_.Set("prettyPrint", "false")
5630 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
5631 urls += "?" + c.urlParams_.Encode()
5632 req, err := http.NewRequest("DELETE", urls, body)
5633 if err != nil {
5634 return nil, err
5635 }
5636 req.Header = reqHeaders
5637 googleapi.Expand(req.URL, map[string]string{
5638 "project": c.project,
5639 "managedZone": c.managedZone,
5640 "name": c.name,
5641 "type": c.type_,
5642 })
5643 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5644 }
5645
5646
5647 func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) error {
5648 gensupport.SetOptions(c.urlParams_, opts...)
5649 res, err := c.doRequest("json")
5650 if err != nil {
5651 return err
5652 }
5653 defer googleapi.CloseBody(res)
5654 if err := googleapi.CheckResponse(res); err != nil {
5655 return gensupport.WrapError(err)
5656 }
5657 return nil
5658 }
5659
5660 type ResourceRecordSetsGetCall struct {
5661 s *Service
5662 project string
5663 managedZone string
5664 name string
5665 type_ string
5666 urlParams_ gensupport.URLParams
5667 ifNoneMatch_ string
5668 ctx_ context.Context
5669 header_ http.Header
5670 }
5671
5672
5673
5674
5675
5676
5677
5678
5679 func (r *ResourceRecordSetsService) Get(project string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall {
5680 c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5681 c.project = project
5682 c.managedZone = managedZone
5683 c.name = name
5684 c.type_ = type_
5685 return c
5686 }
5687
5688
5689
5690
5691 func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall {
5692 c.urlParams_.Set("clientOperationId", clientOperationId)
5693 return c
5694 }
5695
5696
5697
5698
5699 func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall {
5700 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5701 return c
5702 }
5703
5704
5705
5706
5707 func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall {
5708 c.ifNoneMatch_ = entityTag
5709 return c
5710 }
5711
5712
5713 func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall {
5714 c.ctx_ = ctx
5715 return c
5716 }
5717
5718
5719
5720 func (c *ResourceRecordSetsGetCall) Header() http.Header {
5721 if c.header_ == nil {
5722 c.header_ = make(http.Header)
5723 }
5724 return c.header_
5725 }
5726
5727 func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) {
5728 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5729 if c.ifNoneMatch_ != "" {
5730 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5731 }
5732 var body io.Reader = nil
5733 c.urlParams_.Set("alt", alt)
5734 c.urlParams_.Set("prettyPrint", "false")
5735 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
5736 urls += "?" + c.urlParams_.Encode()
5737 req, err := http.NewRequest("GET", urls, body)
5738 if err != nil {
5739 return nil, err
5740 }
5741 req.Header = reqHeaders
5742 googleapi.Expand(req.URL, map[string]string{
5743 "project": c.project,
5744 "managedZone": c.managedZone,
5745 "name": c.name,
5746 "type": c.type_,
5747 })
5748 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5749 }
5750
5751
5752
5753
5754
5755
5756
5757 func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
5758 gensupport.SetOptions(c.urlParams_, opts...)
5759 res, err := c.doRequest("json")
5760 if res != nil && res.StatusCode == http.StatusNotModified {
5761 if res.Body != nil {
5762 res.Body.Close()
5763 }
5764 return nil, gensupport.WrapError(&googleapi.Error{
5765 Code: res.StatusCode,
5766 Header: res.Header,
5767 })
5768 }
5769 if err != nil {
5770 return nil, err
5771 }
5772 defer googleapi.CloseBody(res)
5773 if err := googleapi.CheckResponse(res); err != nil {
5774 return nil, gensupport.WrapError(err)
5775 }
5776 ret := &ResourceRecordSet{
5777 ServerResponse: googleapi.ServerResponse{
5778 Header: res.Header,
5779 HTTPStatusCode: res.StatusCode,
5780 },
5781 }
5782 target := &ret
5783 if err := gensupport.DecodeResponse(target, res); err != nil {
5784 return nil, err
5785 }
5786 return ret, nil
5787 }
5788
5789 type ResourceRecordSetsListCall struct {
5790 s *Service
5791 project string
5792 managedZone string
5793 urlParams_ gensupport.URLParams
5794 ifNoneMatch_ string
5795 ctx_ context.Context
5796 header_ http.Header
5797 }
5798
5799
5800
5801
5802
5803
5804
5805 func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
5806 c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5807 c.project = project
5808 c.managedZone = managedZone
5809 return c
5810 }
5811
5812
5813
5814
5815 func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
5816 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5817 return c
5818 }
5819
5820
5821
5822 func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
5823 c.urlParams_.Set("name", name)
5824 return c
5825 }
5826
5827
5828
5829
5830 func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
5831 c.urlParams_.Set("pageToken", pageToken)
5832 return c
5833 }
5834
5835
5836
5837 func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
5838 c.urlParams_.Set("type", type_)
5839 return c
5840 }
5841
5842
5843
5844
5845 func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
5846 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5847 return c
5848 }
5849
5850
5851
5852
5853 func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
5854 c.ifNoneMatch_ = entityTag
5855 return c
5856 }
5857
5858
5859 func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
5860 c.ctx_ = ctx
5861 return c
5862 }
5863
5864
5865
5866 func (c *ResourceRecordSetsListCall) Header() http.Header {
5867 if c.header_ == nil {
5868 c.header_ = make(http.Header)
5869 }
5870 return c.header_
5871 }
5872
5873 func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
5874 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5875 if c.ifNoneMatch_ != "" {
5876 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5877 }
5878 var body io.Reader = nil
5879 c.urlParams_.Set("alt", alt)
5880 c.urlParams_.Set("prettyPrint", "false")
5881 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets")
5882 urls += "?" + c.urlParams_.Encode()
5883 req, err := http.NewRequest("GET", urls, body)
5884 if err != nil {
5885 return nil, err
5886 }
5887 req.Header = reqHeaders
5888 googleapi.Expand(req.URL, map[string]string{
5889 "project": c.project,
5890 "managedZone": c.managedZone,
5891 })
5892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5893 }
5894
5895
5896
5897
5898
5899
5900
5901 func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
5902 gensupport.SetOptions(c.urlParams_, opts...)
5903 res, err := c.doRequest("json")
5904 if res != nil && res.StatusCode == http.StatusNotModified {
5905 if res.Body != nil {
5906 res.Body.Close()
5907 }
5908 return nil, gensupport.WrapError(&googleapi.Error{
5909 Code: res.StatusCode,
5910 Header: res.Header,
5911 })
5912 }
5913 if err != nil {
5914 return nil, err
5915 }
5916 defer googleapi.CloseBody(res)
5917 if err := googleapi.CheckResponse(res); err != nil {
5918 return nil, gensupport.WrapError(err)
5919 }
5920 ret := &ResourceRecordSetsListResponse{
5921 ServerResponse: googleapi.ServerResponse{
5922 Header: res.Header,
5923 HTTPStatusCode: res.StatusCode,
5924 },
5925 }
5926 target := &ret
5927 if err := gensupport.DecodeResponse(target, res); err != nil {
5928 return nil, err
5929 }
5930 return ret, nil
5931 }
5932
5933
5934
5935
5936 func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
5937 c.ctx_ = ctx
5938 defer c.PageToken(c.urlParams_.Get("pageToken"))
5939 for {
5940 x, err := c.Do()
5941 if err != nil {
5942 return err
5943 }
5944 if err := f(x); err != nil {
5945 return err
5946 }
5947 if x.NextPageToken == "" {
5948 return nil
5949 }
5950 c.PageToken(x.NextPageToken)
5951 }
5952 }
5953
5954 type ResourceRecordSetsPatchCall struct {
5955 s *Service
5956 project string
5957 managedZone string
5958 name string
5959 type_ string
5960 resourcerecordset *ResourceRecordSet
5961 urlParams_ gensupport.URLParams
5962 ctx_ context.Context
5963 header_ http.Header
5964 }
5965
5966
5967
5968
5969
5970
5971
5972
5973 func (r *ResourceRecordSetsService) Patch(project string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall {
5974 c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5975 c.project = project
5976 c.managedZone = managedZone
5977 c.name = name
5978 c.type_ = type_
5979 c.resourcerecordset = resourcerecordset
5980 return c
5981 }
5982
5983
5984
5985
5986 func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall {
5987 c.urlParams_.Set("clientOperationId", clientOperationId)
5988 return c
5989 }
5990
5991
5992
5993
5994 func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall {
5995 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5996 return c
5997 }
5998
5999
6000 func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall {
6001 c.ctx_ = ctx
6002 return c
6003 }
6004
6005
6006
6007 func (c *ResourceRecordSetsPatchCall) Header() http.Header {
6008 if c.header_ == nil {
6009 c.header_ = make(http.Header)
6010 }
6011 return c.header_
6012 }
6013
6014 func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) {
6015 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6016 var body io.Reader = nil
6017 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
6018 if err != nil {
6019 return nil, err
6020 }
6021 c.urlParams_.Set("alt", alt)
6022 c.urlParams_.Set("prettyPrint", "false")
6023 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
6024 urls += "?" + c.urlParams_.Encode()
6025 req, err := http.NewRequest("PATCH", urls, body)
6026 if err != nil {
6027 return nil, err
6028 }
6029 req.Header = reqHeaders
6030 googleapi.Expand(req.URL, map[string]string{
6031 "project": c.project,
6032 "managedZone": c.managedZone,
6033 "name": c.name,
6034 "type": c.type_,
6035 })
6036 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6037 }
6038
6039
6040
6041
6042
6043
6044
6045 func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
6046 gensupport.SetOptions(c.urlParams_, opts...)
6047 res, err := c.doRequest("json")
6048 if res != nil && res.StatusCode == http.StatusNotModified {
6049 if res.Body != nil {
6050 res.Body.Close()
6051 }
6052 return nil, gensupport.WrapError(&googleapi.Error{
6053 Code: res.StatusCode,
6054 Header: res.Header,
6055 })
6056 }
6057 if err != nil {
6058 return nil, err
6059 }
6060 defer googleapi.CloseBody(res)
6061 if err := googleapi.CheckResponse(res); err != nil {
6062 return nil, gensupport.WrapError(err)
6063 }
6064 ret := &ResourceRecordSet{
6065 ServerResponse: googleapi.ServerResponse{
6066 Header: res.Header,
6067 HTTPStatusCode: res.StatusCode,
6068 },
6069 }
6070 target := &ret
6071 if err := gensupport.DecodeResponse(target, res); err != nil {
6072 return nil, err
6073 }
6074 return ret, nil
6075 }
6076
6077 type ResponsePoliciesCreateCall struct {
6078 s *Service
6079 project string
6080 responsepolicy *ResponsePolicy
6081 urlParams_ gensupport.URLParams
6082 ctx_ context.Context
6083 header_ http.Header
6084 }
6085
6086
6087
6088
6089 func (r *ResponsePoliciesService) Create(project string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall {
6090 c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6091 c.project = project
6092 c.responsepolicy = responsepolicy
6093 return c
6094 }
6095
6096
6097
6098
6099 func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall {
6100 c.urlParams_.Set("clientOperationId", clientOperationId)
6101 return c
6102 }
6103
6104
6105
6106
6107 func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall {
6108 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6109 return c
6110 }
6111
6112
6113 func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall {
6114 c.ctx_ = ctx
6115 return c
6116 }
6117
6118
6119
6120 func (c *ResponsePoliciesCreateCall) Header() http.Header {
6121 if c.header_ == nil {
6122 c.header_ = make(http.Header)
6123 }
6124 return c.header_
6125 }
6126
6127 func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
6128 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6129 var body io.Reader = nil
6130 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6131 if err != nil {
6132 return nil, err
6133 }
6134 c.urlParams_.Set("alt", alt)
6135 c.urlParams_.Set("prettyPrint", "false")
6136 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies")
6137 urls += "?" + c.urlParams_.Encode()
6138 req, err := http.NewRequest("POST", urls, body)
6139 if err != nil {
6140 return nil, err
6141 }
6142 req.Header = reqHeaders
6143 googleapi.Expand(req.URL, map[string]string{
6144 "project": c.project,
6145 })
6146 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6147 }
6148
6149
6150
6151
6152
6153
6154 func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
6155 gensupport.SetOptions(c.urlParams_, opts...)
6156 res, err := c.doRequest("json")
6157 if res != nil && res.StatusCode == http.StatusNotModified {
6158 if res.Body != nil {
6159 res.Body.Close()
6160 }
6161 return nil, gensupport.WrapError(&googleapi.Error{
6162 Code: res.StatusCode,
6163 Header: res.Header,
6164 })
6165 }
6166 if err != nil {
6167 return nil, err
6168 }
6169 defer googleapi.CloseBody(res)
6170 if err := googleapi.CheckResponse(res); err != nil {
6171 return nil, gensupport.WrapError(err)
6172 }
6173 ret := &ResponsePolicy{
6174 ServerResponse: googleapi.ServerResponse{
6175 Header: res.Header,
6176 HTTPStatusCode: res.StatusCode,
6177 },
6178 }
6179 target := &ret
6180 if err := gensupport.DecodeResponse(target, res); err != nil {
6181 return nil, err
6182 }
6183 return ret, nil
6184 }
6185
6186 type ResponsePoliciesDeleteCall struct {
6187 s *Service
6188 project string
6189 responsePolicy string
6190 urlParams_ gensupport.URLParams
6191 ctx_ context.Context
6192 header_ http.Header
6193 }
6194
6195
6196
6197
6198
6199
6200
6201 func (r *ResponsePoliciesService) Delete(project string, responsePolicy string) *ResponsePoliciesDeleteCall {
6202 c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6203 c.project = project
6204 c.responsePolicy = responsePolicy
6205 return c
6206 }
6207
6208
6209
6210
6211 func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall {
6212 c.urlParams_.Set("clientOperationId", clientOperationId)
6213 return c
6214 }
6215
6216
6217
6218
6219 func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall {
6220 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6221 return c
6222 }
6223
6224
6225 func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall {
6226 c.ctx_ = ctx
6227 return c
6228 }
6229
6230
6231
6232 func (c *ResponsePoliciesDeleteCall) Header() http.Header {
6233 if c.header_ == nil {
6234 c.header_ = make(http.Header)
6235 }
6236 return c.header_
6237 }
6238
6239 func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6241 var body io.Reader = nil
6242 c.urlParams_.Set("alt", alt)
6243 c.urlParams_.Set("prettyPrint", "false")
6244 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
6245 urls += "?" + c.urlParams_.Encode()
6246 req, err := http.NewRequest("DELETE", urls, body)
6247 if err != nil {
6248 return nil, err
6249 }
6250 req.Header = reqHeaders
6251 googleapi.Expand(req.URL, map[string]string{
6252 "project": c.project,
6253 "responsePolicy": c.responsePolicy,
6254 })
6255 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6256 }
6257
6258
6259 func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
6260 gensupport.SetOptions(c.urlParams_, opts...)
6261 res, err := c.doRequest("json")
6262 if err != nil {
6263 return err
6264 }
6265 defer googleapi.CloseBody(res)
6266 if err := googleapi.CheckResponse(res); err != nil {
6267 return gensupport.WrapError(err)
6268 }
6269 return nil
6270 }
6271
6272 type ResponsePoliciesGetCall struct {
6273 s *Service
6274 project string
6275 responsePolicy string
6276 urlParams_ gensupport.URLParams
6277 ifNoneMatch_ string
6278 ctx_ context.Context
6279 header_ http.Header
6280 }
6281
6282
6283
6284
6285
6286
6287 func (r *ResponsePoliciesService) Get(project string, responsePolicy string) *ResponsePoliciesGetCall {
6288 c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6289 c.project = project
6290 c.responsePolicy = responsePolicy
6291 return c
6292 }
6293
6294
6295
6296
6297 func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall {
6298 c.urlParams_.Set("clientOperationId", clientOperationId)
6299 return c
6300 }
6301
6302
6303
6304
6305 func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall {
6306 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6307 return c
6308 }
6309
6310
6311
6312
6313 func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall {
6314 c.ifNoneMatch_ = entityTag
6315 return c
6316 }
6317
6318
6319 func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall {
6320 c.ctx_ = ctx
6321 return c
6322 }
6323
6324
6325
6326 func (c *ResponsePoliciesGetCall) Header() http.Header {
6327 if c.header_ == nil {
6328 c.header_ = make(http.Header)
6329 }
6330 return c.header_
6331 }
6332
6333 func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
6334 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6335 if c.ifNoneMatch_ != "" {
6336 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6337 }
6338 var body io.Reader = nil
6339 c.urlParams_.Set("alt", alt)
6340 c.urlParams_.Set("prettyPrint", "false")
6341 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
6342 urls += "?" + c.urlParams_.Encode()
6343 req, err := http.NewRequest("GET", urls, body)
6344 if err != nil {
6345 return nil, err
6346 }
6347 req.Header = reqHeaders
6348 googleapi.Expand(req.URL, map[string]string{
6349 "project": c.project,
6350 "responsePolicy": c.responsePolicy,
6351 })
6352 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6353 }
6354
6355
6356
6357
6358
6359
6360 func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
6361 gensupport.SetOptions(c.urlParams_, opts...)
6362 res, err := c.doRequest("json")
6363 if res != nil && res.StatusCode == http.StatusNotModified {
6364 if res.Body != nil {
6365 res.Body.Close()
6366 }
6367 return nil, gensupport.WrapError(&googleapi.Error{
6368 Code: res.StatusCode,
6369 Header: res.Header,
6370 })
6371 }
6372 if err != nil {
6373 return nil, err
6374 }
6375 defer googleapi.CloseBody(res)
6376 if err := googleapi.CheckResponse(res); err != nil {
6377 return nil, gensupport.WrapError(err)
6378 }
6379 ret := &ResponsePolicy{
6380 ServerResponse: googleapi.ServerResponse{
6381 Header: res.Header,
6382 HTTPStatusCode: res.StatusCode,
6383 },
6384 }
6385 target := &ret
6386 if err := gensupport.DecodeResponse(target, res); err != nil {
6387 return nil, err
6388 }
6389 return ret, nil
6390 }
6391
6392 type ResponsePoliciesListCall struct {
6393 s *Service
6394 project string
6395 urlParams_ gensupport.URLParams
6396 ifNoneMatch_ string
6397 ctx_ context.Context
6398 header_ http.Header
6399 }
6400
6401
6402
6403
6404 func (r *ResponsePoliciesService) List(project string) *ResponsePoliciesListCall {
6405 c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6406 c.project = project
6407 return c
6408 }
6409
6410
6411
6412
6413 func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall {
6414 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6415 return c
6416 }
6417
6418
6419
6420
6421 func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall {
6422 c.urlParams_.Set("pageToken", pageToken)
6423 return c
6424 }
6425
6426
6427
6428
6429 func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall {
6430 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6431 return c
6432 }
6433
6434
6435
6436
6437 func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall {
6438 c.ifNoneMatch_ = entityTag
6439 return c
6440 }
6441
6442
6443 func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall {
6444 c.ctx_ = ctx
6445 return c
6446 }
6447
6448
6449
6450 func (c *ResponsePoliciesListCall) Header() http.Header {
6451 if c.header_ == nil {
6452 c.header_ = make(http.Header)
6453 }
6454 return c.header_
6455 }
6456
6457 func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) {
6458 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6459 if c.ifNoneMatch_ != "" {
6460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6461 }
6462 var body io.Reader = nil
6463 c.urlParams_.Set("alt", alt)
6464 c.urlParams_.Set("prettyPrint", "false")
6465 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies")
6466 urls += "?" + c.urlParams_.Encode()
6467 req, err := http.NewRequest("GET", urls, body)
6468 if err != nil {
6469 return nil, err
6470 }
6471 req.Header = reqHeaders
6472 googleapi.Expand(req.URL, map[string]string{
6473 "project": c.project,
6474 })
6475 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6476 }
6477
6478
6479
6480
6481
6482
6483
6484 func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) {
6485 gensupport.SetOptions(c.urlParams_, opts...)
6486 res, err := c.doRequest("json")
6487 if res != nil && res.StatusCode == http.StatusNotModified {
6488 if res.Body != nil {
6489 res.Body.Close()
6490 }
6491 return nil, gensupport.WrapError(&googleapi.Error{
6492 Code: res.StatusCode,
6493 Header: res.Header,
6494 })
6495 }
6496 if err != nil {
6497 return nil, err
6498 }
6499 defer googleapi.CloseBody(res)
6500 if err := googleapi.CheckResponse(res); err != nil {
6501 return nil, gensupport.WrapError(err)
6502 }
6503 ret := &ResponsePoliciesListResponse{
6504 ServerResponse: googleapi.ServerResponse{
6505 Header: res.Header,
6506 HTTPStatusCode: res.StatusCode,
6507 },
6508 }
6509 target := &ret
6510 if err := gensupport.DecodeResponse(target, res); err != nil {
6511 return nil, err
6512 }
6513 return ret, nil
6514 }
6515
6516
6517
6518
6519 func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error {
6520 c.ctx_ = ctx
6521 defer c.PageToken(c.urlParams_.Get("pageToken"))
6522 for {
6523 x, err := c.Do()
6524 if err != nil {
6525 return err
6526 }
6527 if err := f(x); err != nil {
6528 return err
6529 }
6530 if x.NextPageToken == "" {
6531 return nil
6532 }
6533 c.PageToken(x.NextPageToken)
6534 }
6535 }
6536
6537 type ResponsePoliciesPatchCall struct {
6538 s *Service
6539 project string
6540 responsePolicy string
6541 responsepolicy *ResponsePolicy
6542 urlParams_ gensupport.URLParams
6543 ctx_ context.Context
6544 header_ http.Header
6545 }
6546
6547
6548
6549
6550
6551
6552 func (r *ResponsePoliciesService) Patch(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall {
6553 c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6554 c.project = project
6555 c.responsePolicy = responsePolicy
6556 c.responsepolicy = responsepolicy
6557 return c
6558 }
6559
6560
6561
6562
6563 func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall {
6564 c.urlParams_.Set("clientOperationId", clientOperationId)
6565 return c
6566 }
6567
6568
6569
6570
6571 func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall {
6572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6573 return c
6574 }
6575
6576
6577 func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall {
6578 c.ctx_ = ctx
6579 return c
6580 }
6581
6582
6583
6584 func (c *ResponsePoliciesPatchCall) Header() http.Header {
6585 if c.header_ == nil {
6586 c.header_ = make(http.Header)
6587 }
6588 return c.header_
6589 }
6590
6591 func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
6592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6593 var body io.Reader = nil
6594 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6595 if err != nil {
6596 return nil, err
6597 }
6598 c.urlParams_.Set("alt", alt)
6599 c.urlParams_.Set("prettyPrint", "false")
6600 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
6601 urls += "?" + c.urlParams_.Encode()
6602 req, err := http.NewRequest("PATCH", urls, body)
6603 if err != nil {
6604 return nil, err
6605 }
6606 req.Header = reqHeaders
6607 googleapi.Expand(req.URL, map[string]string{
6608 "project": c.project,
6609 "responsePolicy": c.responsePolicy,
6610 })
6611 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6612 }
6613
6614
6615
6616
6617
6618
6619
6620 func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) {
6621 gensupport.SetOptions(c.urlParams_, opts...)
6622 res, err := c.doRequest("json")
6623 if res != nil && res.StatusCode == http.StatusNotModified {
6624 if res.Body != nil {
6625 res.Body.Close()
6626 }
6627 return nil, gensupport.WrapError(&googleapi.Error{
6628 Code: res.StatusCode,
6629 Header: res.Header,
6630 })
6631 }
6632 if err != nil {
6633 return nil, err
6634 }
6635 defer googleapi.CloseBody(res)
6636 if err := googleapi.CheckResponse(res); err != nil {
6637 return nil, gensupport.WrapError(err)
6638 }
6639 ret := &ResponsePoliciesPatchResponse{
6640 ServerResponse: googleapi.ServerResponse{
6641 Header: res.Header,
6642 HTTPStatusCode: res.StatusCode,
6643 },
6644 }
6645 target := &ret
6646 if err := gensupport.DecodeResponse(target, res); err != nil {
6647 return nil, err
6648 }
6649 return ret, nil
6650 }
6651
6652 type ResponsePoliciesUpdateCall struct {
6653 s *Service
6654 project string
6655 responsePolicy string
6656 responsepolicy *ResponsePolicy
6657 urlParams_ gensupport.URLParams
6658 ctx_ context.Context
6659 header_ http.Header
6660 }
6661
6662
6663
6664
6665
6666
6667 func (r *ResponsePoliciesService) Update(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall {
6668 c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6669 c.project = project
6670 c.responsePolicy = responsePolicy
6671 c.responsepolicy = responsepolicy
6672 return c
6673 }
6674
6675
6676
6677
6678 func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall {
6679 c.urlParams_.Set("clientOperationId", clientOperationId)
6680 return c
6681 }
6682
6683
6684
6685
6686 func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall {
6687 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6688 return c
6689 }
6690
6691
6692 func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall {
6693 c.ctx_ = ctx
6694 return c
6695 }
6696
6697
6698
6699 func (c *ResponsePoliciesUpdateCall) Header() http.Header {
6700 if c.header_ == nil {
6701 c.header_ = make(http.Header)
6702 }
6703 return c.header_
6704 }
6705
6706 func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
6707 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6708 var body io.Reader = nil
6709 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6710 if err != nil {
6711 return nil, err
6712 }
6713 c.urlParams_.Set("alt", alt)
6714 c.urlParams_.Set("prettyPrint", "false")
6715 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}")
6716 urls += "?" + c.urlParams_.Encode()
6717 req, err := http.NewRequest("PUT", urls, body)
6718 if err != nil {
6719 return nil, err
6720 }
6721 req.Header = reqHeaders
6722 googleapi.Expand(req.URL, map[string]string{
6723 "project": c.project,
6724 "responsePolicy": c.responsePolicy,
6725 })
6726 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6727 }
6728
6729
6730
6731
6732
6733
6734
6735 func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) {
6736 gensupport.SetOptions(c.urlParams_, opts...)
6737 res, err := c.doRequest("json")
6738 if res != nil && res.StatusCode == http.StatusNotModified {
6739 if res.Body != nil {
6740 res.Body.Close()
6741 }
6742 return nil, gensupport.WrapError(&googleapi.Error{
6743 Code: res.StatusCode,
6744 Header: res.Header,
6745 })
6746 }
6747 if err != nil {
6748 return nil, err
6749 }
6750 defer googleapi.CloseBody(res)
6751 if err := googleapi.CheckResponse(res); err != nil {
6752 return nil, gensupport.WrapError(err)
6753 }
6754 ret := &ResponsePoliciesUpdateResponse{
6755 ServerResponse: googleapi.ServerResponse{
6756 Header: res.Header,
6757 HTTPStatusCode: res.StatusCode,
6758 },
6759 }
6760 target := &ret
6761 if err := gensupport.DecodeResponse(target, res); err != nil {
6762 return nil, err
6763 }
6764 return ret, nil
6765 }
6766
6767 type ResponsePolicyRulesCreateCall struct {
6768 s *Service
6769 project string
6770 responsePolicy string
6771 responsepolicyrule *ResponsePolicyRule
6772 urlParams_ gensupport.URLParams
6773 ctx_ context.Context
6774 header_ http.Header
6775 }
6776
6777
6778
6779
6780
6781
6782 func (r *ResponsePolicyRulesService) Create(project string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall {
6783 c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6784 c.project = project
6785 c.responsePolicy = responsePolicy
6786 c.responsepolicyrule = responsepolicyrule
6787 return c
6788 }
6789
6790
6791
6792
6793 func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall {
6794 c.urlParams_.Set("clientOperationId", clientOperationId)
6795 return c
6796 }
6797
6798
6799
6800
6801 func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall {
6802 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6803 return c
6804 }
6805
6806
6807 func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall {
6808 c.ctx_ = ctx
6809 return c
6810 }
6811
6812
6813
6814 func (c *ResponsePolicyRulesCreateCall) Header() http.Header {
6815 if c.header_ == nil {
6816 c.header_ = make(http.Header)
6817 }
6818 return c.header_
6819 }
6820
6821 func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) {
6822 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6823 var body io.Reader = nil
6824 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
6825 if err != nil {
6826 return nil, err
6827 }
6828 c.urlParams_.Set("alt", alt)
6829 c.urlParams_.Set("prettyPrint", "false")
6830 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules")
6831 urls += "?" + c.urlParams_.Encode()
6832 req, err := http.NewRequest("POST", urls, body)
6833 if err != nil {
6834 return nil, err
6835 }
6836 req.Header = reqHeaders
6837 googleapi.Expand(req.URL, map[string]string{
6838 "project": c.project,
6839 "responsePolicy": c.responsePolicy,
6840 })
6841 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6842 }
6843
6844
6845
6846
6847
6848
6849
6850 func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
6851 gensupport.SetOptions(c.urlParams_, opts...)
6852 res, err := c.doRequest("json")
6853 if res != nil && res.StatusCode == http.StatusNotModified {
6854 if res.Body != nil {
6855 res.Body.Close()
6856 }
6857 return nil, gensupport.WrapError(&googleapi.Error{
6858 Code: res.StatusCode,
6859 Header: res.Header,
6860 })
6861 }
6862 if err != nil {
6863 return nil, err
6864 }
6865 defer googleapi.CloseBody(res)
6866 if err := googleapi.CheckResponse(res); err != nil {
6867 return nil, gensupport.WrapError(err)
6868 }
6869 ret := &ResponsePolicyRule{
6870 ServerResponse: googleapi.ServerResponse{
6871 Header: res.Header,
6872 HTTPStatusCode: res.StatusCode,
6873 },
6874 }
6875 target := &ret
6876 if err := gensupport.DecodeResponse(target, res); err != nil {
6877 return nil, err
6878 }
6879 return ret, nil
6880 }
6881
6882 type ResponsePolicyRulesDeleteCall struct {
6883 s *Service
6884 project string
6885 responsePolicy string
6886 responsePolicyRule string
6887 urlParams_ gensupport.URLParams
6888 ctx_ context.Context
6889 header_ http.Header
6890 }
6891
6892
6893
6894
6895
6896
6897
6898
6899 func (r *ResponsePolicyRulesService) Delete(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall {
6900 c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6901 c.project = project
6902 c.responsePolicy = responsePolicy
6903 c.responsePolicyRule = responsePolicyRule
6904 return c
6905 }
6906
6907
6908
6909
6910 func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall {
6911 c.urlParams_.Set("clientOperationId", clientOperationId)
6912 return c
6913 }
6914
6915
6916
6917
6918 func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall {
6919 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6920 return c
6921 }
6922
6923
6924 func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall {
6925 c.ctx_ = ctx
6926 return c
6927 }
6928
6929
6930
6931 func (c *ResponsePolicyRulesDeleteCall) Header() http.Header {
6932 if c.header_ == nil {
6933 c.header_ = make(http.Header)
6934 }
6935 return c.header_
6936 }
6937
6938 func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
6939 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6940 var body io.Reader = nil
6941 c.urlParams_.Set("alt", alt)
6942 c.urlParams_.Set("prettyPrint", "false")
6943 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
6944 urls += "?" + c.urlParams_.Encode()
6945 req, err := http.NewRequest("DELETE", urls, body)
6946 if err != nil {
6947 return nil, err
6948 }
6949 req.Header = reqHeaders
6950 googleapi.Expand(req.URL, map[string]string{
6951 "project": c.project,
6952 "responsePolicy": c.responsePolicy,
6953 "responsePolicyRule": c.responsePolicyRule,
6954 })
6955 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6956 }
6957
6958
6959 func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error {
6960 gensupport.SetOptions(c.urlParams_, opts...)
6961 res, err := c.doRequest("json")
6962 if err != nil {
6963 return err
6964 }
6965 defer googleapi.CloseBody(res)
6966 if err := googleapi.CheckResponse(res); err != nil {
6967 return gensupport.WrapError(err)
6968 }
6969 return nil
6970 }
6971
6972 type ResponsePolicyRulesGetCall struct {
6973 s *Service
6974 project string
6975 responsePolicy string
6976 responsePolicyRule string
6977 urlParams_ gensupport.URLParams
6978 ifNoneMatch_ string
6979 ctx_ context.Context
6980 header_ http.Header
6981 }
6982
6983
6984
6985
6986
6987
6988
6989
6990 func (r *ResponsePolicyRulesService) Get(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall {
6991 c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6992 c.project = project
6993 c.responsePolicy = responsePolicy
6994 c.responsePolicyRule = responsePolicyRule
6995 return c
6996 }
6997
6998
6999
7000
7001 func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall {
7002 c.urlParams_.Set("clientOperationId", clientOperationId)
7003 return c
7004 }
7005
7006
7007
7008
7009 func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall {
7010 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7011 return c
7012 }
7013
7014
7015
7016
7017 func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall {
7018 c.ifNoneMatch_ = entityTag
7019 return c
7020 }
7021
7022
7023 func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall {
7024 c.ctx_ = ctx
7025 return c
7026 }
7027
7028
7029
7030 func (c *ResponsePolicyRulesGetCall) Header() http.Header {
7031 if c.header_ == nil {
7032 c.header_ = make(http.Header)
7033 }
7034 return c.header_
7035 }
7036
7037 func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) {
7038 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7039 if c.ifNoneMatch_ != "" {
7040 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7041 }
7042 var body io.Reader = nil
7043 c.urlParams_.Set("alt", alt)
7044 c.urlParams_.Set("prettyPrint", "false")
7045 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7046 urls += "?" + c.urlParams_.Encode()
7047 req, err := http.NewRequest("GET", urls, body)
7048 if err != nil {
7049 return nil, err
7050 }
7051 req.Header = reqHeaders
7052 googleapi.Expand(req.URL, map[string]string{
7053 "project": c.project,
7054 "responsePolicy": c.responsePolicy,
7055 "responsePolicyRule": c.responsePolicyRule,
7056 })
7057 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7058 }
7059
7060
7061
7062
7063
7064
7065
7066 func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
7067 gensupport.SetOptions(c.urlParams_, opts...)
7068 res, err := c.doRequest("json")
7069 if res != nil && res.StatusCode == http.StatusNotModified {
7070 if res.Body != nil {
7071 res.Body.Close()
7072 }
7073 return nil, gensupport.WrapError(&googleapi.Error{
7074 Code: res.StatusCode,
7075 Header: res.Header,
7076 })
7077 }
7078 if err != nil {
7079 return nil, err
7080 }
7081 defer googleapi.CloseBody(res)
7082 if err := googleapi.CheckResponse(res); err != nil {
7083 return nil, gensupport.WrapError(err)
7084 }
7085 ret := &ResponsePolicyRule{
7086 ServerResponse: googleapi.ServerResponse{
7087 Header: res.Header,
7088 HTTPStatusCode: res.StatusCode,
7089 },
7090 }
7091 target := &ret
7092 if err := gensupport.DecodeResponse(target, res); err != nil {
7093 return nil, err
7094 }
7095 return ret, nil
7096 }
7097
7098 type ResponsePolicyRulesListCall struct {
7099 s *Service
7100 project string
7101 responsePolicy string
7102 urlParams_ gensupport.URLParams
7103 ifNoneMatch_ string
7104 ctx_ context.Context
7105 header_ http.Header
7106 }
7107
7108
7109
7110
7111
7112 func (r *ResponsePolicyRulesService) List(project string, responsePolicy string) *ResponsePolicyRulesListCall {
7113 c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7114 c.project = project
7115 c.responsePolicy = responsePolicy
7116 return c
7117 }
7118
7119
7120
7121
7122 func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall {
7123 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7124 return c
7125 }
7126
7127
7128
7129
7130 func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall {
7131 c.urlParams_.Set("pageToken", pageToken)
7132 return c
7133 }
7134
7135
7136
7137
7138 func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall {
7139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7140 return c
7141 }
7142
7143
7144
7145
7146 func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall {
7147 c.ifNoneMatch_ = entityTag
7148 return c
7149 }
7150
7151
7152 func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall {
7153 c.ctx_ = ctx
7154 return c
7155 }
7156
7157
7158
7159 func (c *ResponsePolicyRulesListCall) Header() http.Header {
7160 if c.header_ == nil {
7161 c.header_ = make(http.Header)
7162 }
7163 return c.header_
7164 }
7165
7166 func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) {
7167 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7168 if c.ifNoneMatch_ != "" {
7169 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7170 }
7171 var body io.Reader = nil
7172 c.urlParams_.Set("alt", alt)
7173 c.urlParams_.Set("prettyPrint", "false")
7174 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules")
7175 urls += "?" + c.urlParams_.Encode()
7176 req, err := http.NewRequest("GET", urls, body)
7177 if err != nil {
7178 return nil, err
7179 }
7180 req.Header = reqHeaders
7181 googleapi.Expand(req.URL, map[string]string{
7182 "project": c.project,
7183 "responsePolicy": c.responsePolicy,
7184 })
7185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7186 }
7187
7188
7189
7190
7191
7192
7193
7194 func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) {
7195 gensupport.SetOptions(c.urlParams_, opts...)
7196 res, err := c.doRequest("json")
7197 if res != nil && res.StatusCode == http.StatusNotModified {
7198 if res.Body != nil {
7199 res.Body.Close()
7200 }
7201 return nil, gensupport.WrapError(&googleapi.Error{
7202 Code: res.StatusCode,
7203 Header: res.Header,
7204 })
7205 }
7206 if err != nil {
7207 return nil, err
7208 }
7209 defer googleapi.CloseBody(res)
7210 if err := googleapi.CheckResponse(res); err != nil {
7211 return nil, gensupport.WrapError(err)
7212 }
7213 ret := &ResponsePolicyRulesListResponse{
7214 ServerResponse: googleapi.ServerResponse{
7215 Header: res.Header,
7216 HTTPStatusCode: res.StatusCode,
7217 },
7218 }
7219 target := &ret
7220 if err := gensupport.DecodeResponse(target, res); err != nil {
7221 return nil, err
7222 }
7223 return ret, nil
7224 }
7225
7226
7227
7228
7229 func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error {
7230 c.ctx_ = ctx
7231 defer c.PageToken(c.urlParams_.Get("pageToken"))
7232 for {
7233 x, err := c.Do()
7234 if err != nil {
7235 return err
7236 }
7237 if err := f(x); err != nil {
7238 return err
7239 }
7240 if x.NextPageToken == "" {
7241 return nil
7242 }
7243 c.PageToken(x.NextPageToken)
7244 }
7245 }
7246
7247 type ResponsePolicyRulesPatchCall struct {
7248 s *Service
7249 project string
7250 responsePolicy string
7251 responsePolicyRule string
7252 responsepolicyrule *ResponsePolicyRule
7253 urlParams_ gensupport.URLParams
7254 ctx_ context.Context
7255 header_ http.Header
7256 }
7257
7258
7259
7260
7261
7262
7263
7264
7265 func (r *ResponsePolicyRulesService) Patch(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall {
7266 c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7267 c.project = project
7268 c.responsePolicy = responsePolicy
7269 c.responsePolicyRule = responsePolicyRule
7270 c.responsepolicyrule = responsepolicyrule
7271 return c
7272 }
7273
7274
7275
7276
7277 func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall {
7278 c.urlParams_.Set("clientOperationId", clientOperationId)
7279 return c
7280 }
7281
7282
7283
7284
7285 func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall {
7286 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7287 return c
7288 }
7289
7290
7291 func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall {
7292 c.ctx_ = ctx
7293 return c
7294 }
7295
7296
7297
7298 func (c *ResponsePolicyRulesPatchCall) Header() http.Header {
7299 if c.header_ == nil {
7300 c.header_ = make(http.Header)
7301 }
7302 return c.header_
7303 }
7304
7305 func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) {
7306 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7307 var body io.Reader = nil
7308 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
7309 if err != nil {
7310 return nil, err
7311 }
7312 c.urlParams_.Set("alt", alt)
7313 c.urlParams_.Set("prettyPrint", "false")
7314 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7315 urls += "?" + c.urlParams_.Encode()
7316 req, err := http.NewRequest("PATCH", urls, body)
7317 if err != nil {
7318 return nil, err
7319 }
7320 req.Header = reqHeaders
7321 googleapi.Expand(req.URL, map[string]string{
7322 "project": c.project,
7323 "responsePolicy": c.responsePolicy,
7324 "responsePolicyRule": c.responsePolicyRule,
7325 })
7326 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7327 }
7328
7329
7330
7331
7332
7333
7334
7335 func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) {
7336 gensupport.SetOptions(c.urlParams_, opts...)
7337 res, err := c.doRequest("json")
7338 if res != nil && res.StatusCode == http.StatusNotModified {
7339 if res.Body != nil {
7340 res.Body.Close()
7341 }
7342 return nil, gensupport.WrapError(&googleapi.Error{
7343 Code: res.StatusCode,
7344 Header: res.Header,
7345 })
7346 }
7347 if err != nil {
7348 return nil, err
7349 }
7350 defer googleapi.CloseBody(res)
7351 if err := googleapi.CheckResponse(res); err != nil {
7352 return nil, gensupport.WrapError(err)
7353 }
7354 ret := &ResponsePolicyRulesPatchResponse{
7355 ServerResponse: googleapi.ServerResponse{
7356 Header: res.Header,
7357 HTTPStatusCode: res.StatusCode,
7358 },
7359 }
7360 target := &ret
7361 if err := gensupport.DecodeResponse(target, res); err != nil {
7362 return nil, err
7363 }
7364 return ret, nil
7365 }
7366
7367 type ResponsePolicyRulesUpdateCall struct {
7368 s *Service
7369 project string
7370 responsePolicy string
7371 responsePolicyRule string
7372 responsepolicyrule *ResponsePolicyRule
7373 urlParams_ gensupport.URLParams
7374 ctx_ context.Context
7375 header_ http.Header
7376 }
7377
7378
7379
7380
7381
7382
7383
7384
7385 func (r *ResponsePolicyRulesService) Update(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall {
7386 c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7387 c.project = project
7388 c.responsePolicy = responsePolicy
7389 c.responsePolicyRule = responsePolicyRule
7390 c.responsepolicyrule = responsepolicyrule
7391 return c
7392 }
7393
7394
7395
7396
7397 func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall {
7398 c.urlParams_.Set("clientOperationId", clientOperationId)
7399 return c
7400 }
7401
7402
7403
7404
7405 func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall {
7406 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7407 return c
7408 }
7409
7410
7411 func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall {
7412 c.ctx_ = ctx
7413 return c
7414 }
7415
7416
7417
7418 func (c *ResponsePolicyRulesUpdateCall) Header() http.Header {
7419 if c.header_ == nil {
7420 c.header_ = make(http.Header)
7421 }
7422 return c.header_
7423 }
7424
7425 func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
7426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7427 var body io.Reader = nil
7428 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
7429 if err != nil {
7430 return nil, err
7431 }
7432 c.urlParams_.Set("alt", alt)
7433 c.urlParams_.Set("prettyPrint", "false")
7434 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1beta2/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7435 urls += "?" + c.urlParams_.Encode()
7436 req, err := http.NewRequest("PUT", urls, body)
7437 if err != nil {
7438 return nil, err
7439 }
7440 req.Header = reqHeaders
7441 googleapi.Expand(req.URL, map[string]string{
7442 "project": c.project,
7443 "responsePolicy": c.responsePolicy,
7444 "responsePolicyRule": c.responsePolicyRule,
7445 })
7446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7447 }
7448
7449
7450
7451
7452
7453
7454
7455 func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) {
7456 gensupport.SetOptions(c.urlParams_, opts...)
7457 res, err := c.doRequest("json")
7458 if res != nil && res.StatusCode == http.StatusNotModified {
7459 if res.Body != nil {
7460 res.Body.Close()
7461 }
7462 return nil, gensupport.WrapError(&googleapi.Error{
7463 Code: res.StatusCode,
7464 Header: res.Header,
7465 })
7466 }
7467 if err != nil {
7468 return nil, err
7469 }
7470 defer googleapi.CloseBody(res)
7471 if err := googleapi.CheckResponse(res); err != nil {
7472 return nil, gensupport.WrapError(err)
7473 }
7474 ret := &ResponsePolicyRulesUpdateResponse{
7475 ServerResponse: googleapi.ServerResponse{
7476 Header: res.Header,
7477 HTTPStatusCode: res.StatusCode,
7478 },
7479 }
7480 target := &ret
7481 if err := gensupport.DecodeResponse(target, res); err != nil {
7482 return nil, err
7483 }
7484 return ret, nil
7485 }
7486
View as plain text