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