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:v1"
95 const apiName = "dns"
96 const apiVersion = "v1"
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 Kind string `json:"kind,omitempty"`
1927 PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"`
1928 Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"`
1929
1930
1931
1932
1933
1934 ForceSendFields []string `json:"-"`
1935
1936
1937
1938
1939 NullFields []string `json:"-"`
1940 }
1941
1942 func (s *RRSetRoutingPolicy) MarshalJSON() ([]byte, error) {
1943 type NoMethod RRSetRoutingPolicy
1944 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1945 }
1946
1947
1948
1949 type RRSetRoutingPolicyGeoPolicy struct {
1950
1951
1952
1953
1954
1955
1956
1957 EnableFencing bool `json:"enableFencing,omitempty"`
1958
1959
1960 Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"`
1961 Kind string `json:"kind,omitempty"`
1962
1963
1964
1965
1966
1967 ForceSendFields []string `json:"-"`
1968
1969
1970
1971
1972 NullFields []string `json:"-"`
1973 }
1974
1975 func (s *RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) {
1976 type NoMethod RRSetRoutingPolicyGeoPolicy
1977 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1978 }
1979
1980
1981
1982 type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct {
1983
1984
1985
1986 HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
1987 Kind string `json:"kind,omitempty"`
1988
1989
1990
1991 Location string `json:"location,omitempty"`
1992 Rrdatas []string `json:"rrdatas,omitempty"`
1993
1994
1995
1996 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
1997
1998
1999
2000
2001
2002 ForceSendFields []string `json:"-"`
2003
2004
2005
2006
2007 NullFields []string `json:"-"`
2008 }
2009
2010 func (s *RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) {
2011 type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem
2012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2013 }
2014
2015
2016
2017
2018
2019 type RRSetRoutingPolicyHealthCheckTargets struct {
2020
2021
2022 InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"`
2023
2024
2025
2026
2027
2028 ForceSendFields []string `json:"-"`
2029
2030
2031
2032
2033 NullFields []string `json:"-"`
2034 }
2035
2036 func (s *RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) {
2037 type NoMethod RRSetRoutingPolicyHealthCheckTargets
2038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2039 }
2040
2041
2042
2043 type RRSetRoutingPolicyLoadBalancerTarget struct {
2044
2045 IpAddress string `json:"ipAddress,omitempty"`
2046
2047
2048
2049
2050
2051
2052 IpProtocol string `json:"ipProtocol,omitempty"`
2053 Kind string `json:"kind,omitempty"`
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066 LoadBalancerType string `json:"loadBalancerType,omitempty"`
2067
2068
2069
2070
2071 NetworkUrl string `json:"networkUrl,omitempty"`
2072
2073 Port string `json:"port,omitempty"`
2074
2075 Project string `json:"project,omitempty"`
2076
2077 Region string `json:"region,omitempty"`
2078
2079
2080
2081
2082
2083 ForceSendFields []string `json:"-"`
2084
2085
2086
2087
2088 NullFields []string `json:"-"`
2089 }
2090
2091 func (s *RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) {
2092 type NoMethod RRSetRoutingPolicyLoadBalancerTarget
2093 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2094 }
2095
2096
2097
2098
2099
2100 type RRSetRoutingPolicyPrimaryBackupPolicy struct {
2101
2102
2103
2104 BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"`
2105 Kind string `json:"kind,omitempty"`
2106
2107
2108
2109 PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"`
2110
2111
2112 TrickleTraffic float64 `json:"trickleTraffic,omitempty"`
2113
2114
2115
2116
2117
2118 ForceSendFields []string `json:"-"`
2119
2120
2121
2122
2123 NullFields []string `json:"-"`
2124 }
2125
2126 func (s *RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) {
2127 type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
2128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2129 }
2130
2131 func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error {
2132 type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy
2133 var s1 struct {
2134 TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"`
2135 *NoMethod
2136 }
2137 s1.NoMethod = (*NoMethod)(s)
2138 if err := json.Unmarshal(data, &s1); err != nil {
2139 return err
2140 }
2141 s.TrickleTraffic = float64(s1.TrickleTraffic)
2142 return nil
2143 }
2144
2145
2146
2147 type RRSetRoutingPolicyWrrPolicy struct {
2148 Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"`
2149 Kind string `json:"kind,omitempty"`
2150
2151
2152
2153
2154
2155 ForceSendFields []string `json:"-"`
2156
2157
2158
2159
2160 NullFields []string `json:"-"`
2161 }
2162
2163 func (s *RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) {
2164 type NoMethod RRSetRoutingPolicyWrrPolicy
2165 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2166 }
2167
2168
2169
2170 type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct {
2171
2172
2173
2174
2175
2176 HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"`
2177 Kind string `json:"kind,omitempty"`
2178 Rrdatas []string `json:"rrdatas,omitempty"`
2179
2180
2181
2182 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
2183
2184
2185
2186
2187 Weight float64 `json:"weight,omitempty"`
2188
2189
2190
2191
2192
2193 ForceSendFields []string `json:"-"`
2194
2195
2196
2197
2198 NullFields []string `json:"-"`
2199 }
2200
2201 func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) {
2202 type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
2203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2204 }
2205
2206 func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error {
2207 type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem
2208 var s1 struct {
2209 Weight gensupport.JSONFloat64 `json:"weight"`
2210 *NoMethod
2211 }
2212 s1.NoMethod = (*NoMethod)(s)
2213 if err := json.Unmarshal(data, &s1); err != nil {
2214 return err
2215 }
2216 s.Weight = float64(s1.Weight)
2217 return nil
2218 }
2219
2220
2221 type ResourceRecordSet struct {
2222 Kind string `json:"kind,omitempty"`
2223
2224 Name string `json:"name,omitempty"`
2225
2226
2227
2228
2229 RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"`
2230
2231
2232 Rrdatas []string `json:"rrdatas,omitempty"`
2233
2234 SignatureRrdatas []string `json:"signatureRrdatas,omitempty"`
2235
2236
2237 Ttl int64 `json:"ttl,omitempty"`
2238
2239
2240 Type string `json:"type,omitempty"`
2241
2242
2243 googleapi.ServerResponse `json:"-"`
2244
2245
2246
2247
2248
2249 ForceSendFields []string `json:"-"`
2250
2251
2252
2253
2254 NullFields []string `json:"-"`
2255 }
2256
2257 func (s *ResourceRecordSet) MarshalJSON() ([]byte, error) {
2258 type NoMethod ResourceRecordSet
2259 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2260 }
2261
2262 type ResourceRecordSetsDeleteResponse struct {
2263
2264 googleapi.ServerResponse `json:"-"`
2265 }
2266
2267 type ResourceRecordSetsListResponse struct {
2268 Header *ResponseHeader `json:"header,omitempty"`
2269
2270 Kind string `json:"kind,omitempty"`
2271
2272
2273
2274
2275
2276
2277
2278
2279 NextPageToken string `json:"nextPageToken,omitempty"`
2280
2281 Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"`
2282
2283
2284 googleapi.ServerResponse `json:"-"`
2285
2286
2287
2288
2289
2290 ForceSendFields []string `json:"-"`
2291
2292
2293
2294
2295 NullFields []string `json:"-"`
2296 }
2297
2298 func (s *ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) {
2299 type NoMethod ResourceRecordSetsListResponse
2300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2301 }
2302
2303
2304 type ResponseHeader struct {
2305
2306
2307
2308 OperationId string `json:"operationId,omitempty"`
2309
2310
2311
2312
2313
2314 ForceSendFields []string `json:"-"`
2315
2316
2317
2318
2319 NullFields []string `json:"-"`
2320 }
2321
2322 func (s *ResponseHeader) MarshalJSON() ([]byte, error) {
2323 type NoMethod ResponseHeader
2324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2325 }
2326
2327 type ResponsePoliciesListResponse struct {
2328 Header *ResponseHeader `json:"header,omitempty"`
2329
2330
2331
2332
2333
2334
2335
2336
2337 NextPageToken string `json:"nextPageToken,omitempty"`
2338
2339 ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"`
2340
2341
2342 googleapi.ServerResponse `json:"-"`
2343
2344
2345
2346
2347
2348 ForceSendFields []string `json:"-"`
2349
2350
2351
2352
2353 NullFields []string `json:"-"`
2354 }
2355
2356 func (s *ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) {
2357 type NoMethod ResponsePoliciesListResponse
2358 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2359 }
2360
2361 type ResponsePoliciesPatchResponse struct {
2362 Header *ResponseHeader `json:"header,omitempty"`
2363 ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
2364
2365
2366 googleapi.ServerResponse `json:"-"`
2367
2368
2369
2370
2371
2372 ForceSendFields []string `json:"-"`
2373
2374
2375
2376
2377 NullFields []string `json:"-"`
2378 }
2379
2380 func (s *ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) {
2381 type NoMethod ResponsePoliciesPatchResponse
2382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2383 }
2384
2385 type ResponsePoliciesUpdateResponse struct {
2386 Header *ResponseHeader `json:"header,omitempty"`
2387 ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"`
2388
2389
2390 googleapi.ServerResponse `json:"-"`
2391
2392
2393
2394
2395
2396 ForceSendFields []string `json:"-"`
2397
2398
2399
2400
2401 NullFields []string `json:"-"`
2402 }
2403
2404 func (s *ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) {
2405 type NoMethod ResponsePoliciesUpdateResponse
2406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2407 }
2408
2409
2410
2411 type ResponsePolicy struct {
2412
2413 Description string `json:"description,omitempty"`
2414
2415
2416 GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"`
2417
2418 Id int64 `json:"id,omitempty,string"`
2419 Kind string `json:"kind,omitempty"`
2420
2421 Labels map[string]string `json:"labels,omitempty"`
2422
2423
2424 Networks []*ResponsePolicyNetwork `json:"networks,omitempty"`
2425
2426 ResponsePolicyName string `json:"responsePolicyName,omitempty"`
2427
2428
2429 googleapi.ServerResponse `json:"-"`
2430
2431
2432
2433
2434
2435 ForceSendFields []string `json:"-"`
2436
2437
2438
2439
2440 NullFields []string `json:"-"`
2441 }
2442
2443 func (s *ResponsePolicy) MarshalJSON() ([]byte, error) {
2444 type NoMethod ResponsePolicy
2445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2446 }
2447
2448 type ResponsePolicyGKECluster struct {
2449
2450
2451
2452
2453
2454 GkeClusterName string `json:"gkeClusterName,omitempty"`
2455 Kind string `json:"kind,omitempty"`
2456
2457
2458
2459
2460
2461 ForceSendFields []string `json:"-"`
2462
2463
2464
2465
2466 NullFields []string `json:"-"`
2467 }
2468
2469 func (s *ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) {
2470 type NoMethod ResponsePolicyGKECluster
2471 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2472 }
2473
2474 type ResponsePolicyNetwork struct {
2475 Kind string `json:"kind,omitempty"`
2476
2477
2478
2479 NetworkUrl string `json:"networkUrl,omitempty"`
2480
2481
2482
2483
2484
2485 ForceSendFields []string `json:"-"`
2486
2487
2488
2489
2490 NullFields []string `json:"-"`
2491 }
2492
2493 func (s *ResponsePolicyNetwork) MarshalJSON() ([]byte, error) {
2494 type NoMethod ResponsePolicyNetwork
2495 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2496 }
2497
2498
2499
2500
2501
2502
2503 type ResponsePolicyRule struct {
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520 Behavior string `json:"behavior,omitempty"`
2521
2522
2523 DnsName string `json:"dnsName,omitempty"`
2524 Kind string `json:"kind,omitempty"`
2525
2526
2527
2528
2529 LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"`
2530
2531
2532 RuleName string `json:"ruleName,omitempty"`
2533
2534
2535 googleapi.ServerResponse `json:"-"`
2536
2537
2538
2539
2540
2541 ForceSendFields []string `json:"-"`
2542
2543
2544
2545
2546 NullFields []string `json:"-"`
2547 }
2548
2549 func (s *ResponsePolicyRule) MarshalJSON() ([]byte, error) {
2550 type NoMethod ResponsePolicyRule
2551 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2552 }
2553
2554 type ResponsePolicyRuleLocalData struct {
2555
2556
2557 LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"`
2558
2559
2560
2561
2562
2563 ForceSendFields []string `json:"-"`
2564
2565
2566
2567
2568 NullFields []string `json:"-"`
2569 }
2570
2571 func (s *ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) {
2572 type NoMethod ResponsePolicyRuleLocalData
2573 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2574 }
2575
2576 type ResponsePolicyRulesListResponse struct {
2577 Header *ResponseHeader `json:"header,omitempty"`
2578
2579
2580
2581
2582
2583
2584
2585
2586 NextPageToken string `json:"nextPageToken,omitempty"`
2587
2588 ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"`
2589
2590
2591 googleapi.ServerResponse `json:"-"`
2592
2593
2594
2595
2596
2597 ForceSendFields []string `json:"-"`
2598
2599
2600
2601
2602 NullFields []string `json:"-"`
2603 }
2604
2605 func (s *ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) {
2606 type NoMethod ResponsePolicyRulesListResponse
2607 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2608 }
2609
2610 type ResponsePolicyRulesPatchResponse struct {
2611 Header *ResponseHeader `json:"header,omitempty"`
2612 ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
2613
2614
2615 googleapi.ServerResponse `json:"-"`
2616
2617
2618
2619
2620
2621 ForceSendFields []string `json:"-"`
2622
2623
2624
2625
2626 NullFields []string `json:"-"`
2627 }
2628
2629 func (s *ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) {
2630 type NoMethod ResponsePolicyRulesPatchResponse
2631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2632 }
2633
2634 type ResponsePolicyRulesUpdateResponse struct {
2635 Header *ResponseHeader `json:"header,omitempty"`
2636 ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"`
2637
2638
2639 googleapi.ServerResponse `json:"-"`
2640
2641
2642
2643
2644
2645 ForceSendFields []string `json:"-"`
2646
2647
2648
2649
2650 NullFields []string `json:"-"`
2651 }
2652
2653 func (s *ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) {
2654 type NoMethod ResponsePolicyRulesUpdateResponse
2655 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2656 }
2657
2658 type ChangesCreateCall struct {
2659 s *Service
2660 project string
2661 managedZone string
2662 change *Change
2663 urlParams_ gensupport.URLParams
2664 ctx_ context.Context
2665 header_ http.Header
2666 }
2667
2668
2669
2670
2671
2672
2673 func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall {
2674 c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2675 c.project = project
2676 c.managedZone = managedZone
2677 c.change = change
2678 return c
2679 }
2680
2681
2682
2683
2684 func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall {
2685 c.urlParams_.Set("clientOperationId", clientOperationId)
2686 return c
2687 }
2688
2689
2690
2691
2692 func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall {
2693 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2694 return c
2695 }
2696
2697
2698 func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
2699 c.ctx_ = ctx
2700 return c
2701 }
2702
2703
2704
2705 func (c *ChangesCreateCall) Header() http.Header {
2706 if c.header_ == nil {
2707 c.header_ = make(http.Header)
2708 }
2709 return c.header_
2710 }
2711
2712 func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
2713 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2714 var body io.Reader = nil
2715 body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
2716 if err != nil {
2717 return nil, err
2718 }
2719 c.urlParams_.Set("alt", alt)
2720 c.urlParams_.Set("prettyPrint", "false")
2721 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes")
2722 urls += "?" + c.urlParams_.Encode()
2723 req, err := http.NewRequest("POST", urls, body)
2724 if err != nil {
2725 return nil, err
2726 }
2727 req.Header = reqHeaders
2728 googleapi.Expand(req.URL, map[string]string{
2729 "project": c.project,
2730 "managedZone": c.managedZone,
2731 })
2732 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2733 }
2734
2735
2736
2737
2738
2739
2740 func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) {
2741 gensupport.SetOptions(c.urlParams_, opts...)
2742 res, err := c.doRequest("json")
2743 if res != nil && res.StatusCode == http.StatusNotModified {
2744 if res.Body != nil {
2745 res.Body.Close()
2746 }
2747 return nil, gensupport.WrapError(&googleapi.Error{
2748 Code: res.StatusCode,
2749 Header: res.Header,
2750 })
2751 }
2752 if err != nil {
2753 return nil, err
2754 }
2755 defer googleapi.CloseBody(res)
2756 if err := googleapi.CheckResponse(res); err != nil {
2757 return nil, gensupport.WrapError(err)
2758 }
2759 ret := &Change{
2760 ServerResponse: googleapi.ServerResponse{
2761 Header: res.Header,
2762 HTTPStatusCode: res.StatusCode,
2763 },
2764 }
2765 target := &ret
2766 if err := gensupport.DecodeResponse(target, res); err != nil {
2767 return nil, err
2768 }
2769 return ret, nil
2770 }
2771
2772 type ChangesGetCall struct {
2773 s *Service
2774 project string
2775 managedZone string
2776 changeId string
2777 urlParams_ gensupport.URLParams
2778 ifNoneMatch_ string
2779 ctx_ context.Context
2780 header_ http.Header
2781 }
2782
2783
2784
2785
2786
2787
2788
2789
2790 func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall {
2791 c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2792 c.project = project
2793 c.managedZone = managedZone
2794 c.changeId = changeId
2795 return c
2796 }
2797
2798
2799
2800
2801 func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall {
2802 c.urlParams_.Set("clientOperationId", clientOperationId)
2803 return c
2804 }
2805
2806
2807
2808
2809 func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall {
2810 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2811 return c
2812 }
2813
2814
2815
2816
2817 func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall {
2818 c.ifNoneMatch_ = entityTag
2819 return c
2820 }
2821
2822
2823 func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
2824 c.ctx_ = ctx
2825 return c
2826 }
2827
2828
2829
2830 func (c *ChangesGetCall) Header() http.Header {
2831 if c.header_ == nil {
2832 c.header_ = make(http.Header)
2833 }
2834 return c.header_
2835 }
2836
2837 func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
2838 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2839 if c.ifNoneMatch_ != "" {
2840 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2841 }
2842 var body io.Reader = nil
2843 c.urlParams_.Set("alt", alt)
2844 c.urlParams_.Set("prettyPrint", "false")
2845 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}")
2846 urls += "?" + c.urlParams_.Encode()
2847 req, err := http.NewRequest("GET", urls, body)
2848 if err != nil {
2849 return nil, err
2850 }
2851 req.Header = reqHeaders
2852 googleapi.Expand(req.URL, map[string]string{
2853 "project": c.project,
2854 "managedZone": c.managedZone,
2855 "changeId": c.changeId,
2856 })
2857 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2858 }
2859
2860
2861
2862
2863
2864
2865 func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) {
2866 gensupport.SetOptions(c.urlParams_, opts...)
2867 res, err := c.doRequest("json")
2868 if res != nil && res.StatusCode == http.StatusNotModified {
2869 if res.Body != nil {
2870 res.Body.Close()
2871 }
2872 return nil, gensupport.WrapError(&googleapi.Error{
2873 Code: res.StatusCode,
2874 Header: res.Header,
2875 })
2876 }
2877 if err != nil {
2878 return nil, err
2879 }
2880 defer googleapi.CloseBody(res)
2881 if err := googleapi.CheckResponse(res); err != nil {
2882 return nil, gensupport.WrapError(err)
2883 }
2884 ret := &Change{
2885 ServerResponse: googleapi.ServerResponse{
2886 Header: res.Header,
2887 HTTPStatusCode: res.StatusCode,
2888 },
2889 }
2890 target := &ret
2891 if err := gensupport.DecodeResponse(target, res); err != nil {
2892 return nil, err
2893 }
2894 return ret, nil
2895 }
2896
2897 type ChangesListCall struct {
2898 s *Service
2899 project string
2900 managedZone string
2901 urlParams_ gensupport.URLParams
2902 ifNoneMatch_ string
2903 ctx_ context.Context
2904 header_ http.Header
2905 }
2906
2907
2908
2909
2910
2911
2912 func (r *ChangesService) List(project string, managedZone string) *ChangesListCall {
2913 c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2914 c.project = project
2915 c.managedZone = managedZone
2916 return c
2917 }
2918
2919
2920
2921
2922 func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall {
2923 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
2924 return c
2925 }
2926
2927
2928
2929
2930 func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall {
2931 c.urlParams_.Set("pageToken", pageToken)
2932 return c
2933 }
2934
2935
2936
2937
2938
2939
2940
2941 func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall {
2942 c.urlParams_.Set("sortBy", sortBy)
2943 return c
2944 }
2945
2946
2947
2948 func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall {
2949 c.urlParams_.Set("sortOrder", sortOrder)
2950 return c
2951 }
2952
2953
2954
2955
2956 func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall {
2957 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2958 return c
2959 }
2960
2961
2962
2963
2964 func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall {
2965 c.ifNoneMatch_ = entityTag
2966 return c
2967 }
2968
2969
2970 func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
2971 c.ctx_ = ctx
2972 return c
2973 }
2974
2975
2976
2977 func (c *ChangesListCall) Header() http.Header {
2978 if c.header_ == nil {
2979 c.header_ = make(http.Header)
2980 }
2981 return c.header_
2982 }
2983
2984 func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
2985 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2986 if c.ifNoneMatch_ != "" {
2987 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2988 }
2989 var body io.Reader = nil
2990 c.urlParams_.Set("alt", alt)
2991 c.urlParams_.Set("prettyPrint", "false")
2992 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes")
2993 urls += "?" + c.urlParams_.Encode()
2994 req, err := http.NewRequest("GET", urls, body)
2995 if err != nil {
2996 return nil, err
2997 }
2998 req.Header = reqHeaders
2999 googleapi.Expand(req.URL, map[string]string{
3000 "project": c.project,
3001 "managedZone": c.managedZone,
3002 })
3003 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3004 }
3005
3006
3007
3008
3009
3010
3011
3012 func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) {
3013 gensupport.SetOptions(c.urlParams_, opts...)
3014 res, err := c.doRequest("json")
3015 if res != nil && res.StatusCode == http.StatusNotModified {
3016 if res.Body != nil {
3017 res.Body.Close()
3018 }
3019 return nil, gensupport.WrapError(&googleapi.Error{
3020 Code: res.StatusCode,
3021 Header: res.Header,
3022 })
3023 }
3024 if err != nil {
3025 return nil, err
3026 }
3027 defer googleapi.CloseBody(res)
3028 if err := googleapi.CheckResponse(res); err != nil {
3029 return nil, gensupport.WrapError(err)
3030 }
3031 ret := &ChangesListResponse{
3032 ServerResponse: googleapi.ServerResponse{
3033 Header: res.Header,
3034 HTTPStatusCode: res.StatusCode,
3035 },
3036 }
3037 target := &ret
3038 if err := gensupport.DecodeResponse(target, res); err != nil {
3039 return nil, err
3040 }
3041 return ret, nil
3042 }
3043
3044
3045
3046
3047 func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error {
3048 c.ctx_ = ctx
3049 defer c.PageToken(c.urlParams_.Get("pageToken"))
3050 for {
3051 x, err := c.Do()
3052 if err != nil {
3053 return err
3054 }
3055 if err := f(x); err != nil {
3056 return err
3057 }
3058 if x.NextPageToken == "" {
3059 return nil
3060 }
3061 c.PageToken(x.NextPageToken)
3062 }
3063 }
3064
3065 type DnsKeysGetCall struct {
3066 s *Service
3067 project string
3068 managedZone string
3069 dnsKeyId string
3070 urlParams_ gensupport.URLParams
3071 ifNoneMatch_ string
3072 ctx_ context.Context
3073 header_ http.Header
3074 }
3075
3076
3077
3078
3079
3080
3081
3082 func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall {
3083 c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3084 c.project = project
3085 c.managedZone = managedZone
3086 c.dnsKeyId = dnsKeyId
3087 return c
3088 }
3089
3090
3091
3092
3093 func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall {
3094 c.urlParams_.Set("clientOperationId", clientOperationId)
3095 return c
3096 }
3097
3098
3099
3100
3101 func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall {
3102 c.urlParams_.Set("digestType", digestType)
3103 return c
3104 }
3105
3106
3107
3108
3109 func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall {
3110 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3111 return c
3112 }
3113
3114
3115
3116
3117 func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall {
3118 c.ifNoneMatch_ = entityTag
3119 return c
3120 }
3121
3122
3123 func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall {
3124 c.ctx_ = ctx
3125 return c
3126 }
3127
3128
3129
3130 func (c *DnsKeysGetCall) Header() http.Header {
3131 if c.header_ == nil {
3132 c.header_ = make(http.Header)
3133 }
3134 return c.header_
3135 }
3136
3137 func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) {
3138 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3139 if c.ifNoneMatch_ != "" {
3140 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3141 }
3142 var body io.Reader = nil
3143 c.urlParams_.Set("alt", alt)
3144 c.urlParams_.Set("prettyPrint", "false")
3145 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}")
3146 urls += "?" + c.urlParams_.Encode()
3147 req, err := http.NewRequest("GET", urls, body)
3148 if err != nil {
3149 return nil, err
3150 }
3151 req.Header = reqHeaders
3152 googleapi.Expand(req.URL, map[string]string{
3153 "project": c.project,
3154 "managedZone": c.managedZone,
3155 "dnsKeyId": c.dnsKeyId,
3156 })
3157 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3158 }
3159
3160
3161
3162
3163
3164
3165 func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) {
3166 gensupport.SetOptions(c.urlParams_, opts...)
3167 res, err := c.doRequest("json")
3168 if res != nil && res.StatusCode == http.StatusNotModified {
3169 if res.Body != nil {
3170 res.Body.Close()
3171 }
3172 return nil, gensupport.WrapError(&googleapi.Error{
3173 Code: res.StatusCode,
3174 Header: res.Header,
3175 })
3176 }
3177 if err != nil {
3178 return nil, err
3179 }
3180 defer googleapi.CloseBody(res)
3181 if err := googleapi.CheckResponse(res); err != nil {
3182 return nil, gensupport.WrapError(err)
3183 }
3184 ret := &DnsKey{
3185 ServerResponse: googleapi.ServerResponse{
3186 Header: res.Header,
3187 HTTPStatusCode: res.StatusCode,
3188 },
3189 }
3190 target := &ret
3191 if err := gensupport.DecodeResponse(target, res); err != nil {
3192 return nil, err
3193 }
3194 return ret, nil
3195 }
3196
3197 type DnsKeysListCall struct {
3198 s *Service
3199 project string
3200 managedZone string
3201 urlParams_ gensupport.URLParams
3202 ifNoneMatch_ string
3203 ctx_ context.Context
3204 header_ http.Header
3205 }
3206
3207
3208
3209
3210
3211
3212 func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall {
3213 c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3214 c.project = project
3215 c.managedZone = managedZone
3216 return c
3217 }
3218
3219
3220
3221
3222 func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall {
3223 c.urlParams_.Set("digestType", digestType)
3224 return c
3225 }
3226
3227
3228
3229
3230 func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall {
3231 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3232 return c
3233 }
3234
3235
3236
3237
3238 func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall {
3239 c.urlParams_.Set("pageToken", pageToken)
3240 return c
3241 }
3242
3243
3244
3245
3246 func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall {
3247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3248 return c
3249 }
3250
3251
3252
3253
3254 func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall {
3255 c.ifNoneMatch_ = entityTag
3256 return c
3257 }
3258
3259
3260 func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall {
3261 c.ctx_ = ctx
3262 return c
3263 }
3264
3265
3266
3267 func (c *DnsKeysListCall) Header() http.Header {
3268 if c.header_ == nil {
3269 c.header_ = make(http.Header)
3270 }
3271 return c.header_
3272 }
3273
3274 func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) {
3275 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3276 if c.ifNoneMatch_ != "" {
3277 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3278 }
3279 var body io.Reader = nil
3280 c.urlParams_.Set("alt", alt)
3281 c.urlParams_.Set("prettyPrint", "false")
3282 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys")
3283 urls += "?" + c.urlParams_.Encode()
3284 req, err := http.NewRequest("GET", urls, body)
3285 if err != nil {
3286 return nil, err
3287 }
3288 req.Header = reqHeaders
3289 googleapi.Expand(req.URL, map[string]string{
3290 "project": c.project,
3291 "managedZone": c.managedZone,
3292 })
3293 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3294 }
3295
3296
3297
3298
3299
3300
3301
3302 func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) {
3303 gensupport.SetOptions(c.urlParams_, opts...)
3304 res, err := c.doRequest("json")
3305 if res != nil && res.StatusCode == http.StatusNotModified {
3306 if res.Body != nil {
3307 res.Body.Close()
3308 }
3309 return nil, gensupport.WrapError(&googleapi.Error{
3310 Code: res.StatusCode,
3311 Header: res.Header,
3312 })
3313 }
3314 if err != nil {
3315 return nil, err
3316 }
3317 defer googleapi.CloseBody(res)
3318 if err := googleapi.CheckResponse(res); err != nil {
3319 return nil, gensupport.WrapError(err)
3320 }
3321 ret := &DnsKeysListResponse{
3322 ServerResponse: googleapi.ServerResponse{
3323 Header: res.Header,
3324 HTTPStatusCode: res.StatusCode,
3325 },
3326 }
3327 target := &ret
3328 if err := gensupport.DecodeResponse(target, res); err != nil {
3329 return nil, err
3330 }
3331 return ret, nil
3332 }
3333
3334
3335
3336
3337 func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error {
3338 c.ctx_ = ctx
3339 defer c.PageToken(c.urlParams_.Get("pageToken"))
3340 for {
3341 x, err := c.Do()
3342 if err != nil {
3343 return err
3344 }
3345 if err := f(x); err != nil {
3346 return err
3347 }
3348 if x.NextPageToken == "" {
3349 return nil
3350 }
3351 c.PageToken(x.NextPageToken)
3352 }
3353 }
3354
3355 type ManagedZoneOperationsGetCall struct {
3356 s *Service
3357 project string
3358 managedZone string
3359 operation string
3360 urlParams_ gensupport.URLParams
3361 ifNoneMatch_ string
3362 ctx_ context.Context
3363 header_ http.Header
3364 }
3365
3366
3367
3368
3369
3370
3371
3372 func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall {
3373 c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3374 c.project = project
3375 c.managedZone = managedZone
3376 c.operation = operation
3377 return c
3378 }
3379
3380
3381
3382
3383 func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall {
3384 c.urlParams_.Set("clientOperationId", clientOperationId)
3385 return c
3386 }
3387
3388
3389
3390
3391 func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall {
3392 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3393 return c
3394 }
3395
3396
3397
3398
3399 func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall {
3400 c.ifNoneMatch_ = entityTag
3401 return c
3402 }
3403
3404
3405 func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall {
3406 c.ctx_ = ctx
3407 return c
3408 }
3409
3410
3411
3412 func (c *ManagedZoneOperationsGetCall) Header() http.Header {
3413 if c.header_ == nil {
3414 c.header_ = make(http.Header)
3415 }
3416 return c.header_
3417 }
3418
3419 func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3421 if c.ifNoneMatch_ != "" {
3422 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3423 }
3424 var body io.Reader = nil
3425 c.urlParams_.Set("alt", alt)
3426 c.urlParams_.Set("prettyPrint", "false")
3427 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations/{operation}")
3428 urls += "?" + c.urlParams_.Encode()
3429 req, err := http.NewRequest("GET", urls, body)
3430 if err != nil {
3431 return nil, err
3432 }
3433 req.Header = reqHeaders
3434 googleapi.Expand(req.URL, map[string]string{
3435 "project": c.project,
3436 "managedZone": c.managedZone,
3437 "operation": c.operation,
3438 })
3439 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3440 }
3441
3442
3443
3444
3445
3446
3447 func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3448 gensupport.SetOptions(c.urlParams_, opts...)
3449 res, err := c.doRequest("json")
3450 if res != nil && res.StatusCode == http.StatusNotModified {
3451 if res.Body != nil {
3452 res.Body.Close()
3453 }
3454 return nil, gensupport.WrapError(&googleapi.Error{
3455 Code: res.StatusCode,
3456 Header: res.Header,
3457 })
3458 }
3459 if err != nil {
3460 return nil, err
3461 }
3462 defer googleapi.CloseBody(res)
3463 if err := googleapi.CheckResponse(res); err != nil {
3464 return nil, gensupport.WrapError(err)
3465 }
3466 ret := &Operation{
3467 ServerResponse: googleapi.ServerResponse{
3468 Header: res.Header,
3469 HTTPStatusCode: res.StatusCode,
3470 },
3471 }
3472 target := &ret
3473 if err := gensupport.DecodeResponse(target, res); err != nil {
3474 return nil, err
3475 }
3476 return ret, nil
3477 }
3478
3479 type ManagedZoneOperationsListCall struct {
3480 s *Service
3481 project string
3482 managedZone string
3483 urlParams_ gensupport.URLParams
3484 ifNoneMatch_ string
3485 ctx_ context.Context
3486 header_ http.Header
3487 }
3488
3489
3490
3491
3492
3493 func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall {
3494 c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3495 c.project = project
3496 c.managedZone = managedZone
3497 return c
3498 }
3499
3500
3501
3502
3503 func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall {
3504 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3505 return c
3506 }
3507
3508
3509
3510
3511 func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall {
3512 c.urlParams_.Set("pageToken", pageToken)
3513 return c
3514 }
3515
3516
3517
3518
3519
3520
3521
3522
3523 func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall {
3524 c.urlParams_.Set("sortBy", sortBy)
3525 return c
3526 }
3527
3528
3529
3530
3531 func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall {
3532 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3533 return c
3534 }
3535
3536
3537
3538
3539 func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall {
3540 c.ifNoneMatch_ = entityTag
3541 return c
3542 }
3543
3544
3545 func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall {
3546 c.ctx_ = ctx
3547 return c
3548 }
3549
3550
3551
3552 func (c *ManagedZoneOperationsListCall) Header() http.Header {
3553 if c.header_ == nil {
3554 c.header_ = make(http.Header)
3555 }
3556 return c.header_
3557 }
3558
3559 func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
3560 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3561 if c.ifNoneMatch_ != "" {
3562 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3563 }
3564 var body io.Reader = nil
3565 c.urlParams_.Set("alt", alt)
3566 c.urlParams_.Set("prettyPrint", "false")
3567 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations")
3568 urls += "?" + c.urlParams_.Encode()
3569 req, err := http.NewRequest("GET", urls, body)
3570 if err != nil {
3571 return nil, err
3572 }
3573 req.Header = reqHeaders
3574 googleapi.Expand(req.URL, map[string]string{
3575 "project": c.project,
3576 "managedZone": c.managedZone,
3577 })
3578 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3579 }
3580
3581
3582
3583
3584
3585
3586
3587 func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) {
3588 gensupport.SetOptions(c.urlParams_, opts...)
3589 res, err := c.doRequest("json")
3590 if res != nil && res.StatusCode == http.StatusNotModified {
3591 if res.Body != nil {
3592 res.Body.Close()
3593 }
3594 return nil, gensupport.WrapError(&googleapi.Error{
3595 Code: res.StatusCode,
3596 Header: res.Header,
3597 })
3598 }
3599 if err != nil {
3600 return nil, err
3601 }
3602 defer googleapi.CloseBody(res)
3603 if err := googleapi.CheckResponse(res); err != nil {
3604 return nil, gensupport.WrapError(err)
3605 }
3606 ret := &ManagedZoneOperationsListResponse{
3607 ServerResponse: googleapi.ServerResponse{
3608 Header: res.Header,
3609 HTTPStatusCode: res.StatusCode,
3610 },
3611 }
3612 target := &ret
3613 if err := gensupport.DecodeResponse(target, res); err != nil {
3614 return nil, err
3615 }
3616 return ret, nil
3617 }
3618
3619
3620
3621
3622 func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error {
3623 c.ctx_ = ctx
3624 defer c.PageToken(c.urlParams_.Get("pageToken"))
3625 for {
3626 x, err := c.Do()
3627 if err != nil {
3628 return err
3629 }
3630 if err := f(x); err != nil {
3631 return err
3632 }
3633 if x.NextPageToken == "" {
3634 return nil
3635 }
3636 c.PageToken(x.NextPageToken)
3637 }
3638 }
3639
3640 type ManagedZonesCreateCall struct {
3641 s *Service
3642 project string
3643 managedzone *ManagedZone
3644 urlParams_ gensupport.URLParams
3645 ctx_ context.Context
3646 header_ http.Header
3647 }
3648
3649
3650
3651
3652 func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall {
3653 c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3654 c.project = project
3655 c.managedzone = managedzone
3656 return c
3657 }
3658
3659
3660
3661
3662 func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall {
3663 c.urlParams_.Set("clientOperationId", clientOperationId)
3664 return c
3665 }
3666
3667
3668
3669
3670 func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall {
3671 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3672 return c
3673 }
3674
3675
3676 func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
3677 c.ctx_ = ctx
3678 return c
3679 }
3680
3681
3682
3683 func (c *ManagedZonesCreateCall) Header() http.Header {
3684 if c.header_ == nil {
3685 c.header_ = make(http.Header)
3686 }
3687 return c.header_
3688 }
3689
3690 func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
3691 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3692 var body io.Reader = nil
3693 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
3694 if err != nil {
3695 return nil, err
3696 }
3697 c.urlParams_.Set("alt", alt)
3698 c.urlParams_.Set("prettyPrint", "false")
3699 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones")
3700 urls += "?" + c.urlParams_.Encode()
3701 req, err := http.NewRequest("POST", urls, body)
3702 if err != nil {
3703 return nil, err
3704 }
3705 req.Header = reqHeaders
3706 googleapi.Expand(req.URL, map[string]string{
3707 "project": c.project,
3708 })
3709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3710 }
3711
3712
3713
3714
3715
3716
3717 func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
3718 gensupport.SetOptions(c.urlParams_, opts...)
3719 res, err := c.doRequest("json")
3720 if res != nil && res.StatusCode == http.StatusNotModified {
3721 if res.Body != nil {
3722 res.Body.Close()
3723 }
3724 return nil, gensupport.WrapError(&googleapi.Error{
3725 Code: res.StatusCode,
3726 Header: res.Header,
3727 })
3728 }
3729 if err != nil {
3730 return nil, err
3731 }
3732 defer googleapi.CloseBody(res)
3733 if err := googleapi.CheckResponse(res); err != nil {
3734 return nil, gensupport.WrapError(err)
3735 }
3736 ret := &ManagedZone{
3737 ServerResponse: googleapi.ServerResponse{
3738 Header: res.Header,
3739 HTTPStatusCode: res.StatusCode,
3740 },
3741 }
3742 target := &ret
3743 if err := gensupport.DecodeResponse(target, res); err != nil {
3744 return nil, err
3745 }
3746 return ret, nil
3747 }
3748
3749 type ManagedZonesDeleteCall struct {
3750 s *Service
3751 project string
3752 managedZone string
3753 urlParams_ gensupport.URLParams
3754 ctx_ context.Context
3755 header_ http.Header
3756 }
3757
3758
3759
3760
3761
3762
3763 func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall {
3764 c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3765 c.project = project
3766 c.managedZone = managedZone
3767 return c
3768 }
3769
3770
3771
3772
3773 func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall {
3774 c.urlParams_.Set("clientOperationId", clientOperationId)
3775 return c
3776 }
3777
3778
3779
3780
3781 func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall {
3782 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3783 return c
3784 }
3785
3786
3787 func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
3788 c.ctx_ = ctx
3789 return c
3790 }
3791
3792
3793
3794 func (c *ManagedZonesDeleteCall) Header() http.Header {
3795 if c.header_ == nil {
3796 c.header_ = make(http.Header)
3797 }
3798 return c.header_
3799 }
3800
3801 func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
3802 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3803 var body io.Reader = nil
3804 c.urlParams_.Set("alt", alt)
3805 c.urlParams_.Set("prettyPrint", "false")
3806 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
3807 urls += "?" + c.urlParams_.Encode()
3808 req, err := http.NewRequest("DELETE", urls, body)
3809 if err != nil {
3810 return nil, err
3811 }
3812 req.Header = reqHeaders
3813 googleapi.Expand(req.URL, map[string]string{
3814 "project": c.project,
3815 "managedZone": c.managedZone,
3816 })
3817 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3818 }
3819
3820
3821 func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error {
3822 gensupport.SetOptions(c.urlParams_, opts...)
3823 res, err := c.doRequest("json")
3824 if err != nil {
3825 return err
3826 }
3827 defer googleapi.CloseBody(res)
3828 if err := googleapi.CheckResponse(res); err != nil {
3829 return gensupport.WrapError(err)
3830 }
3831 return nil
3832 }
3833
3834 type ManagedZonesGetCall struct {
3835 s *Service
3836 project string
3837 managedZone string
3838 urlParams_ gensupport.URLParams
3839 ifNoneMatch_ string
3840 ctx_ context.Context
3841 header_ http.Header
3842 }
3843
3844
3845
3846
3847
3848
3849 func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall {
3850 c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3851 c.project = project
3852 c.managedZone = managedZone
3853 return c
3854 }
3855
3856
3857
3858
3859 func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall {
3860 c.urlParams_.Set("clientOperationId", clientOperationId)
3861 return c
3862 }
3863
3864
3865
3866
3867 func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall {
3868 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3869 return c
3870 }
3871
3872
3873
3874
3875 func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall {
3876 c.ifNoneMatch_ = entityTag
3877 return c
3878 }
3879
3880
3881 func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
3882 c.ctx_ = ctx
3883 return c
3884 }
3885
3886
3887
3888 func (c *ManagedZonesGetCall) Header() http.Header {
3889 if c.header_ == nil {
3890 c.header_ = make(http.Header)
3891 }
3892 return c.header_
3893 }
3894
3895 func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
3896 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3897 if c.ifNoneMatch_ != "" {
3898 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3899 }
3900 var body io.Reader = nil
3901 c.urlParams_.Set("alt", alt)
3902 c.urlParams_.Set("prettyPrint", "false")
3903 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
3904 urls += "?" + c.urlParams_.Encode()
3905 req, err := http.NewRequest("GET", urls, body)
3906 if err != nil {
3907 return nil, err
3908 }
3909 req.Header = reqHeaders
3910 googleapi.Expand(req.URL, map[string]string{
3911 "project": c.project,
3912 "managedZone": c.managedZone,
3913 })
3914 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3915 }
3916
3917
3918
3919
3920
3921
3922 func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) {
3923 gensupport.SetOptions(c.urlParams_, opts...)
3924 res, err := c.doRequest("json")
3925 if res != nil && res.StatusCode == http.StatusNotModified {
3926 if res.Body != nil {
3927 res.Body.Close()
3928 }
3929 return nil, gensupport.WrapError(&googleapi.Error{
3930 Code: res.StatusCode,
3931 Header: res.Header,
3932 })
3933 }
3934 if err != nil {
3935 return nil, err
3936 }
3937 defer googleapi.CloseBody(res)
3938 if err := googleapi.CheckResponse(res); err != nil {
3939 return nil, gensupport.WrapError(err)
3940 }
3941 ret := &ManagedZone{
3942 ServerResponse: googleapi.ServerResponse{
3943 Header: res.Header,
3944 HTTPStatusCode: res.StatusCode,
3945 },
3946 }
3947 target := &ret
3948 if err := gensupport.DecodeResponse(target, res); err != nil {
3949 return nil, err
3950 }
3951 return ret, nil
3952 }
3953
3954 type ManagedZonesGetIamPolicyCall struct {
3955 s *Service
3956 resource string
3957 googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest
3958 urlParams_ gensupport.URLParams
3959 ctx_ context.Context
3960 header_ http.Header
3961 }
3962
3963
3964
3965
3966
3967
3968
3969 func (r *ManagedZonesService) GetIamPolicy(resource string, googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest) *ManagedZonesGetIamPolicyCall {
3970 c := &ManagedZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3971 c.resource = resource
3972 c.googleiamv1getiampolicyrequest = googleiamv1getiampolicyrequest
3973 return c
3974 }
3975
3976
3977
3978
3979 func (c *ManagedZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesGetIamPolicyCall {
3980 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3981 return c
3982 }
3983
3984
3985 func (c *ManagedZonesGetIamPolicyCall) Context(ctx context.Context) *ManagedZonesGetIamPolicyCall {
3986 c.ctx_ = ctx
3987 return c
3988 }
3989
3990
3991
3992 func (c *ManagedZonesGetIamPolicyCall) Header() http.Header {
3993 if c.header_ == nil {
3994 c.header_ = make(http.Header)
3995 }
3996 return c.header_
3997 }
3998
3999 func (c *ManagedZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4000 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4001 var body io.Reader = nil
4002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1getiampolicyrequest)
4003 if err != nil {
4004 return nil, err
4005 }
4006 c.urlParams_.Set("alt", alt)
4007 c.urlParams_.Set("prettyPrint", "false")
4008 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:getIamPolicy")
4009 urls += "?" + c.urlParams_.Encode()
4010 req, err := http.NewRequest("POST", urls, body)
4011 if err != nil {
4012 return nil, err
4013 }
4014 req.Header = reqHeaders
4015 googleapi.Expand(req.URL, map[string]string{
4016 "resource": c.resource,
4017 })
4018 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4019 }
4020
4021
4022
4023
4024
4025
4026
4027 func (c *ManagedZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
4028 gensupport.SetOptions(c.urlParams_, opts...)
4029 res, err := c.doRequest("json")
4030 if res != nil && res.StatusCode == http.StatusNotModified {
4031 if res.Body != nil {
4032 res.Body.Close()
4033 }
4034 return nil, gensupport.WrapError(&googleapi.Error{
4035 Code: res.StatusCode,
4036 Header: res.Header,
4037 })
4038 }
4039 if err != nil {
4040 return nil, err
4041 }
4042 defer googleapi.CloseBody(res)
4043 if err := googleapi.CheckResponse(res); err != nil {
4044 return nil, gensupport.WrapError(err)
4045 }
4046 ret := &GoogleIamV1Policy{
4047 ServerResponse: googleapi.ServerResponse{
4048 Header: res.Header,
4049 HTTPStatusCode: res.StatusCode,
4050 },
4051 }
4052 target := &ret
4053 if err := gensupport.DecodeResponse(target, res); err != nil {
4054 return nil, err
4055 }
4056 return ret, nil
4057 }
4058
4059 type ManagedZonesListCall struct {
4060 s *Service
4061 project string
4062 urlParams_ gensupport.URLParams
4063 ifNoneMatch_ string
4064 ctx_ context.Context
4065 header_ http.Header
4066 }
4067
4068
4069
4070
4071 func (r *ManagedZonesService) List(project string) *ManagedZonesListCall {
4072 c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4073 c.project = project
4074 return c
4075 }
4076
4077
4078
4079 func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall {
4080 c.urlParams_.Set("dnsName", dnsName)
4081 return c
4082 }
4083
4084
4085
4086
4087 func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall {
4088 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4089 return c
4090 }
4091
4092
4093
4094
4095 func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall {
4096 c.urlParams_.Set("pageToken", pageToken)
4097 return c
4098 }
4099
4100
4101
4102
4103 func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall {
4104 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4105 return c
4106 }
4107
4108
4109
4110
4111 func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall {
4112 c.ifNoneMatch_ = entityTag
4113 return c
4114 }
4115
4116
4117 func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
4118 c.ctx_ = ctx
4119 return c
4120 }
4121
4122
4123
4124 func (c *ManagedZonesListCall) Header() http.Header {
4125 if c.header_ == nil {
4126 c.header_ = make(http.Header)
4127 }
4128 return c.header_
4129 }
4130
4131 func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
4132 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4133 if c.ifNoneMatch_ != "" {
4134 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4135 }
4136 var body io.Reader = nil
4137 c.urlParams_.Set("alt", alt)
4138 c.urlParams_.Set("prettyPrint", "false")
4139 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones")
4140 urls += "?" + c.urlParams_.Encode()
4141 req, err := http.NewRequest("GET", urls, body)
4142 if err != nil {
4143 return nil, err
4144 }
4145 req.Header = reqHeaders
4146 googleapi.Expand(req.URL, map[string]string{
4147 "project": c.project,
4148 })
4149 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4150 }
4151
4152
4153
4154
4155
4156
4157
4158 func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) {
4159 gensupport.SetOptions(c.urlParams_, opts...)
4160 res, err := c.doRequest("json")
4161 if res != nil && res.StatusCode == http.StatusNotModified {
4162 if res.Body != nil {
4163 res.Body.Close()
4164 }
4165 return nil, gensupport.WrapError(&googleapi.Error{
4166 Code: res.StatusCode,
4167 Header: res.Header,
4168 })
4169 }
4170 if err != nil {
4171 return nil, err
4172 }
4173 defer googleapi.CloseBody(res)
4174 if err := googleapi.CheckResponse(res); err != nil {
4175 return nil, gensupport.WrapError(err)
4176 }
4177 ret := &ManagedZonesListResponse{
4178 ServerResponse: googleapi.ServerResponse{
4179 Header: res.Header,
4180 HTTPStatusCode: res.StatusCode,
4181 },
4182 }
4183 target := &ret
4184 if err := gensupport.DecodeResponse(target, res); err != nil {
4185 return nil, err
4186 }
4187 return ret, nil
4188 }
4189
4190
4191
4192
4193 func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error {
4194 c.ctx_ = ctx
4195 defer c.PageToken(c.urlParams_.Get("pageToken"))
4196 for {
4197 x, err := c.Do()
4198 if err != nil {
4199 return err
4200 }
4201 if err := f(x); err != nil {
4202 return err
4203 }
4204 if x.NextPageToken == "" {
4205 return nil
4206 }
4207 c.PageToken(x.NextPageToken)
4208 }
4209 }
4210
4211 type ManagedZonesPatchCall struct {
4212 s *Service
4213 project string
4214 managedZone string
4215 managedzone *ManagedZone
4216 urlParams_ gensupport.URLParams
4217 ctx_ context.Context
4218 header_ http.Header
4219 }
4220
4221
4222
4223
4224
4225
4226 func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall {
4227 c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4228 c.project = project
4229 c.managedZone = managedZone
4230 c.managedzone = managedzone
4231 return c
4232 }
4233
4234
4235
4236
4237 func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall {
4238 c.urlParams_.Set("clientOperationId", clientOperationId)
4239 return c
4240 }
4241
4242
4243
4244
4245 func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall {
4246 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4247 return c
4248 }
4249
4250
4251 func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall {
4252 c.ctx_ = ctx
4253 return c
4254 }
4255
4256
4257
4258 func (c *ManagedZonesPatchCall) Header() http.Header {
4259 if c.header_ == nil {
4260 c.header_ = make(http.Header)
4261 }
4262 return c.header_
4263 }
4264
4265 func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) {
4266 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4267 var body io.Reader = nil
4268 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
4269 if err != nil {
4270 return nil, err
4271 }
4272 c.urlParams_.Set("alt", alt)
4273 c.urlParams_.Set("prettyPrint", "false")
4274 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
4275 urls += "?" + c.urlParams_.Encode()
4276 req, err := http.NewRequest("PATCH", urls, body)
4277 if err != nil {
4278 return nil, err
4279 }
4280 req.Header = reqHeaders
4281 googleapi.Expand(req.URL, map[string]string{
4282 "project": c.project,
4283 "managedZone": c.managedZone,
4284 })
4285 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4286 }
4287
4288
4289
4290
4291
4292
4293 func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4294 gensupport.SetOptions(c.urlParams_, opts...)
4295 res, err := c.doRequest("json")
4296 if res != nil && res.StatusCode == http.StatusNotModified {
4297 if res.Body != nil {
4298 res.Body.Close()
4299 }
4300 return nil, gensupport.WrapError(&googleapi.Error{
4301 Code: res.StatusCode,
4302 Header: res.Header,
4303 })
4304 }
4305 if err != nil {
4306 return nil, err
4307 }
4308 defer googleapi.CloseBody(res)
4309 if err := googleapi.CheckResponse(res); err != nil {
4310 return nil, gensupport.WrapError(err)
4311 }
4312 ret := &Operation{
4313 ServerResponse: googleapi.ServerResponse{
4314 Header: res.Header,
4315 HTTPStatusCode: res.StatusCode,
4316 },
4317 }
4318 target := &ret
4319 if err := gensupport.DecodeResponse(target, res); err != nil {
4320 return nil, err
4321 }
4322 return ret, nil
4323 }
4324
4325 type ManagedZonesSetIamPolicyCall struct {
4326 s *Service
4327 resource string
4328 googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest
4329 urlParams_ gensupport.URLParams
4330 ctx_ context.Context
4331 header_ http.Header
4332 }
4333
4334
4335
4336
4337
4338
4339
4340
4341 func (r *ManagedZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ManagedZonesSetIamPolicyCall {
4342 c := &ManagedZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4343 c.resource = resource
4344 c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest
4345 return c
4346 }
4347
4348
4349
4350
4351 func (c *ManagedZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesSetIamPolicyCall {
4352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4353 return c
4354 }
4355
4356
4357 func (c *ManagedZonesSetIamPolicyCall) Context(ctx context.Context) *ManagedZonesSetIamPolicyCall {
4358 c.ctx_ = ctx
4359 return c
4360 }
4361
4362
4363
4364 func (c *ManagedZonesSetIamPolicyCall) Header() http.Header {
4365 if c.header_ == nil {
4366 c.header_ = make(http.Header)
4367 }
4368 return c.header_
4369 }
4370
4371 func (c *ManagedZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4372 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4373 var body io.Reader = nil
4374 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest)
4375 if err != nil {
4376 return nil, err
4377 }
4378 c.urlParams_.Set("alt", alt)
4379 c.urlParams_.Set("prettyPrint", "false")
4380 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:setIamPolicy")
4381 urls += "?" + c.urlParams_.Encode()
4382 req, err := http.NewRequest("POST", urls, body)
4383 if err != nil {
4384 return nil, err
4385 }
4386 req.Header = reqHeaders
4387 googleapi.Expand(req.URL, map[string]string{
4388 "resource": c.resource,
4389 })
4390 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4391 }
4392
4393
4394
4395
4396
4397
4398
4399 func (c *ManagedZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) {
4400 gensupport.SetOptions(c.urlParams_, opts...)
4401 res, err := c.doRequest("json")
4402 if res != nil && res.StatusCode == http.StatusNotModified {
4403 if res.Body != nil {
4404 res.Body.Close()
4405 }
4406 return nil, gensupport.WrapError(&googleapi.Error{
4407 Code: res.StatusCode,
4408 Header: res.Header,
4409 })
4410 }
4411 if err != nil {
4412 return nil, err
4413 }
4414 defer googleapi.CloseBody(res)
4415 if err := googleapi.CheckResponse(res); err != nil {
4416 return nil, gensupport.WrapError(err)
4417 }
4418 ret := &GoogleIamV1Policy{
4419 ServerResponse: googleapi.ServerResponse{
4420 Header: res.Header,
4421 HTTPStatusCode: res.StatusCode,
4422 },
4423 }
4424 target := &ret
4425 if err := gensupport.DecodeResponse(target, res); err != nil {
4426 return nil, err
4427 }
4428 return ret, nil
4429 }
4430
4431 type ManagedZonesTestIamPermissionsCall struct {
4432 s *Service
4433 resource string
4434 googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest
4435 urlParams_ gensupport.URLParams
4436 ctx_ context.Context
4437 header_ http.Header
4438 }
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450 func (r *ManagedZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ManagedZonesTestIamPermissionsCall {
4451 c := &ManagedZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4452 c.resource = resource
4453 c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest
4454 return c
4455 }
4456
4457
4458
4459
4460 func (c *ManagedZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedZonesTestIamPermissionsCall {
4461 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4462 return c
4463 }
4464
4465
4466 func (c *ManagedZonesTestIamPermissionsCall) Context(ctx context.Context) *ManagedZonesTestIamPermissionsCall {
4467 c.ctx_ = ctx
4468 return c
4469 }
4470
4471
4472
4473 func (c *ManagedZonesTestIamPermissionsCall) Header() http.Header {
4474 if c.header_ == nil {
4475 c.header_ = make(http.Header)
4476 }
4477 return c.header_
4478 }
4479
4480 func (c *ManagedZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4481 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4482 var body io.Reader = nil
4483 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest)
4484 if err != nil {
4485 return nil, err
4486 }
4487 c.urlParams_.Set("alt", alt)
4488 c.urlParams_.Set("prettyPrint", "false")
4489 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:testIamPermissions")
4490 urls += "?" + c.urlParams_.Encode()
4491 req, err := http.NewRequest("POST", urls, body)
4492 if err != nil {
4493 return nil, err
4494 }
4495 req.Header = reqHeaders
4496 googleapi.Expand(req.URL, map[string]string{
4497 "resource": c.resource,
4498 })
4499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4500 }
4501
4502
4503
4504
4505
4506
4507
4508 func (c *ManagedZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) {
4509 gensupport.SetOptions(c.urlParams_, opts...)
4510 res, err := c.doRequest("json")
4511 if res != nil && res.StatusCode == http.StatusNotModified {
4512 if res.Body != nil {
4513 res.Body.Close()
4514 }
4515 return nil, gensupport.WrapError(&googleapi.Error{
4516 Code: res.StatusCode,
4517 Header: res.Header,
4518 })
4519 }
4520 if err != nil {
4521 return nil, err
4522 }
4523 defer googleapi.CloseBody(res)
4524 if err := googleapi.CheckResponse(res); err != nil {
4525 return nil, gensupport.WrapError(err)
4526 }
4527 ret := &GoogleIamV1TestIamPermissionsResponse{
4528 ServerResponse: googleapi.ServerResponse{
4529 Header: res.Header,
4530 HTTPStatusCode: res.StatusCode,
4531 },
4532 }
4533 target := &ret
4534 if err := gensupport.DecodeResponse(target, res); err != nil {
4535 return nil, err
4536 }
4537 return ret, nil
4538 }
4539
4540 type ManagedZonesUpdateCall struct {
4541 s *Service
4542 project string
4543 managedZone string
4544 managedzone *ManagedZone
4545 urlParams_ gensupport.URLParams
4546 ctx_ context.Context
4547 header_ http.Header
4548 }
4549
4550
4551
4552
4553
4554
4555 func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall {
4556 c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4557 c.project = project
4558 c.managedZone = managedZone
4559 c.managedzone = managedzone
4560 return c
4561 }
4562
4563
4564
4565
4566 func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall {
4567 c.urlParams_.Set("clientOperationId", clientOperationId)
4568 return c
4569 }
4570
4571
4572
4573
4574 func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall {
4575 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4576 return c
4577 }
4578
4579
4580 func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall {
4581 c.ctx_ = ctx
4582 return c
4583 }
4584
4585
4586
4587 func (c *ManagedZonesUpdateCall) Header() http.Header {
4588 if c.header_ == nil {
4589 c.header_ = make(http.Header)
4590 }
4591 return c.header_
4592 }
4593
4594 func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) {
4595 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4596 var body io.Reader = nil
4597 body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
4598 if err != nil {
4599 return nil, err
4600 }
4601 c.urlParams_.Set("alt", alt)
4602 c.urlParams_.Set("prettyPrint", "false")
4603 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}")
4604 urls += "?" + c.urlParams_.Encode()
4605 req, err := http.NewRequest("PUT", urls, body)
4606 if err != nil {
4607 return nil, err
4608 }
4609 req.Header = reqHeaders
4610 googleapi.Expand(req.URL, map[string]string{
4611 "project": c.project,
4612 "managedZone": c.managedZone,
4613 })
4614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4615 }
4616
4617
4618
4619
4620
4621
4622 func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4623 gensupport.SetOptions(c.urlParams_, opts...)
4624 res, err := c.doRequest("json")
4625 if res != nil && res.StatusCode == http.StatusNotModified {
4626 if res.Body != nil {
4627 res.Body.Close()
4628 }
4629 return nil, gensupport.WrapError(&googleapi.Error{
4630 Code: res.StatusCode,
4631 Header: res.Header,
4632 })
4633 }
4634 if err != nil {
4635 return nil, err
4636 }
4637 defer googleapi.CloseBody(res)
4638 if err := googleapi.CheckResponse(res); err != nil {
4639 return nil, gensupport.WrapError(err)
4640 }
4641 ret := &Operation{
4642 ServerResponse: googleapi.ServerResponse{
4643 Header: res.Header,
4644 HTTPStatusCode: res.StatusCode,
4645 },
4646 }
4647 target := &ret
4648 if err := gensupport.DecodeResponse(target, res); err != nil {
4649 return nil, err
4650 }
4651 return ret, nil
4652 }
4653
4654 type PoliciesCreateCall struct {
4655 s *Service
4656 project string
4657 policy *Policy
4658 urlParams_ gensupport.URLParams
4659 ctx_ context.Context
4660 header_ http.Header
4661 }
4662
4663
4664
4665
4666 func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall {
4667 c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4668 c.project = project
4669 c.policy = policy
4670 return c
4671 }
4672
4673
4674
4675
4676 func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall {
4677 c.urlParams_.Set("clientOperationId", clientOperationId)
4678 return c
4679 }
4680
4681
4682
4683
4684 func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall {
4685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4686 return c
4687 }
4688
4689
4690 func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall {
4691 c.ctx_ = ctx
4692 return c
4693 }
4694
4695
4696
4697 func (c *PoliciesCreateCall) Header() http.Header {
4698 if c.header_ == nil {
4699 c.header_ = make(http.Header)
4700 }
4701 return c.header_
4702 }
4703
4704 func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4705 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4706 var body io.Reader = nil
4707 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
4708 if err != nil {
4709 return nil, err
4710 }
4711 c.urlParams_.Set("alt", alt)
4712 c.urlParams_.Set("prettyPrint", "false")
4713 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies")
4714 urls += "?" + c.urlParams_.Encode()
4715 req, err := http.NewRequest("POST", urls, body)
4716 if err != nil {
4717 return nil, err
4718 }
4719 req.Header = reqHeaders
4720 googleapi.Expand(req.URL, map[string]string{
4721 "project": c.project,
4722 })
4723 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4724 }
4725
4726
4727
4728
4729
4730
4731 func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4732 gensupport.SetOptions(c.urlParams_, opts...)
4733 res, err := c.doRequest("json")
4734 if res != nil && res.StatusCode == http.StatusNotModified {
4735 if res.Body != nil {
4736 res.Body.Close()
4737 }
4738 return nil, gensupport.WrapError(&googleapi.Error{
4739 Code: res.StatusCode,
4740 Header: res.Header,
4741 })
4742 }
4743 if err != nil {
4744 return nil, err
4745 }
4746 defer googleapi.CloseBody(res)
4747 if err := googleapi.CheckResponse(res); err != nil {
4748 return nil, gensupport.WrapError(err)
4749 }
4750 ret := &Policy{
4751 ServerResponse: googleapi.ServerResponse{
4752 Header: res.Header,
4753 HTTPStatusCode: res.StatusCode,
4754 },
4755 }
4756 target := &ret
4757 if err := gensupport.DecodeResponse(target, res); err != nil {
4758 return nil, err
4759 }
4760 return ret, nil
4761 }
4762
4763 type PoliciesDeleteCall struct {
4764 s *Service
4765 project string
4766 policy string
4767 urlParams_ gensupport.URLParams
4768 ctx_ context.Context
4769 header_ http.Header
4770 }
4771
4772
4773
4774
4775
4776
4777 func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall {
4778 c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4779 c.project = project
4780 c.policy = policy
4781 return c
4782 }
4783
4784
4785
4786
4787 func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall {
4788 c.urlParams_.Set("clientOperationId", clientOperationId)
4789 return c
4790 }
4791
4792
4793
4794
4795 func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall {
4796 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4797 return c
4798 }
4799
4800
4801 func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall {
4802 c.ctx_ = ctx
4803 return c
4804 }
4805
4806
4807
4808 func (c *PoliciesDeleteCall) Header() http.Header {
4809 if c.header_ == nil {
4810 c.header_ = make(http.Header)
4811 }
4812 return c.header_
4813 }
4814
4815 func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4816 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4817 var body io.Reader = nil
4818 c.urlParams_.Set("alt", alt)
4819 c.urlParams_.Set("prettyPrint", "false")
4820 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
4821 urls += "?" + c.urlParams_.Encode()
4822 req, err := http.NewRequest("DELETE", urls, body)
4823 if err != nil {
4824 return nil, err
4825 }
4826 req.Header = reqHeaders
4827 googleapi.Expand(req.URL, map[string]string{
4828 "project": c.project,
4829 "policy": c.policy,
4830 })
4831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4832 }
4833
4834
4835 func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
4836 gensupport.SetOptions(c.urlParams_, opts...)
4837 res, err := c.doRequest("json")
4838 if err != nil {
4839 return err
4840 }
4841 defer googleapi.CloseBody(res)
4842 if err := googleapi.CheckResponse(res); err != nil {
4843 return gensupport.WrapError(err)
4844 }
4845 return nil
4846 }
4847
4848 type PoliciesGetCall struct {
4849 s *Service
4850 project string
4851 policy string
4852 urlParams_ gensupport.URLParams
4853 ifNoneMatch_ string
4854 ctx_ context.Context
4855 header_ http.Header
4856 }
4857
4858
4859
4860
4861
4862 func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall {
4863 c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4864 c.project = project
4865 c.policy = policy
4866 return c
4867 }
4868
4869
4870
4871
4872 func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall {
4873 c.urlParams_.Set("clientOperationId", clientOperationId)
4874 return c
4875 }
4876
4877
4878
4879
4880 func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall {
4881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4882 return c
4883 }
4884
4885
4886
4887
4888 func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall {
4889 c.ifNoneMatch_ = entityTag
4890 return c
4891 }
4892
4893
4894 func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall {
4895 c.ctx_ = ctx
4896 return c
4897 }
4898
4899
4900
4901 func (c *PoliciesGetCall) Header() http.Header {
4902 if c.header_ == nil {
4903 c.header_ = make(http.Header)
4904 }
4905 return c.header_
4906 }
4907
4908 func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4909 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4910 if c.ifNoneMatch_ != "" {
4911 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4912 }
4913 var body io.Reader = nil
4914 c.urlParams_.Set("alt", alt)
4915 c.urlParams_.Set("prettyPrint", "false")
4916 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
4917 urls += "?" + c.urlParams_.Encode()
4918 req, err := http.NewRequest("GET", urls, body)
4919 if err != nil {
4920 return nil, err
4921 }
4922 req.Header = reqHeaders
4923 googleapi.Expand(req.URL, map[string]string{
4924 "project": c.project,
4925 "policy": c.policy,
4926 })
4927 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4928 }
4929
4930
4931
4932
4933
4934
4935 func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4936 gensupport.SetOptions(c.urlParams_, opts...)
4937 res, err := c.doRequest("json")
4938 if res != nil && res.StatusCode == http.StatusNotModified {
4939 if res.Body != nil {
4940 res.Body.Close()
4941 }
4942 return nil, gensupport.WrapError(&googleapi.Error{
4943 Code: res.StatusCode,
4944 Header: res.Header,
4945 })
4946 }
4947 if err != nil {
4948 return nil, err
4949 }
4950 defer googleapi.CloseBody(res)
4951 if err := googleapi.CheckResponse(res); err != nil {
4952 return nil, gensupport.WrapError(err)
4953 }
4954 ret := &Policy{
4955 ServerResponse: googleapi.ServerResponse{
4956 Header: res.Header,
4957 HTTPStatusCode: res.StatusCode,
4958 },
4959 }
4960 target := &ret
4961 if err := gensupport.DecodeResponse(target, res); err != nil {
4962 return nil, err
4963 }
4964 return ret, nil
4965 }
4966
4967 type PoliciesListCall struct {
4968 s *Service
4969 project string
4970 urlParams_ gensupport.URLParams
4971 ifNoneMatch_ string
4972 ctx_ context.Context
4973 header_ http.Header
4974 }
4975
4976
4977
4978
4979 func (r *PoliciesService) List(project string) *PoliciesListCall {
4980 c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4981 c.project = project
4982 return c
4983 }
4984
4985
4986
4987
4988 func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall {
4989 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4990 return c
4991 }
4992
4993
4994
4995
4996 func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall {
4997 c.urlParams_.Set("pageToken", pageToken)
4998 return c
4999 }
5000
5001
5002
5003
5004 func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall {
5005 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5006 return c
5007 }
5008
5009
5010
5011
5012 func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall {
5013 c.ifNoneMatch_ = entityTag
5014 return c
5015 }
5016
5017
5018 func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall {
5019 c.ctx_ = ctx
5020 return c
5021 }
5022
5023
5024
5025 func (c *PoliciesListCall) Header() http.Header {
5026 if c.header_ == nil {
5027 c.header_ = make(http.Header)
5028 }
5029 return c.header_
5030 }
5031
5032 func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) {
5033 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5034 if c.ifNoneMatch_ != "" {
5035 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5036 }
5037 var body io.Reader = nil
5038 c.urlParams_.Set("alt", alt)
5039 c.urlParams_.Set("prettyPrint", "false")
5040 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies")
5041 urls += "?" + c.urlParams_.Encode()
5042 req, err := http.NewRequest("GET", urls, body)
5043 if err != nil {
5044 return nil, err
5045 }
5046 req.Header = reqHeaders
5047 googleapi.Expand(req.URL, map[string]string{
5048 "project": c.project,
5049 })
5050 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5051 }
5052
5053
5054
5055
5056
5057
5058
5059 func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) {
5060 gensupport.SetOptions(c.urlParams_, opts...)
5061 res, err := c.doRequest("json")
5062 if res != nil && res.StatusCode == http.StatusNotModified {
5063 if res.Body != nil {
5064 res.Body.Close()
5065 }
5066 return nil, gensupport.WrapError(&googleapi.Error{
5067 Code: res.StatusCode,
5068 Header: res.Header,
5069 })
5070 }
5071 if err != nil {
5072 return nil, err
5073 }
5074 defer googleapi.CloseBody(res)
5075 if err := googleapi.CheckResponse(res); err != nil {
5076 return nil, gensupport.WrapError(err)
5077 }
5078 ret := &PoliciesListResponse{
5079 ServerResponse: googleapi.ServerResponse{
5080 Header: res.Header,
5081 HTTPStatusCode: res.StatusCode,
5082 },
5083 }
5084 target := &ret
5085 if err := gensupport.DecodeResponse(target, res); err != nil {
5086 return nil, err
5087 }
5088 return ret, nil
5089 }
5090
5091
5092
5093
5094 func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error {
5095 c.ctx_ = ctx
5096 defer c.PageToken(c.urlParams_.Get("pageToken"))
5097 for {
5098 x, err := c.Do()
5099 if err != nil {
5100 return err
5101 }
5102 if err := f(x); err != nil {
5103 return err
5104 }
5105 if x.NextPageToken == "" {
5106 return nil
5107 }
5108 c.PageToken(x.NextPageToken)
5109 }
5110 }
5111
5112 type PoliciesPatchCall struct {
5113 s *Service
5114 project string
5115 policy string
5116 policy2 *Policy
5117 urlParams_ gensupport.URLParams
5118 ctx_ context.Context
5119 header_ http.Header
5120 }
5121
5122
5123
5124
5125
5126 func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall {
5127 c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5128 c.project = project
5129 c.policy = policy
5130 c.policy2 = policy2
5131 return c
5132 }
5133
5134
5135
5136
5137 func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall {
5138 c.urlParams_.Set("clientOperationId", clientOperationId)
5139 return c
5140 }
5141
5142
5143
5144
5145 func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall {
5146 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5147 return c
5148 }
5149
5150
5151 func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall {
5152 c.ctx_ = ctx
5153 return c
5154 }
5155
5156
5157
5158 func (c *PoliciesPatchCall) Header() http.Header {
5159 if c.header_ == nil {
5160 c.header_ = make(http.Header)
5161 }
5162 return c.header_
5163 }
5164
5165 func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
5166 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5167 var body io.Reader = nil
5168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
5169 if err != nil {
5170 return nil, err
5171 }
5172 c.urlParams_.Set("alt", alt)
5173 c.urlParams_.Set("prettyPrint", "false")
5174 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
5175 urls += "?" + c.urlParams_.Encode()
5176 req, err := http.NewRequest("PATCH", urls, body)
5177 if err != nil {
5178 return nil, err
5179 }
5180 req.Header = reqHeaders
5181 googleapi.Expand(req.URL, map[string]string{
5182 "project": c.project,
5183 "policy": c.policy,
5184 })
5185 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5186 }
5187
5188
5189
5190
5191
5192
5193
5194 func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) {
5195 gensupport.SetOptions(c.urlParams_, opts...)
5196 res, err := c.doRequest("json")
5197 if res != nil && res.StatusCode == http.StatusNotModified {
5198 if res.Body != nil {
5199 res.Body.Close()
5200 }
5201 return nil, gensupport.WrapError(&googleapi.Error{
5202 Code: res.StatusCode,
5203 Header: res.Header,
5204 })
5205 }
5206 if err != nil {
5207 return nil, err
5208 }
5209 defer googleapi.CloseBody(res)
5210 if err := googleapi.CheckResponse(res); err != nil {
5211 return nil, gensupport.WrapError(err)
5212 }
5213 ret := &PoliciesPatchResponse{
5214 ServerResponse: googleapi.ServerResponse{
5215 Header: res.Header,
5216 HTTPStatusCode: res.StatusCode,
5217 },
5218 }
5219 target := &ret
5220 if err := gensupport.DecodeResponse(target, res); err != nil {
5221 return nil, err
5222 }
5223 return ret, nil
5224 }
5225
5226 type PoliciesUpdateCall struct {
5227 s *Service
5228 project string
5229 policy string
5230 policy2 *Policy
5231 urlParams_ gensupport.URLParams
5232 ctx_ context.Context
5233 header_ http.Header
5234 }
5235
5236
5237
5238
5239
5240 func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall {
5241 c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5242 c.project = project
5243 c.policy = policy
5244 c.policy2 = policy2
5245 return c
5246 }
5247
5248
5249
5250
5251 func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall {
5252 c.urlParams_.Set("clientOperationId", clientOperationId)
5253 return c
5254 }
5255
5256
5257
5258
5259 func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall {
5260 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5261 return c
5262 }
5263
5264
5265 func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall {
5266 c.ctx_ = ctx
5267 return c
5268 }
5269
5270
5271
5272 func (c *PoliciesUpdateCall) Header() http.Header {
5273 if c.header_ == nil {
5274 c.header_ = make(http.Header)
5275 }
5276 return c.header_
5277 }
5278
5279 func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
5280 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5281 var body io.Reader = nil
5282 body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy2)
5283 if err != nil {
5284 return nil, err
5285 }
5286 c.urlParams_.Set("alt", alt)
5287 c.urlParams_.Set("prettyPrint", "false")
5288 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}")
5289 urls += "?" + c.urlParams_.Encode()
5290 req, err := http.NewRequest("PUT", urls, body)
5291 if err != nil {
5292 return nil, err
5293 }
5294 req.Header = reqHeaders
5295 googleapi.Expand(req.URL, map[string]string{
5296 "project": c.project,
5297 "policy": c.policy,
5298 })
5299 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5300 }
5301
5302
5303
5304
5305
5306
5307
5308 func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) {
5309 gensupport.SetOptions(c.urlParams_, opts...)
5310 res, err := c.doRequest("json")
5311 if res != nil && res.StatusCode == http.StatusNotModified {
5312 if res.Body != nil {
5313 res.Body.Close()
5314 }
5315 return nil, gensupport.WrapError(&googleapi.Error{
5316 Code: res.StatusCode,
5317 Header: res.Header,
5318 })
5319 }
5320 if err != nil {
5321 return nil, err
5322 }
5323 defer googleapi.CloseBody(res)
5324 if err := googleapi.CheckResponse(res); err != nil {
5325 return nil, gensupport.WrapError(err)
5326 }
5327 ret := &PoliciesUpdateResponse{
5328 ServerResponse: googleapi.ServerResponse{
5329 Header: res.Header,
5330 HTTPStatusCode: res.StatusCode,
5331 },
5332 }
5333 target := &ret
5334 if err := gensupport.DecodeResponse(target, res); err != nil {
5335 return nil, err
5336 }
5337 return ret, nil
5338 }
5339
5340 type ProjectsGetCall struct {
5341 s *Service
5342 project string
5343 urlParams_ gensupport.URLParams
5344 ifNoneMatch_ string
5345 ctx_ context.Context
5346 header_ http.Header
5347 }
5348
5349
5350
5351
5352 func (r *ProjectsService) Get(project string) *ProjectsGetCall {
5353 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5354 c.project = project
5355 return c
5356 }
5357
5358
5359
5360
5361 func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall {
5362 c.urlParams_.Set("clientOperationId", clientOperationId)
5363 return c
5364 }
5365
5366
5367
5368
5369 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
5370 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5371 return c
5372 }
5373
5374
5375
5376
5377 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
5378 c.ifNoneMatch_ = entityTag
5379 return c
5380 }
5381
5382
5383 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
5384 c.ctx_ = ctx
5385 return c
5386 }
5387
5388
5389
5390 func (c *ProjectsGetCall) Header() http.Header {
5391 if c.header_ == nil {
5392 c.header_ = make(http.Header)
5393 }
5394 return c.header_
5395 }
5396
5397 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
5398 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5399 if c.ifNoneMatch_ != "" {
5400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5401 }
5402 var body io.Reader = nil
5403 c.urlParams_.Set("alt", alt)
5404 c.urlParams_.Set("prettyPrint", "false")
5405 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}")
5406 urls += "?" + c.urlParams_.Encode()
5407 req, err := http.NewRequest("GET", urls, body)
5408 if err != nil {
5409 return nil, err
5410 }
5411 req.Header = reqHeaders
5412 googleapi.Expand(req.URL, map[string]string{
5413 "project": c.project,
5414 })
5415 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5416 }
5417
5418
5419
5420
5421
5422
5423 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
5424 gensupport.SetOptions(c.urlParams_, opts...)
5425 res, err := c.doRequest("json")
5426 if res != nil && res.StatusCode == http.StatusNotModified {
5427 if res.Body != nil {
5428 res.Body.Close()
5429 }
5430 return nil, gensupport.WrapError(&googleapi.Error{
5431 Code: res.StatusCode,
5432 Header: res.Header,
5433 })
5434 }
5435 if err != nil {
5436 return nil, err
5437 }
5438 defer googleapi.CloseBody(res)
5439 if err := googleapi.CheckResponse(res); err != nil {
5440 return nil, gensupport.WrapError(err)
5441 }
5442 ret := &Project{
5443 ServerResponse: googleapi.ServerResponse{
5444 Header: res.Header,
5445 HTTPStatusCode: res.StatusCode,
5446 },
5447 }
5448 target := &ret
5449 if err := gensupport.DecodeResponse(target, res); err != nil {
5450 return nil, err
5451 }
5452 return ret, nil
5453 }
5454
5455 type ResourceRecordSetsCreateCall struct {
5456 s *Service
5457 project string
5458 managedZone string
5459 resourcerecordset *ResourceRecordSet
5460 urlParams_ gensupport.URLParams
5461 ctx_ context.Context
5462 header_ http.Header
5463 }
5464
5465
5466
5467
5468
5469
5470 func (r *ResourceRecordSetsService) Create(project string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall {
5471 c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5472 c.project = project
5473 c.managedZone = managedZone
5474 c.resourcerecordset = resourcerecordset
5475 return c
5476 }
5477
5478
5479
5480
5481 func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall {
5482 c.urlParams_.Set("clientOperationId", clientOperationId)
5483 return c
5484 }
5485
5486
5487
5488
5489 func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall {
5490 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5491 return c
5492 }
5493
5494
5495 func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall {
5496 c.ctx_ = ctx
5497 return c
5498 }
5499
5500
5501
5502 func (c *ResourceRecordSetsCreateCall) Header() http.Header {
5503 if c.header_ == nil {
5504 c.header_ = make(http.Header)
5505 }
5506 return c.header_
5507 }
5508
5509 func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) {
5510 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5511 var body io.Reader = nil
5512 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
5513 if err != nil {
5514 return nil, err
5515 }
5516 c.urlParams_.Set("alt", alt)
5517 c.urlParams_.Set("prettyPrint", "false")
5518 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets")
5519 urls += "?" + c.urlParams_.Encode()
5520 req, err := http.NewRequest("POST", urls, body)
5521 if err != nil {
5522 return nil, err
5523 }
5524 req.Header = reqHeaders
5525 googleapi.Expand(req.URL, map[string]string{
5526 "project": c.project,
5527 "managedZone": c.managedZone,
5528 })
5529 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5530 }
5531
5532
5533
5534
5535
5536
5537
5538 func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
5539 gensupport.SetOptions(c.urlParams_, opts...)
5540 res, err := c.doRequest("json")
5541 if res != nil && res.StatusCode == http.StatusNotModified {
5542 if res.Body != nil {
5543 res.Body.Close()
5544 }
5545 return nil, gensupport.WrapError(&googleapi.Error{
5546 Code: res.StatusCode,
5547 Header: res.Header,
5548 })
5549 }
5550 if err != nil {
5551 return nil, err
5552 }
5553 defer googleapi.CloseBody(res)
5554 if err := googleapi.CheckResponse(res); err != nil {
5555 return nil, gensupport.WrapError(err)
5556 }
5557 ret := &ResourceRecordSet{
5558 ServerResponse: googleapi.ServerResponse{
5559 Header: res.Header,
5560 HTTPStatusCode: res.StatusCode,
5561 },
5562 }
5563 target := &ret
5564 if err := gensupport.DecodeResponse(target, res); err != nil {
5565 return nil, err
5566 }
5567 return ret, nil
5568 }
5569
5570 type ResourceRecordSetsDeleteCall struct {
5571 s *Service
5572 project string
5573 managedZone string
5574 name string
5575 type_ string
5576 urlParams_ gensupport.URLParams
5577 ctx_ context.Context
5578 header_ http.Header
5579 }
5580
5581
5582
5583
5584
5585
5586
5587
5588 func (r *ResourceRecordSetsService) Delete(project string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall {
5589 c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5590 c.project = project
5591 c.managedZone = managedZone
5592 c.name = name
5593 c.type_ = type_
5594 return c
5595 }
5596
5597
5598
5599
5600 func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall {
5601 c.urlParams_.Set("clientOperationId", clientOperationId)
5602 return c
5603 }
5604
5605
5606
5607
5608 func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall {
5609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5610 return c
5611 }
5612
5613
5614 func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall {
5615 c.ctx_ = ctx
5616 return c
5617 }
5618
5619
5620
5621 func (c *ResourceRecordSetsDeleteCall) Header() http.Header {
5622 if c.header_ == nil {
5623 c.header_ = make(http.Header)
5624 }
5625 return c.header_
5626 }
5627
5628 func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
5629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5630 var body io.Reader = nil
5631 c.urlParams_.Set("alt", alt)
5632 c.urlParams_.Set("prettyPrint", "false")
5633 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
5634 urls += "?" + c.urlParams_.Encode()
5635 req, err := http.NewRequest("DELETE", urls, body)
5636 if err != nil {
5637 return nil, err
5638 }
5639 req.Header = reqHeaders
5640 googleapi.Expand(req.URL, map[string]string{
5641 "project": c.project,
5642 "managedZone": c.managedZone,
5643 "name": c.name,
5644 "type": c.type_,
5645 })
5646 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5647 }
5648
5649
5650
5651
5652
5653
5654
5655 func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsDeleteResponse, error) {
5656 gensupport.SetOptions(c.urlParams_, opts...)
5657 res, err := c.doRequest("json")
5658 if res != nil && res.StatusCode == http.StatusNotModified {
5659 if res.Body != nil {
5660 res.Body.Close()
5661 }
5662 return nil, gensupport.WrapError(&googleapi.Error{
5663 Code: res.StatusCode,
5664 Header: res.Header,
5665 })
5666 }
5667 if err != nil {
5668 return nil, err
5669 }
5670 defer googleapi.CloseBody(res)
5671 if err := googleapi.CheckResponse(res); err != nil {
5672 return nil, gensupport.WrapError(err)
5673 }
5674 ret := &ResourceRecordSetsDeleteResponse{
5675 ServerResponse: googleapi.ServerResponse{
5676 Header: res.Header,
5677 HTTPStatusCode: res.StatusCode,
5678 },
5679 }
5680 target := &ret
5681 if err := gensupport.DecodeResponse(target, res); err != nil {
5682 return nil, err
5683 }
5684 return ret, nil
5685 }
5686
5687 type ResourceRecordSetsGetCall struct {
5688 s *Service
5689 project string
5690 managedZone string
5691 name string
5692 type_ string
5693 urlParams_ gensupport.URLParams
5694 ifNoneMatch_ string
5695 ctx_ context.Context
5696 header_ http.Header
5697 }
5698
5699
5700
5701
5702
5703
5704
5705
5706 func (r *ResourceRecordSetsService) Get(project string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall {
5707 c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5708 c.project = project
5709 c.managedZone = managedZone
5710 c.name = name
5711 c.type_ = type_
5712 return c
5713 }
5714
5715
5716
5717
5718 func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall {
5719 c.urlParams_.Set("clientOperationId", clientOperationId)
5720 return c
5721 }
5722
5723
5724
5725
5726 func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall {
5727 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5728 return c
5729 }
5730
5731
5732
5733
5734 func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall {
5735 c.ifNoneMatch_ = entityTag
5736 return c
5737 }
5738
5739
5740 func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall {
5741 c.ctx_ = ctx
5742 return c
5743 }
5744
5745
5746
5747 func (c *ResourceRecordSetsGetCall) Header() http.Header {
5748 if c.header_ == nil {
5749 c.header_ = make(http.Header)
5750 }
5751 return c.header_
5752 }
5753
5754 func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) {
5755 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5756 if c.ifNoneMatch_ != "" {
5757 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5758 }
5759 var body io.Reader = nil
5760 c.urlParams_.Set("alt", alt)
5761 c.urlParams_.Set("prettyPrint", "false")
5762 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
5763 urls += "?" + c.urlParams_.Encode()
5764 req, err := http.NewRequest("GET", urls, body)
5765 if err != nil {
5766 return nil, err
5767 }
5768 req.Header = reqHeaders
5769 googleapi.Expand(req.URL, map[string]string{
5770 "project": c.project,
5771 "managedZone": c.managedZone,
5772 "name": c.name,
5773 "type": c.type_,
5774 })
5775 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5776 }
5777
5778
5779
5780
5781
5782
5783
5784 func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
5785 gensupport.SetOptions(c.urlParams_, opts...)
5786 res, err := c.doRequest("json")
5787 if res != nil && res.StatusCode == http.StatusNotModified {
5788 if res.Body != nil {
5789 res.Body.Close()
5790 }
5791 return nil, gensupport.WrapError(&googleapi.Error{
5792 Code: res.StatusCode,
5793 Header: res.Header,
5794 })
5795 }
5796 if err != nil {
5797 return nil, err
5798 }
5799 defer googleapi.CloseBody(res)
5800 if err := googleapi.CheckResponse(res); err != nil {
5801 return nil, gensupport.WrapError(err)
5802 }
5803 ret := &ResourceRecordSet{
5804 ServerResponse: googleapi.ServerResponse{
5805 Header: res.Header,
5806 HTTPStatusCode: res.StatusCode,
5807 },
5808 }
5809 target := &ret
5810 if err := gensupport.DecodeResponse(target, res); err != nil {
5811 return nil, err
5812 }
5813 return ret, nil
5814 }
5815
5816 type ResourceRecordSetsListCall struct {
5817 s *Service
5818 project string
5819 managedZone string
5820 urlParams_ gensupport.URLParams
5821 ifNoneMatch_ string
5822 ctx_ context.Context
5823 header_ http.Header
5824 }
5825
5826
5827
5828
5829
5830
5831
5832 func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall {
5833 c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5834 c.project = project
5835 c.managedZone = managedZone
5836 return c
5837 }
5838
5839
5840
5841
5842 func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall {
5843 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5844 return c
5845 }
5846
5847
5848
5849 func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall {
5850 c.urlParams_.Set("name", name)
5851 return c
5852 }
5853
5854
5855
5856
5857 func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall {
5858 c.urlParams_.Set("pageToken", pageToken)
5859 return c
5860 }
5861
5862
5863
5864 func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall {
5865 c.urlParams_.Set("type", type_)
5866 return c
5867 }
5868
5869
5870
5871
5872 func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall {
5873 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5874 return c
5875 }
5876
5877
5878
5879
5880 func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall {
5881 c.ifNoneMatch_ = entityTag
5882 return c
5883 }
5884
5885
5886 func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
5887 c.ctx_ = ctx
5888 return c
5889 }
5890
5891
5892
5893 func (c *ResourceRecordSetsListCall) Header() http.Header {
5894 if c.header_ == nil {
5895 c.header_ = make(http.Header)
5896 }
5897 return c.header_
5898 }
5899
5900 func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
5901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5902 if c.ifNoneMatch_ != "" {
5903 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5904 }
5905 var body io.Reader = nil
5906 c.urlParams_.Set("alt", alt)
5907 c.urlParams_.Set("prettyPrint", "false")
5908 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets")
5909 urls += "?" + c.urlParams_.Encode()
5910 req, err := http.NewRequest("GET", urls, body)
5911 if err != nil {
5912 return nil, err
5913 }
5914 req.Header = reqHeaders
5915 googleapi.Expand(req.URL, map[string]string{
5916 "project": c.project,
5917 "managedZone": c.managedZone,
5918 })
5919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5920 }
5921
5922
5923
5924
5925
5926
5927
5928 func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) {
5929 gensupport.SetOptions(c.urlParams_, opts...)
5930 res, err := c.doRequest("json")
5931 if res != nil && res.StatusCode == http.StatusNotModified {
5932 if res.Body != nil {
5933 res.Body.Close()
5934 }
5935 return nil, gensupport.WrapError(&googleapi.Error{
5936 Code: res.StatusCode,
5937 Header: res.Header,
5938 })
5939 }
5940 if err != nil {
5941 return nil, err
5942 }
5943 defer googleapi.CloseBody(res)
5944 if err := googleapi.CheckResponse(res); err != nil {
5945 return nil, gensupport.WrapError(err)
5946 }
5947 ret := &ResourceRecordSetsListResponse{
5948 ServerResponse: googleapi.ServerResponse{
5949 Header: res.Header,
5950 HTTPStatusCode: res.StatusCode,
5951 },
5952 }
5953 target := &ret
5954 if err := gensupport.DecodeResponse(target, res); err != nil {
5955 return nil, err
5956 }
5957 return ret, nil
5958 }
5959
5960
5961
5962
5963 func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error {
5964 c.ctx_ = ctx
5965 defer c.PageToken(c.urlParams_.Get("pageToken"))
5966 for {
5967 x, err := c.Do()
5968 if err != nil {
5969 return err
5970 }
5971 if err := f(x); err != nil {
5972 return err
5973 }
5974 if x.NextPageToken == "" {
5975 return nil
5976 }
5977 c.PageToken(x.NextPageToken)
5978 }
5979 }
5980
5981 type ResourceRecordSetsPatchCall struct {
5982 s *Service
5983 project string
5984 managedZone string
5985 name string
5986 type_ string
5987 resourcerecordset *ResourceRecordSet
5988 urlParams_ gensupport.URLParams
5989 ctx_ context.Context
5990 header_ http.Header
5991 }
5992
5993
5994
5995
5996
5997
5998
5999
6000 func (r *ResourceRecordSetsService) Patch(project string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall {
6001 c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6002 c.project = project
6003 c.managedZone = managedZone
6004 c.name = name
6005 c.type_ = type_
6006 c.resourcerecordset = resourcerecordset
6007 return c
6008 }
6009
6010
6011
6012
6013 func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall {
6014 c.urlParams_.Set("clientOperationId", clientOperationId)
6015 return c
6016 }
6017
6018
6019
6020
6021 func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall {
6022 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6023 return c
6024 }
6025
6026
6027 func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall {
6028 c.ctx_ = ctx
6029 return c
6030 }
6031
6032
6033
6034 func (c *ResourceRecordSetsPatchCall) Header() http.Header {
6035 if c.header_ == nil {
6036 c.header_ = make(http.Header)
6037 }
6038 return c.header_
6039 }
6040
6041 func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) {
6042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6043 var body io.Reader = nil
6044 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcerecordset)
6045 if err != nil {
6046 return nil, err
6047 }
6048 c.urlParams_.Set("alt", alt)
6049 c.urlParams_.Set("prettyPrint", "false")
6050 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}")
6051 urls += "?" + c.urlParams_.Encode()
6052 req, err := http.NewRequest("PATCH", urls, body)
6053 if err != nil {
6054 return nil, err
6055 }
6056 req.Header = reqHeaders
6057 googleapi.Expand(req.URL, map[string]string{
6058 "project": c.project,
6059 "managedZone": c.managedZone,
6060 "name": c.name,
6061 "type": c.type_,
6062 })
6063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6064 }
6065
6066
6067
6068
6069
6070
6071
6072 func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) {
6073 gensupport.SetOptions(c.urlParams_, opts...)
6074 res, err := c.doRequest("json")
6075 if res != nil && res.StatusCode == http.StatusNotModified {
6076 if res.Body != nil {
6077 res.Body.Close()
6078 }
6079 return nil, gensupport.WrapError(&googleapi.Error{
6080 Code: res.StatusCode,
6081 Header: res.Header,
6082 })
6083 }
6084 if err != nil {
6085 return nil, err
6086 }
6087 defer googleapi.CloseBody(res)
6088 if err := googleapi.CheckResponse(res); err != nil {
6089 return nil, gensupport.WrapError(err)
6090 }
6091 ret := &ResourceRecordSet{
6092 ServerResponse: googleapi.ServerResponse{
6093 Header: res.Header,
6094 HTTPStatusCode: res.StatusCode,
6095 },
6096 }
6097 target := &ret
6098 if err := gensupport.DecodeResponse(target, res); err != nil {
6099 return nil, err
6100 }
6101 return ret, nil
6102 }
6103
6104 type ResponsePoliciesCreateCall struct {
6105 s *Service
6106 project string
6107 responsepolicy *ResponsePolicy
6108 urlParams_ gensupport.URLParams
6109 ctx_ context.Context
6110 header_ http.Header
6111 }
6112
6113
6114
6115
6116 func (r *ResponsePoliciesService) Create(project string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall {
6117 c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6118 c.project = project
6119 c.responsepolicy = responsepolicy
6120 return c
6121 }
6122
6123
6124
6125
6126 func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall {
6127 c.urlParams_.Set("clientOperationId", clientOperationId)
6128 return c
6129 }
6130
6131
6132
6133
6134 func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall {
6135 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6136 return c
6137 }
6138
6139
6140 func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall {
6141 c.ctx_ = ctx
6142 return c
6143 }
6144
6145
6146
6147 func (c *ResponsePoliciesCreateCall) Header() http.Header {
6148 if c.header_ == nil {
6149 c.header_ = make(http.Header)
6150 }
6151 return c.header_
6152 }
6153
6154 func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
6155 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6156 var body io.Reader = nil
6157 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6158 if err != nil {
6159 return nil, err
6160 }
6161 c.urlParams_.Set("alt", alt)
6162 c.urlParams_.Set("prettyPrint", "false")
6163 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies")
6164 urls += "?" + c.urlParams_.Encode()
6165 req, err := http.NewRequest("POST", urls, body)
6166 if err != nil {
6167 return nil, err
6168 }
6169 req.Header = reqHeaders
6170 googleapi.Expand(req.URL, map[string]string{
6171 "project": c.project,
6172 })
6173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6174 }
6175
6176
6177
6178
6179
6180
6181 func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
6182 gensupport.SetOptions(c.urlParams_, opts...)
6183 res, err := c.doRequest("json")
6184 if res != nil && res.StatusCode == http.StatusNotModified {
6185 if res.Body != nil {
6186 res.Body.Close()
6187 }
6188 return nil, gensupport.WrapError(&googleapi.Error{
6189 Code: res.StatusCode,
6190 Header: res.Header,
6191 })
6192 }
6193 if err != nil {
6194 return nil, err
6195 }
6196 defer googleapi.CloseBody(res)
6197 if err := googleapi.CheckResponse(res); err != nil {
6198 return nil, gensupport.WrapError(err)
6199 }
6200 ret := &ResponsePolicy{
6201 ServerResponse: googleapi.ServerResponse{
6202 Header: res.Header,
6203 HTTPStatusCode: res.StatusCode,
6204 },
6205 }
6206 target := &ret
6207 if err := gensupport.DecodeResponse(target, res); err != nil {
6208 return nil, err
6209 }
6210 return ret, nil
6211 }
6212
6213 type ResponsePoliciesDeleteCall struct {
6214 s *Service
6215 project string
6216 responsePolicy string
6217 urlParams_ gensupport.URLParams
6218 ctx_ context.Context
6219 header_ http.Header
6220 }
6221
6222
6223
6224
6225
6226
6227
6228 func (r *ResponsePoliciesService) Delete(project string, responsePolicy string) *ResponsePoliciesDeleteCall {
6229 c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6230 c.project = project
6231 c.responsePolicy = responsePolicy
6232 return c
6233 }
6234
6235
6236
6237
6238 func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall {
6239 c.urlParams_.Set("clientOperationId", clientOperationId)
6240 return c
6241 }
6242
6243
6244
6245
6246 func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall {
6247 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6248 return c
6249 }
6250
6251
6252 func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall {
6253 c.ctx_ = ctx
6254 return c
6255 }
6256
6257
6258
6259 func (c *ResponsePoliciesDeleteCall) Header() http.Header {
6260 if c.header_ == nil {
6261 c.header_ = make(http.Header)
6262 }
6263 return c.header_
6264 }
6265
6266 func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6267 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6268 var body io.Reader = nil
6269 c.urlParams_.Set("alt", alt)
6270 c.urlParams_.Set("prettyPrint", "false")
6271 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
6272 urls += "?" + c.urlParams_.Encode()
6273 req, err := http.NewRequest("DELETE", urls, body)
6274 if err != nil {
6275 return nil, err
6276 }
6277 req.Header = reqHeaders
6278 googleapi.Expand(req.URL, map[string]string{
6279 "project": c.project,
6280 "responsePolicy": c.responsePolicy,
6281 })
6282 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6283 }
6284
6285
6286 func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error {
6287 gensupport.SetOptions(c.urlParams_, opts...)
6288 res, err := c.doRequest("json")
6289 if err != nil {
6290 return err
6291 }
6292 defer googleapi.CloseBody(res)
6293 if err := googleapi.CheckResponse(res); err != nil {
6294 return gensupport.WrapError(err)
6295 }
6296 return nil
6297 }
6298
6299 type ResponsePoliciesGetCall struct {
6300 s *Service
6301 project string
6302 responsePolicy string
6303 urlParams_ gensupport.URLParams
6304 ifNoneMatch_ string
6305 ctx_ context.Context
6306 header_ http.Header
6307 }
6308
6309
6310
6311
6312
6313
6314 func (r *ResponsePoliciesService) Get(project string, responsePolicy string) *ResponsePoliciesGetCall {
6315 c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6316 c.project = project
6317 c.responsePolicy = responsePolicy
6318 return c
6319 }
6320
6321
6322
6323
6324 func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall {
6325 c.urlParams_.Set("clientOperationId", clientOperationId)
6326 return c
6327 }
6328
6329
6330
6331
6332 func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall {
6333 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6334 return c
6335 }
6336
6337
6338
6339
6340 func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall {
6341 c.ifNoneMatch_ = entityTag
6342 return c
6343 }
6344
6345
6346 func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall {
6347 c.ctx_ = ctx
6348 return c
6349 }
6350
6351
6352
6353 func (c *ResponsePoliciesGetCall) Header() http.Header {
6354 if c.header_ == nil {
6355 c.header_ = make(http.Header)
6356 }
6357 return c.header_
6358 }
6359
6360 func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) {
6361 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6362 if c.ifNoneMatch_ != "" {
6363 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6364 }
6365 var body io.Reader = nil
6366 c.urlParams_.Set("alt", alt)
6367 c.urlParams_.Set("prettyPrint", "false")
6368 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
6369 urls += "?" + c.urlParams_.Encode()
6370 req, err := http.NewRequest("GET", urls, body)
6371 if err != nil {
6372 return nil, err
6373 }
6374 req.Header = reqHeaders
6375 googleapi.Expand(req.URL, map[string]string{
6376 "project": c.project,
6377 "responsePolicy": c.responsePolicy,
6378 })
6379 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6380 }
6381
6382
6383
6384
6385
6386
6387 func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) {
6388 gensupport.SetOptions(c.urlParams_, opts...)
6389 res, err := c.doRequest("json")
6390 if res != nil && res.StatusCode == http.StatusNotModified {
6391 if res.Body != nil {
6392 res.Body.Close()
6393 }
6394 return nil, gensupport.WrapError(&googleapi.Error{
6395 Code: res.StatusCode,
6396 Header: res.Header,
6397 })
6398 }
6399 if err != nil {
6400 return nil, err
6401 }
6402 defer googleapi.CloseBody(res)
6403 if err := googleapi.CheckResponse(res); err != nil {
6404 return nil, gensupport.WrapError(err)
6405 }
6406 ret := &ResponsePolicy{
6407 ServerResponse: googleapi.ServerResponse{
6408 Header: res.Header,
6409 HTTPStatusCode: res.StatusCode,
6410 },
6411 }
6412 target := &ret
6413 if err := gensupport.DecodeResponse(target, res); err != nil {
6414 return nil, err
6415 }
6416 return ret, nil
6417 }
6418
6419 type ResponsePoliciesListCall struct {
6420 s *Service
6421 project string
6422 urlParams_ gensupport.URLParams
6423 ifNoneMatch_ string
6424 ctx_ context.Context
6425 header_ http.Header
6426 }
6427
6428
6429
6430
6431 func (r *ResponsePoliciesService) List(project string) *ResponsePoliciesListCall {
6432 c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6433 c.project = project
6434 return c
6435 }
6436
6437
6438
6439
6440 func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall {
6441 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
6442 return c
6443 }
6444
6445
6446
6447
6448 func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall {
6449 c.urlParams_.Set("pageToken", pageToken)
6450 return c
6451 }
6452
6453
6454
6455
6456 func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall {
6457 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6458 return c
6459 }
6460
6461
6462
6463
6464 func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall {
6465 c.ifNoneMatch_ = entityTag
6466 return c
6467 }
6468
6469
6470 func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall {
6471 c.ctx_ = ctx
6472 return c
6473 }
6474
6475
6476
6477 func (c *ResponsePoliciesListCall) Header() http.Header {
6478 if c.header_ == nil {
6479 c.header_ = make(http.Header)
6480 }
6481 return c.header_
6482 }
6483
6484 func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) {
6485 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6486 if c.ifNoneMatch_ != "" {
6487 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6488 }
6489 var body io.Reader = nil
6490 c.urlParams_.Set("alt", alt)
6491 c.urlParams_.Set("prettyPrint", "false")
6492 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies")
6493 urls += "?" + c.urlParams_.Encode()
6494 req, err := http.NewRequest("GET", urls, body)
6495 if err != nil {
6496 return nil, err
6497 }
6498 req.Header = reqHeaders
6499 googleapi.Expand(req.URL, map[string]string{
6500 "project": c.project,
6501 })
6502 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6503 }
6504
6505
6506
6507
6508
6509
6510
6511 func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) {
6512 gensupport.SetOptions(c.urlParams_, opts...)
6513 res, err := c.doRequest("json")
6514 if res != nil && res.StatusCode == http.StatusNotModified {
6515 if res.Body != nil {
6516 res.Body.Close()
6517 }
6518 return nil, gensupport.WrapError(&googleapi.Error{
6519 Code: res.StatusCode,
6520 Header: res.Header,
6521 })
6522 }
6523 if err != nil {
6524 return nil, err
6525 }
6526 defer googleapi.CloseBody(res)
6527 if err := googleapi.CheckResponse(res); err != nil {
6528 return nil, gensupport.WrapError(err)
6529 }
6530 ret := &ResponsePoliciesListResponse{
6531 ServerResponse: googleapi.ServerResponse{
6532 Header: res.Header,
6533 HTTPStatusCode: res.StatusCode,
6534 },
6535 }
6536 target := &ret
6537 if err := gensupport.DecodeResponse(target, res); err != nil {
6538 return nil, err
6539 }
6540 return ret, nil
6541 }
6542
6543
6544
6545
6546 func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error {
6547 c.ctx_ = ctx
6548 defer c.PageToken(c.urlParams_.Get("pageToken"))
6549 for {
6550 x, err := c.Do()
6551 if err != nil {
6552 return err
6553 }
6554 if err := f(x); err != nil {
6555 return err
6556 }
6557 if x.NextPageToken == "" {
6558 return nil
6559 }
6560 c.PageToken(x.NextPageToken)
6561 }
6562 }
6563
6564 type ResponsePoliciesPatchCall struct {
6565 s *Service
6566 project string
6567 responsePolicy string
6568 responsepolicy *ResponsePolicy
6569 urlParams_ gensupport.URLParams
6570 ctx_ context.Context
6571 header_ http.Header
6572 }
6573
6574
6575
6576
6577
6578
6579 func (r *ResponsePoliciesService) Patch(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall {
6580 c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6581 c.project = project
6582 c.responsePolicy = responsePolicy
6583 c.responsepolicy = responsepolicy
6584 return c
6585 }
6586
6587
6588
6589
6590 func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall {
6591 c.urlParams_.Set("clientOperationId", clientOperationId)
6592 return c
6593 }
6594
6595
6596
6597
6598 func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall {
6599 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6600 return c
6601 }
6602
6603
6604 func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall {
6605 c.ctx_ = ctx
6606 return c
6607 }
6608
6609
6610
6611 func (c *ResponsePoliciesPatchCall) Header() http.Header {
6612 if c.header_ == nil {
6613 c.header_ = make(http.Header)
6614 }
6615 return c.header_
6616 }
6617
6618 func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
6619 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6620 var body io.Reader = nil
6621 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6622 if err != nil {
6623 return nil, err
6624 }
6625 c.urlParams_.Set("alt", alt)
6626 c.urlParams_.Set("prettyPrint", "false")
6627 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
6628 urls += "?" + c.urlParams_.Encode()
6629 req, err := http.NewRequest("PATCH", urls, body)
6630 if err != nil {
6631 return nil, err
6632 }
6633 req.Header = reqHeaders
6634 googleapi.Expand(req.URL, map[string]string{
6635 "project": c.project,
6636 "responsePolicy": c.responsePolicy,
6637 })
6638 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6639 }
6640
6641
6642
6643
6644
6645
6646
6647 func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) {
6648 gensupport.SetOptions(c.urlParams_, opts...)
6649 res, err := c.doRequest("json")
6650 if res != nil && res.StatusCode == http.StatusNotModified {
6651 if res.Body != nil {
6652 res.Body.Close()
6653 }
6654 return nil, gensupport.WrapError(&googleapi.Error{
6655 Code: res.StatusCode,
6656 Header: res.Header,
6657 })
6658 }
6659 if err != nil {
6660 return nil, err
6661 }
6662 defer googleapi.CloseBody(res)
6663 if err := googleapi.CheckResponse(res); err != nil {
6664 return nil, gensupport.WrapError(err)
6665 }
6666 ret := &ResponsePoliciesPatchResponse{
6667 ServerResponse: googleapi.ServerResponse{
6668 Header: res.Header,
6669 HTTPStatusCode: res.StatusCode,
6670 },
6671 }
6672 target := &ret
6673 if err := gensupport.DecodeResponse(target, res); err != nil {
6674 return nil, err
6675 }
6676 return ret, nil
6677 }
6678
6679 type ResponsePoliciesUpdateCall struct {
6680 s *Service
6681 project string
6682 responsePolicy string
6683 responsepolicy *ResponsePolicy
6684 urlParams_ gensupport.URLParams
6685 ctx_ context.Context
6686 header_ http.Header
6687 }
6688
6689
6690
6691
6692
6693
6694 func (r *ResponsePoliciesService) Update(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall {
6695 c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6696 c.project = project
6697 c.responsePolicy = responsePolicy
6698 c.responsepolicy = responsepolicy
6699 return c
6700 }
6701
6702
6703
6704
6705 func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall {
6706 c.urlParams_.Set("clientOperationId", clientOperationId)
6707 return c
6708 }
6709
6710
6711
6712
6713 func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall {
6714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6715 return c
6716 }
6717
6718
6719 func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall {
6720 c.ctx_ = ctx
6721 return c
6722 }
6723
6724
6725
6726 func (c *ResponsePoliciesUpdateCall) Header() http.Header {
6727 if c.header_ == nil {
6728 c.header_ = make(http.Header)
6729 }
6730 return c.header_
6731 }
6732
6733 func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
6734 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6735 var body io.Reader = nil
6736 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicy)
6737 if err != nil {
6738 return nil, err
6739 }
6740 c.urlParams_.Set("alt", alt)
6741 c.urlParams_.Set("prettyPrint", "false")
6742 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}")
6743 urls += "?" + c.urlParams_.Encode()
6744 req, err := http.NewRequest("PUT", urls, body)
6745 if err != nil {
6746 return nil, err
6747 }
6748 req.Header = reqHeaders
6749 googleapi.Expand(req.URL, map[string]string{
6750 "project": c.project,
6751 "responsePolicy": c.responsePolicy,
6752 })
6753 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6754 }
6755
6756
6757
6758
6759
6760
6761
6762 func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) {
6763 gensupport.SetOptions(c.urlParams_, opts...)
6764 res, err := c.doRequest("json")
6765 if res != nil && res.StatusCode == http.StatusNotModified {
6766 if res.Body != nil {
6767 res.Body.Close()
6768 }
6769 return nil, gensupport.WrapError(&googleapi.Error{
6770 Code: res.StatusCode,
6771 Header: res.Header,
6772 })
6773 }
6774 if err != nil {
6775 return nil, err
6776 }
6777 defer googleapi.CloseBody(res)
6778 if err := googleapi.CheckResponse(res); err != nil {
6779 return nil, gensupport.WrapError(err)
6780 }
6781 ret := &ResponsePoliciesUpdateResponse{
6782 ServerResponse: googleapi.ServerResponse{
6783 Header: res.Header,
6784 HTTPStatusCode: res.StatusCode,
6785 },
6786 }
6787 target := &ret
6788 if err := gensupport.DecodeResponse(target, res); err != nil {
6789 return nil, err
6790 }
6791 return ret, nil
6792 }
6793
6794 type ResponsePolicyRulesCreateCall struct {
6795 s *Service
6796 project string
6797 responsePolicy string
6798 responsepolicyrule *ResponsePolicyRule
6799 urlParams_ gensupport.URLParams
6800 ctx_ context.Context
6801 header_ http.Header
6802 }
6803
6804
6805
6806
6807
6808
6809 func (r *ResponsePolicyRulesService) Create(project string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall {
6810 c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6811 c.project = project
6812 c.responsePolicy = responsePolicy
6813 c.responsepolicyrule = responsepolicyrule
6814 return c
6815 }
6816
6817
6818
6819
6820 func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall {
6821 c.urlParams_.Set("clientOperationId", clientOperationId)
6822 return c
6823 }
6824
6825
6826
6827
6828 func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall {
6829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6830 return c
6831 }
6832
6833
6834 func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall {
6835 c.ctx_ = ctx
6836 return c
6837 }
6838
6839
6840
6841 func (c *ResponsePolicyRulesCreateCall) Header() http.Header {
6842 if c.header_ == nil {
6843 c.header_ = make(http.Header)
6844 }
6845 return c.header_
6846 }
6847
6848 func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) {
6849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6850 var body io.Reader = nil
6851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
6852 if err != nil {
6853 return nil, err
6854 }
6855 c.urlParams_.Set("alt", alt)
6856 c.urlParams_.Set("prettyPrint", "false")
6857 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules")
6858 urls += "?" + c.urlParams_.Encode()
6859 req, err := http.NewRequest("POST", urls, body)
6860 if err != nil {
6861 return nil, err
6862 }
6863 req.Header = reqHeaders
6864 googleapi.Expand(req.URL, map[string]string{
6865 "project": c.project,
6866 "responsePolicy": c.responsePolicy,
6867 })
6868 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6869 }
6870
6871
6872
6873
6874
6875
6876
6877 func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
6878 gensupport.SetOptions(c.urlParams_, opts...)
6879 res, err := c.doRequest("json")
6880 if res != nil && res.StatusCode == http.StatusNotModified {
6881 if res.Body != nil {
6882 res.Body.Close()
6883 }
6884 return nil, gensupport.WrapError(&googleapi.Error{
6885 Code: res.StatusCode,
6886 Header: res.Header,
6887 })
6888 }
6889 if err != nil {
6890 return nil, err
6891 }
6892 defer googleapi.CloseBody(res)
6893 if err := googleapi.CheckResponse(res); err != nil {
6894 return nil, gensupport.WrapError(err)
6895 }
6896 ret := &ResponsePolicyRule{
6897 ServerResponse: googleapi.ServerResponse{
6898 Header: res.Header,
6899 HTTPStatusCode: res.StatusCode,
6900 },
6901 }
6902 target := &ret
6903 if err := gensupport.DecodeResponse(target, res); err != nil {
6904 return nil, err
6905 }
6906 return ret, nil
6907 }
6908
6909 type ResponsePolicyRulesDeleteCall struct {
6910 s *Service
6911 project string
6912 responsePolicy string
6913 responsePolicyRule string
6914 urlParams_ gensupport.URLParams
6915 ctx_ context.Context
6916 header_ http.Header
6917 }
6918
6919
6920
6921
6922
6923
6924
6925
6926 func (r *ResponsePolicyRulesService) Delete(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall {
6927 c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6928 c.project = project
6929 c.responsePolicy = responsePolicy
6930 c.responsePolicyRule = responsePolicyRule
6931 return c
6932 }
6933
6934
6935
6936
6937 func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall {
6938 c.urlParams_.Set("clientOperationId", clientOperationId)
6939 return c
6940 }
6941
6942
6943
6944
6945 func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall {
6946 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6947 return c
6948 }
6949
6950
6951 func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall {
6952 c.ctx_ = ctx
6953 return c
6954 }
6955
6956
6957
6958 func (c *ResponsePolicyRulesDeleteCall) Header() http.Header {
6959 if c.header_ == nil {
6960 c.header_ = make(http.Header)
6961 }
6962 return c.header_
6963 }
6964
6965 func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
6966 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6967 var body io.Reader = nil
6968 c.urlParams_.Set("alt", alt)
6969 c.urlParams_.Set("prettyPrint", "false")
6970 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
6971 urls += "?" + c.urlParams_.Encode()
6972 req, err := http.NewRequest("DELETE", urls, body)
6973 if err != nil {
6974 return nil, err
6975 }
6976 req.Header = reqHeaders
6977 googleapi.Expand(req.URL, map[string]string{
6978 "project": c.project,
6979 "responsePolicy": c.responsePolicy,
6980 "responsePolicyRule": c.responsePolicyRule,
6981 })
6982 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6983 }
6984
6985
6986 func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error {
6987 gensupport.SetOptions(c.urlParams_, opts...)
6988 res, err := c.doRequest("json")
6989 if err != nil {
6990 return err
6991 }
6992 defer googleapi.CloseBody(res)
6993 if err := googleapi.CheckResponse(res); err != nil {
6994 return gensupport.WrapError(err)
6995 }
6996 return nil
6997 }
6998
6999 type ResponsePolicyRulesGetCall struct {
7000 s *Service
7001 project string
7002 responsePolicy string
7003 responsePolicyRule string
7004 urlParams_ gensupport.URLParams
7005 ifNoneMatch_ string
7006 ctx_ context.Context
7007 header_ http.Header
7008 }
7009
7010
7011
7012
7013
7014
7015
7016
7017 func (r *ResponsePolicyRulesService) Get(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall {
7018 c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7019 c.project = project
7020 c.responsePolicy = responsePolicy
7021 c.responsePolicyRule = responsePolicyRule
7022 return c
7023 }
7024
7025
7026
7027
7028 func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall {
7029 c.urlParams_.Set("clientOperationId", clientOperationId)
7030 return c
7031 }
7032
7033
7034
7035
7036 func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall {
7037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7038 return c
7039 }
7040
7041
7042
7043
7044 func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall {
7045 c.ifNoneMatch_ = entityTag
7046 return c
7047 }
7048
7049
7050 func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall {
7051 c.ctx_ = ctx
7052 return c
7053 }
7054
7055
7056
7057 func (c *ResponsePolicyRulesGetCall) Header() http.Header {
7058 if c.header_ == nil {
7059 c.header_ = make(http.Header)
7060 }
7061 return c.header_
7062 }
7063
7064 func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) {
7065 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7066 if c.ifNoneMatch_ != "" {
7067 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7068 }
7069 var body io.Reader = nil
7070 c.urlParams_.Set("alt", alt)
7071 c.urlParams_.Set("prettyPrint", "false")
7072 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7073 urls += "?" + c.urlParams_.Encode()
7074 req, err := http.NewRequest("GET", urls, body)
7075 if err != nil {
7076 return nil, err
7077 }
7078 req.Header = reqHeaders
7079 googleapi.Expand(req.URL, map[string]string{
7080 "project": c.project,
7081 "responsePolicy": c.responsePolicy,
7082 "responsePolicyRule": c.responsePolicyRule,
7083 })
7084 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7085 }
7086
7087
7088
7089
7090
7091
7092
7093 func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) {
7094 gensupport.SetOptions(c.urlParams_, opts...)
7095 res, err := c.doRequest("json")
7096 if res != nil && res.StatusCode == http.StatusNotModified {
7097 if res.Body != nil {
7098 res.Body.Close()
7099 }
7100 return nil, gensupport.WrapError(&googleapi.Error{
7101 Code: res.StatusCode,
7102 Header: res.Header,
7103 })
7104 }
7105 if err != nil {
7106 return nil, err
7107 }
7108 defer googleapi.CloseBody(res)
7109 if err := googleapi.CheckResponse(res); err != nil {
7110 return nil, gensupport.WrapError(err)
7111 }
7112 ret := &ResponsePolicyRule{
7113 ServerResponse: googleapi.ServerResponse{
7114 Header: res.Header,
7115 HTTPStatusCode: res.StatusCode,
7116 },
7117 }
7118 target := &ret
7119 if err := gensupport.DecodeResponse(target, res); err != nil {
7120 return nil, err
7121 }
7122 return ret, nil
7123 }
7124
7125 type ResponsePolicyRulesListCall struct {
7126 s *Service
7127 project string
7128 responsePolicy string
7129 urlParams_ gensupport.URLParams
7130 ifNoneMatch_ string
7131 ctx_ context.Context
7132 header_ http.Header
7133 }
7134
7135
7136
7137
7138
7139 func (r *ResponsePolicyRulesService) List(project string, responsePolicy string) *ResponsePolicyRulesListCall {
7140 c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7141 c.project = project
7142 c.responsePolicy = responsePolicy
7143 return c
7144 }
7145
7146
7147
7148
7149 func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall {
7150 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
7151 return c
7152 }
7153
7154
7155
7156
7157 func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall {
7158 c.urlParams_.Set("pageToken", pageToken)
7159 return c
7160 }
7161
7162
7163
7164
7165 func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall {
7166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7167 return c
7168 }
7169
7170
7171
7172
7173 func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall {
7174 c.ifNoneMatch_ = entityTag
7175 return c
7176 }
7177
7178
7179 func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall {
7180 c.ctx_ = ctx
7181 return c
7182 }
7183
7184
7185
7186 func (c *ResponsePolicyRulesListCall) Header() http.Header {
7187 if c.header_ == nil {
7188 c.header_ = make(http.Header)
7189 }
7190 return c.header_
7191 }
7192
7193 func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) {
7194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7195 if c.ifNoneMatch_ != "" {
7196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7197 }
7198 var body io.Reader = nil
7199 c.urlParams_.Set("alt", alt)
7200 c.urlParams_.Set("prettyPrint", "false")
7201 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules")
7202 urls += "?" + c.urlParams_.Encode()
7203 req, err := http.NewRequest("GET", urls, body)
7204 if err != nil {
7205 return nil, err
7206 }
7207 req.Header = reqHeaders
7208 googleapi.Expand(req.URL, map[string]string{
7209 "project": c.project,
7210 "responsePolicy": c.responsePolicy,
7211 })
7212 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7213 }
7214
7215
7216
7217
7218
7219
7220
7221 func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) {
7222 gensupport.SetOptions(c.urlParams_, opts...)
7223 res, err := c.doRequest("json")
7224 if res != nil && res.StatusCode == http.StatusNotModified {
7225 if res.Body != nil {
7226 res.Body.Close()
7227 }
7228 return nil, gensupport.WrapError(&googleapi.Error{
7229 Code: res.StatusCode,
7230 Header: res.Header,
7231 })
7232 }
7233 if err != nil {
7234 return nil, err
7235 }
7236 defer googleapi.CloseBody(res)
7237 if err := googleapi.CheckResponse(res); err != nil {
7238 return nil, gensupport.WrapError(err)
7239 }
7240 ret := &ResponsePolicyRulesListResponse{
7241 ServerResponse: googleapi.ServerResponse{
7242 Header: res.Header,
7243 HTTPStatusCode: res.StatusCode,
7244 },
7245 }
7246 target := &ret
7247 if err := gensupport.DecodeResponse(target, res); err != nil {
7248 return nil, err
7249 }
7250 return ret, nil
7251 }
7252
7253
7254
7255
7256 func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error {
7257 c.ctx_ = ctx
7258 defer c.PageToken(c.urlParams_.Get("pageToken"))
7259 for {
7260 x, err := c.Do()
7261 if err != nil {
7262 return err
7263 }
7264 if err := f(x); err != nil {
7265 return err
7266 }
7267 if x.NextPageToken == "" {
7268 return nil
7269 }
7270 c.PageToken(x.NextPageToken)
7271 }
7272 }
7273
7274 type ResponsePolicyRulesPatchCall struct {
7275 s *Service
7276 project string
7277 responsePolicy string
7278 responsePolicyRule string
7279 responsepolicyrule *ResponsePolicyRule
7280 urlParams_ gensupport.URLParams
7281 ctx_ context.Context
7282 header_ http.Header
7283 }
7284
7285
7286
7287
7288
7289
7290
7291
7292 func (r *ResponsePolicyRulesService) Patch(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall {
7293 c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7294 c.project = project
7295 c.responsePolicy = responsePolicy
7296 c.responsePolicyRule = responsePolicyRule
7297 c.responsepolicyrule = responsepolicyrule
7298 return c
7299 }
7300
7301
7302
7303
7304 func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall {
7305 c.urlParams_.Set("clientOperationId", clientOperationId)
7306 return c
7307 }
7308
7309
7310
7311
7312 func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall {
7313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7314 return c
7315 }
7316
7317
7318 func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall {
7319 c.ctx_ = ctx
7320 return c
7321 }
7322
7323
7324
7325 func (c *ResponsePolicyRulesPatchCall) Header() http.Header {
7326 if c.header_ == nil {
7327 c.header_ = make(http.Header)
7328 }
7329 return c.header_
7330 }
7331
7332 func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) {
7333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7334 var body io.Reader = nil
7335 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
7336 if err != nil {
7337 return nil, err
7338 }
7339 c.urlParams_.Set("alt", alt)
7340 c.urlParams_.Set("prettyPrint", "false")
7341 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7342 urls += "?" + c.urlParams_.Encode()
7343 req, err := http.NewRequest("PATCH", urls, body)
7344 if err != nil {
7345 return nil, err
7346 }
7347 req.Header = reqHeaders
7348 googleapi.Expand(req.URL, map[string]string{
7349 "project": c.project,
7350 "responsePolicy": c.responsePolicy,
7351 "responsePolicyRule": c.responsePolicyRule,
7352 })
7353 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7354 }
7355
7356
7357
7358
7359
7360
7361
7362 func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) {
7363 gensupport.SetOptions(c.urlParams_, opts...)
7364 res, err := c.doRequest("json")
7365 if res != nil && res.StatusCode == http.StatusNotModified {
7366 if res.Body != nil {
7367 res.Body.Close()
7368 }
7369 return nil, gensupport.WrapError(&googleapi.Error{
7370 Code: res.StatusCode,
7371 Header: res.Header,
7372 })
7373 }
7374 if err != nil {
7375 return nil, err
7376 }
7377 defer googleapi.CloseBody(res)
7378 if err := googleapi.CheckResponse(res); err != nil {
7379 return nil, gensupport.WrapError(err)
7380 }
7381 ret := &ResponsePolicyRulesPatchResponse{
7382 ServerResponse: googleapi.ServerResponse{
7383 Header: res.Header,
7384 HTTPStatusCode: res.StatusCode,
7385 },
7386 }
7387 target := &ret
7388 if err := gensupport.DecodeResponse(target, res); err != nil {
7389 return nil, err
7390 }
7391 return ret, nil
7392 }
7393
7394 type ResponsePolicyRulesUpdateCall struct {
7395 s *Service
7396 project string
7397 responsePolicy string
7398 responsePolicyRule string
7399 responsepolicyrule *ResponsePolicyRule
7400 urlParams_ gensupport.URLParams
7401 ctx_ context.Context
7402 header_ http.Header
7403 }
7404
7405
7406
7407
7408
7409
7410
7411
7412 func (r *ResponsePolicyRulesService) Update(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall {
7413 c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7414 c.project = project
7415 c.responsePolicy = responsePolicy
7416 c.responsePolicyRule = responsePolicyRule
7417 c.responsepolicyrule = responsepolicyrule
7418 return c
7419 }
7420
7421
7422
7423
7424 func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall {
7425 c.urlParams_.Set("clientOperationId", clientOperationId)
7426 return c
7427 }
7428
7429
7430
7431
7432 func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall {
7433 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7434 return c
7435 }
7436
7437
7438 func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall {
7439 c.ctx_ = ctx
7440 return c
7441 }
7442
7443
7444
7445 func (c *ResponsePolicyRulesUpdateCall) Header() http.Header {
7446 if c.header_ == nil {
7447 c.header_ = make(http.Header)
7448 }
7449 return c.header_
7450 }
7451
7452 func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
7453 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7454 var body io.Reader = nil
7455 body, err := googleapi.WithoutDataWrapper.JSONReader(c.responsepolicyrule)
7456 if err != nil {
7457 return nil, err
7458 }
7459 c.urlParams_.Set("alt", alt)
7460 c.urlParams_.Set("prettyPrint", "false")
7461 urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}")
7462 urls += "?" + c.urlParams_.Encode()
7463 req, err := http.NewRequest("PUT", urls, body)
7464 if err != nil {
7465 return nil, err
7466 }
7467 req.Header = reqHeaders
7468 googleapi.Expand(req.URL, map[string]string{
7469 "project": c.project,
7470 "responsePolicy": c.responsePolicy,
7471 "responsePolicyRule": c.responsePolicyRule,
7472 })
7473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7474 }
7475
7476
7477
7478
7479
7480
7481
7482 func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) {
7483 gensupport.SetOptions(c.urlParams_, opts...)
7484 res, err := c.doRequest("json")
7485 if res != nil && res.StatusCode == http.StatusNotModified {
7486 if res.Body != nil {
7487 res.Body.Close()
7488 }
7489 return nil, gensupport.WrapError(&googleapi.Error{
7490 Code: res.StatusCode,
7491 Header: res.Header,
7492 })
7493 }
7494 if err != nil {
7495 return nil, err
7496 }
7497 defer googleapi.CloseBody(res)
7498 if err := googleapi.CheckResponse(res); err != nil {
7499 return nil, gensupport.WrapError(err)
7500 }
7501 ret := &ResponsePolicyRulesUpdateResponse{
7502 ServerResponse: googleapi.ServerResponse{
7503 Header: res.Header,
7504 HTTPStatusCode: res.StatusCode,
7505 },
7506 }
7507 target := &ret
7508 if err := gensupport.DecodeResponse(target, res); err != nil {
7509 return nil, err
7510 }
7511 return ret, nil
7512 }
7513
View as plain text