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 package dfareporting
43
44 import (
45 "bytes"
46 "context"
47 "encoding/json"
48 "errors"
49 "fmt"
50 "io"
51 "net/http"
52 "net/url"
53 "strconv"
54 "strings"
55
56 googleapi "google.golang.org/api/googleapi"
57 internal "google.golang.org/api/internal"
58 gensupport "google.golang.org/api/internal/gensupport"
59 option "google.golang.org/api/option"
60 internaloption "google.golang.org/api/option/internaloption"
61 htransport "google.golang.org/api/transport/http"
62 )
63
64
65
66 var _ = bytes.NewBuffer
67 var _ = strconv.Itoa
68 var _ = fmt.Sprintf
69 var _ = json.NewDecoder
70 var _ = io.Copy
71 var _ = url.Parse
72 var _ = gensupport.MarshalJSON
73 var _ = googleapi.Version
74 var _ = errors.New
75 var _ = strings.Replace
76 var _ = context.Canceled
77 var _ = internaloption.WithDefaultEndpoint
78
79 const apiId = "dfareporting:v3.3"
80 const apiName = "dfareporting"
81 const apiVersion = "v3.3"
82 const basePath = "https://dfareporting.googleapis.com/dfareporting/v3.3/"
83 const mtlsBasePath = "https://dfareporting.mtls.googleapis.com/dfareporting/v3.3/"
84
85
86 const (
87
88 DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
89
90
91 DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
92
93
94
95 DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
96 )
97
98
99 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
100 scopesOption := internaloption.WithDefaultScopes(
101 "https://www.googleapis.com/auth/ddmconversions",
102 "https://www.googleapis.com/auth/dfareporting",
103 "https://www.googleapis.com/auth/dfatrafficking",
104 )
105
106 opts = append([]option.ClientOption{scopesOption}, opts...)
107 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
108 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
109 client, endpoint, err := htransport.NewClient(ctx, opts...)
110 if err != nil {
111 return nil, err
112 }
113 s, err := New(client)
114 if err != nil {
115 return nil, err
116 }
117 if endpoint != "" {
118 s.BasePath = endpoint
119 }
120 return s, nil
121 }
122
123
124
125
126
127
128 func New(client *http.Client) (*Service, error) {
129 if client == nil {
130 return nil, errors.New("client is nil")
131 }
132 s := &Service{client: client, BasePath: basePath}
133 s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
134 s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
135 s.AccountPermissions = NewAccountPermissionsService(s)
136 s.AccountUserProfiles = NewAccountUserProfilesService(s)
137 s.Accounts = NewAccountsService(s)
138 s.Ads = NewAdsService(s)
139 s.AdvertiserGroups = NewAdvertiserGroupsService(s)
140 s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
141 s.Advertisers = NewAdvertisersService(s)
142 s.Browsers = NewBrowsersService(s)
143 s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
144 s.Campaigns = NewCampaignsService(s)
145 s.ChangeLogs = NewChangeLogsService(s)
146 s.Cities = NewCitiesService(s)
147 s.ConnectionTypes = NewConnectionTypesService(s)
148 s.ContentCategories = NewContentCategoriesService(s)
149 s.Conversions = NewConversionsService(s)
150 s.Countries = NewCountriesService(s)
151 s.CreativeAssets = NewCreativeAssetsService(s)
152 s.CreativeFieldValues = NewCreativeFieldValuesService(s)
153 s.CreativeFields = NewCreativeFieldsService(s)
154 s.CreativeGroups = NewCreativeGroupsService(s)
155 s.Creatives = NewCreativesService(s)
156 s.DimensionValues = NewDimensionValuesService(s)
157 s.DirectorySites = NewDirectorySitesService(s)
158 s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
159 s.EventTags = NewEventTagsService(s)
160 s.Files = NewFilesService(s)
161 s.FloodlightActivities = NewFloodlightActivitiesService(s)
162 s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
163 s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
164 s.InventoryItems = NewInventoryItemsService(s)
165 s.Languages = NewLanguagesService(s)
166 s.Metros = NewMetrosService(s)
167 s.MobileApps = NewMobileAppsService(s)
168 s.MobileCarriers = NewMobileCarriersService(s)
169 s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
170 s.OperatingSystems = NewOperatingSystemsService(s)
171 s.OrderDocuments = NewOrderDocumentsService(s)
172 s.Orders = NewOrdersService(s)
173 s.PlacementGroups = NewPlacementGroupsService(s)
174 s.PlacementStrategies = NewPlacementStrategiesService(s)
175 s.Placements = NewPlacementsService(s)
176 s.PlatformTypes = NewPlatformTypesService(s)
177 s.PostalCodes = NewPostalCodesService(s)
178 s.Projects = NewProjectsService(s)
179 s.Regions = NewRegionsService(s)
180 s.RemarketingListShares = NewRemarketingListSharesService(s)
181 s.RemarketingLists = NewRemarketingListsService(s)
182 s.Reports = NewReportsService(s)
183 s.Sites = NewSitesService(s)
184 s.Sizes = NewSizesService(s)
185 s.Subaccounts = NewSubaccountsService(s)
186 s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
187 s.TargetingTemplates = NewTargetingTemplatesService(s)
188 s.UserProfiles = NewUserProfilesService(s)
189 s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
190 s.UserRolePermissions = NewUserRolePermissionsService(s)
191 s.UserRoles = NewUserRolesService(s)
192 s.VideoFormats = NewVideoFormatsService(s)
193 return s, nil
194 }
195
196 type Service struct {
197 client *http.Client
198 BasePath string
199 UserAgent string
200
201 AccountActiveAdSummaries *AccountActiveAdSummariesService
202
203 AccountPermissionGroups *AccountPermissionGroupsService
204
205 AccountPermissions *AccountPermissionsService
206
207 AccountUserProfiles *AccountUserProfilesService
208
209 Accounts *AccountsService
210
211 Ads *AdsService
212
213 AdvertiserGroups *AdvertiserGroupsService
214
215 AdvertiserLandingPages *AdvertiserLandingPagesService
216
217 Advertisers *AdvertisersService
218
219 Browsers *BrowsersService
220
221 CampaignCreativeAssociations *CampaignCreativeAssociationsService
222
223 Campaigns *CampaignsService
224
225 ChangeLogs *ChangeLogsService
226
227 Cities *CitiesService
228
229 ConnectionTypes *ConnectionTypesService
230
231 ContentCategories *ContentCategoriesService
232
233 Conversions *ConversionsService
234
235 Countries *CountriesService
236
237 CreativeAssets *CreativeAssetsService
238
239 CreativeFieldValues *CreativeFieldValuesService
240
241 CreativeFields *CreativeFieldsService
242
243 CreativeGroups *CreativeGroupsService
244
245 Creatives *CreativesService
246
247 DimensionValues *DimensionValuesService
248
249 DirectorySites *DirectorySitesService
250
251 DynamicTargetingKeys *DynamicTargetingKeysService
252
253 EventTags *EventTagsService
254
255 Files *FilesService
256
257 FloodlightActivities *FloodlightActivitiesService
258
259 FloodlightActivityGroups *FloodlightActivityGroupsService
260
261 FloodlightConfigurations *FloodlightConfigurationsService
262
263 InventoryItems *InventoryItemsService
264
265 Languages *LanguagesService
266
267 Metros *MetrosService
268
269 MobileApps *MobileAppsService
270
271 MobileCarriers *MobileCarriersService
272
273 OperatingSystemVersions *OperatingSystemVersionsService
274
275 OperatingSystems *OperatingSystemsService
276
277 OrderDocuments *OrderDocumentsService
278
279 Orders *OrdersService
280
281 PlacementGroups *PlacementGroupsService
282
283 PlacementStrategies *PlacementStrategiesService
284
285 Placements *PlacementsService
286
287 PlatformTypes *PlatformTypesService
288
289 PostalCodes *PostalCodesService
290
291 Projects *ProjectsService
292
293 Regions *RegionsService
294
295 RemarketingListShares *RemarketingListSharesService
296
297 RemarketingLists *RemarketingListsService
298
299 Reports *ReportsService
300
301 Sites *SitesService
302
303 Sizes *SizesService
304
305 Subaccounts *SubaccountsService
306
307 TargetableRemarketingLists *TargetableRemarketingListsService
308
309 TargetingTemplates *TargetingTemplatesService
310
311 UserProfiles *UserProfilesService
312
313 UserRolePermissionGroups *UserRolePermissionGroupsService
314
315 UserRolePermissions *UserRolePermissionsService
316
317 UserRoles *UserRolesService
318
319 VideoFormats *VideoFormatsService
320 }
321
322 func (s *Service) userAgent() string {
323 if s.UserAgent == "" {
324 return googleapi.UserAgent
325 }
326 return googleapi.UserAgent + " " + s.UserAgent
327 }
328
329 func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
330 rs := &AccountActiveAdSummariesService{s: s}
331 return rs
332 }
333
334 type AccountActiveAdSummariesService struct {
335 s *Service
336 }
337
338 func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
339 rs := &AccountPermissionGroupsService{s: s}
340 return rs
341 }
342
343 type AccountPermissionGroupsService struct {
344 s *Service
345 }
346
347 func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
348 rs := &AccountPermissionsService{s: s}
349 return rs
350 }
351
352 type AccountPermissionsService struct {
353 s *Service
354 }
355
356 func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
357 rs := &AccountUserProfilesService{s: s}
358 return rs
359 }
360
361 type AccountUserProfilesService struct {
362 s *Service
363 }
364
365 func NewAccountsService(s *Service) *AccountsService {
366 rs := &AccountsService{s: s}
367 return rs
368 }
369
370 type AccountsService struct {
371 s *Service
372 }
373
374 func NewAdsService(s *Service) *AdsService {
375 rs := &AdsService{s: s}
376 return rs
377 }
378
379 type AdsService struct {
380 s *Service
381 }
382
383 func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
384 rs := &AdvertiserGroupsService{s: s}
385 return rs
386 }
387
388 type AdvertiserGroupsService struct {
389 s *Service
390 }
391
392 func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
393 rs := &AdvertiserLandingPagesService{s: s}
394 return rs
395 }
396
397 type AdvertiserLandingPagesService struct {
398 s *Service
399 }
400
401 func NewAdvertisersService(s *Service) *AdvertisersService {
402 rs := &AdvertisersService{s: s}
403 return rs
404 }
405
406 type AdvertisersService struct {
407 s *Service
408 }
409
410 func NewBrowsersService(s *Service) *BrowsersService {
411 rs := &BrowsersService{s: s}
412 return rs
413 }
414
415 type BrowsersService struct {
416 s *Service
417 }
418
419 func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
420 rs := &CampaignCreativeAssociationsService{s: s}
421 return rs
422 }
423
424 type CampaignCreativeAssociationsService struct {
425 s *Service
426 }
427
428 func NewCampaignsService(s *Service) *CampaignsService {
429 rs := &CampaignsService{s: s}
430 return rs
431 }
432
433 type CampaignsService struct {
434 s *Service
435 }
436
437 func NewChangeLogsService(s *Service) *ChangeLogsService {
438 rs := &ChangeLogsService{s: s}
439 return rs
440 }
441
442 type ChangeLogsService struct {
443 s *Service
444 }
445
446 func NewCitiesService(s *Service) *CitiesService {
447 rs := &CitiesService{s: s}
448 return rs
449 }
450
451 type CitiesService struct {
452 s *Service
453 }
454
455 func NewConnectionTypesService(s *Service) *ConnectionTypesService {
456 rs := &ConnectionTypesService{s: s}
457 return rs
458 }
459
460 type ConnectionTypesService struct {
461 s *Service
462 }
463
464 func NewContentCategoriesService(s *Service) *ContentCategoriesService {
465 rs := &ContentCategoriesService{s: s}
466 return rs
467 }
468
469 type ContentCategoriesService struct {
470 s *Service
471 }
472
473 func NewConversionsService(s *Service) *ConversionsService {
474 rs := &ConversionsService{s: s}
475 return rs
476 }
477
478 type ConversionsService struct {
479 s *Service
480 }
481
482 func NewCountriesService(s *Service) *CountriesService {
483 rs := &CountriesService{s: s}
484 return rs
485 }
486
487 type CountriesService struct {
488 s *Service
489 }
490
491 func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
492 rs := &CreativeAssetsService{s: s}
493 return rs
494 }
495
496 type CreativeAssetsService struct {
497 s *Service
498 }
499
500 func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
501 rs := &CreativeFieldValuesService{s: s}
502 return rs
503 }
504
505 type CreativeFieldValuesService struct {
506 s *Service
507 }
508
509 func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
510 rs := &CreativeFieldsService{s: s}
511 return rs
512 }
513
514 type CreativeFieldsService struct {
515 s *Service
516 }
517
518 func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
519 rs := &CreativeGroupsService{s: s}
520 return rs
521 }
522
523 type CreativeGroupsService struct {
524 s *Service
525 }
526
527 func NewCreativesService(s *Service) *CreativesService {
528 rs := &CreativesService{s: s}
529 return rs
530 }
531
532 type CreativesService struct {
533 s *Service
534 }
535
536 func NewDimensionValuesService(s *Service) *DimensionValuesService {
537 rs := &DimensionValuesService{s: s}
538 return rs
539 }
540
541 type DimensionValuesService struct {
542 s *Service
543 }
544
545 func NewDirectorySitesService(s *Service) *DirectorySitesService {
546 rs := &DirectorySitesService{s: s}
547 return rs
548 }
549
550 type DirectorySitesService struct {
551 s *Service
552 }
553
554 func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
555 rs := &DynamicTargetingKeysService{s: s}
556 return rs
557 }
558
559 type DynamicTargetingKeysService struct {
560 s *Service
561 }
562
563 func NewEventTagsService(s *Service) *EventTagsService {
564 rs := &EventTagsService{s: s}
565 return rs
566 }
567
568 type EventTagsService struct {
569 s *Service
570 }
571
572 func NewFilesService(s *Service) *FilesService {
573 rs := &FilesService{s: s}
574 return rs
575 }
576
577 type FilesService struct {
578 s *Service
579 }
580
581 func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
582 rs := &FloodlightActivitiesService{s: s}
583 return rs
584 }
585
586 type FloodlightActivitiesService struct {
587 s *Service
588 }
589
590 func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
591 rs := &FloodlightActivityGroupsService{s: s}
592 return rs
593 }
594
595 type FloodlightActivityGroupsService struct {
596 s *Service
597 }
598
599 func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
600 rs := &FloodlightConfigurationsService{s: s}
601 return rs
602 }
603
604 type FloodlightConfigurationsService struct {
605 s *Service
606 }
607
608 func NewInventoryItemsService(s *Service) *InventoryItemsService {
609 rs := &InventoryItemsService{s: s}
610 return rs
611 }
612
613 type InventoryItemsService struct {
614 s *Service
615 }
616
617 func NewLanguagesService(s *Service) *LanguagesService {
618 rs := &LanguagesService{s: s}
619 return rs
620 }
621
622 type LanguagesService struct {
623 s *Service
624 }
625
626 func NewMetrosService(s *Service) *MetrosService {
627 rs := &MetrosService{s: s}
628 return rs
629 }
630
631 type MetrosService struct {
632 s *Service
633 }
634
635 func NewMobileAppsService(s *Service) *MobileAppsService {
636 rs := &MobileAppsService{s: s}
637 return rs
638 }
639
640 type MobileAppsService struct {
641 s *Service
642 }
643
644 func NewMobileCarriersService(s *Service) *MobileCarriersService {
645 rs := &MobileCarriersService{s: s}
646 return rs
647 }
648
649 type MobileCarriersService struct {
650 s *Service
651 }
652
653 func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
654 rs := &OperatingSystemVersionsService{s: s}
655 return rs
656 }
657
658 type OperatingSystemVersionsService struct {
659 s *Service
660 }
661
662 func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
663 rs := &OperatingSystemsService{s: s}
664 return rs
665 }
666
667 type OperatingSystemsService struct {
668 s *Service
669 }
670
671 func NewOrderDocumentsService(s *Service) *OrderDocumentsService {
672 rs := &OrderDocumentsService{s: s}
673 return rs
674 }
675
676 type OrderDocumentsService struct {
677 s *Service
678 }
679
680 func NewOrdersService(s *Service) *OrdersService {
681 rs := &OrdersService{s: s}
682 return rs
683 }
684
685 type OrdersService struct {
686 s *Service
687 }
688
689 func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
690 rs := &PlacementGroupsService{s: s}
691 return rs
692 }
693
694 type PlacementGroupsService struct {
695 s *Service
696 }
697
698 func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
699 rs := &PlacementStrategiesService{s: s}
700 return rs
701 }
702
703 type PlacementStrategiesService struct {
704 s *Service
705 }
706
707 func NewPlacementsService(s *Service) *PlacementsService {
708 rs := &PlacementsService{s: s}
709 return rs
710 }
711
712 type PlacementsService struct {
713 s *Service
714 }
715
716 func NewPlatformTypesService(s *Service) *PlatformTypesService {
717 rs := &PlatformTypesService{s: s}
718 return rs
719 }
720
721 type PlatformTypesService struct {
722 s *Service
723 }
724
725 func NewPostalCodesService(s *Service) *PostalCodesService {
726 rs := &PostalCodesService{s: s}
727 return rs
728 }
729
730 type PostalCodesService struct {
731 s *Service
732 }
733
734 func NewProjectsService(s *Service) *ProjectsService {
735 rs := &ProjectsService{s: s}
736 return rs
737 }
738
739 type ProjectsService struct {
740 s *Service
741 }
742
743 func NewRegionsService(s *Service) *RegionsService {
744 rs := &RegionsService{s: s}
745 return rs
746 }
747
748 type RegionsService struct {
749 s *Service
750 }
751
752 func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
753 rs := &RemarketingListSharesService{s: s}
754 return rs
755 }
756
757 type RemarketingListSharesService struct {
758 s *Service
759 }
760
761 func NewRemarketingListsService(s *Service) *RemarketingListsService {
762 rs := &RemarketingListsService{s: s}
763 return rs
764 }
765
766 type RemarketingListsService struct {
767 s *Service
768 }
769
770 func NewReportsService(s *Service) *ReportsService {
771 rs := &ReportsService{s: s}
772 rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
773 rs.Files = NewReportsFilesService(s)
774 return rs
775 }
776
777 type ReportsService struct {
778 s *Service
779
780 CompatibleFields *ReportsCompatibleFieldsService
781
782 Files *ReportsFilesService
783 }
784
785 func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
786 rs := &ReportsCompatibleFieldsService{s: s}
787 return rs
788 }
789
790 type ReportsCompatibleFieldsService struct {
791 s *Service
792 }
793
794 func NewReportsFilesService(s *Service) *ReportsFilesService {
795 rs := &ReportsFilesService{s: s}
796 return rs
797 }
798
799 type ReportsFilesService struct {
800 s *Service
801 }
802
803 func NewSitesService(s *Service) *SitesService {
804 rs := &SitesService{s: s}
805 return rs
806 }
807
808 type SitesService struct {
809 s *Service
810 }
811
812 func NewSizesService(s *Service) *SizesService {
813 rs := &SizesService{s: s}
814 return rs
815 }
816
817 type SizesService struct {
818 s *Service
819 }
820
821 func NewSubaccountsService(s *Service) *SubaccountsService {
822 rs := &SubaccountsService{s: s}
823 return rs
824 }
825
826 type SubaccountsService struct {
827 s *Service
828 }
829
830 func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
831 rs := &TargetableRemarketingListsService{s: s}
832 return rs
833 }
834
835 type TargetableRemarketingListsService struct {
836 s *Service
837 }
838
839 func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
840 rs := &TargetingTemplatesService{s: s}
841 return rs
842 }
843
844 type TargetingTemplatesService struct {
845 s *Service
846 }
847
848 func NewUserProfilesService(s *Service) *UserProfilesService {
849 rs := &UserProfilesService{s: s}
850 return rs
851 }
852
853 type UserProfilesService struct {
854 s *Service
855 }
856
857 func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
858 rs := &UserRolePermissionGroupsService{s: s}
859 return rs
860 }
861
862 type UserRolePermissionGroupsService struct {
863 s *Service
864 }
865
866 func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
867 rs := &UserRolePermissionsService{s: s}
868 return rs
869 }
870
871 type UserRolePermissionsService struct {
872 s *Service
873 }
874
875 func NewUserRolesService(s *Service) *UserRolesService {
876 rs := &UserRolesService{s: s}
877 return rs
878 }
879
880 type UserRolesService struct {
881 s *Service
882 }
883
884 func NewVideoFormatsService(s *Service) *VideoFormatsService {
885 rs := &VideoFormatsService{s: s}
886 return rs
887 }
888
889 type VideoFormatsService struct {
890 s *Service
891 }
892
893
894 type Account struct {
895
896 AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
897
898
899
900
901
902
903
904 AccountProfile string `json:"accountProfile,omitempty"`
905
906
907 Active bool `json:"active,omitempty"`
908
909
910
911
912
913
914
915
916
917
918
919
920
921 ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
922
923
924
925
926 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
927
928
929
930 AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
931
932
933 CountryId int64 `json:"countryId,omitempty,string"`
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948 CurrencyId int64 `json:"currencyId,omitempty,string"`
949
950
951 DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
952
953
954 Description string `json:"description,omitempty"`
955
956
957 Id int64 `json:"id,omitempty,string"`
958
959
960
961 Kind string `json:"kind,omitempty"`
962
963
964
965
966
967
968
969 Locale string `json:"locale,omitempty"`
970
971
972
973 MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
974
975
976
977 Name string `json:"name,omitempty"`
978
979
980
981 NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
982
983
984 ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
985
986
987
988 ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
989
990
991
992 TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
993
994
995
996 googleapi.ServerResponse `json:"-"`
997
998
999
1000
1001
1002
1003
1004
1005 ForceSendFields []string `json:"-"`
1006
1007
1008
1009
1010
1011
1012
1013
1014 NullFields []string `json:"-"`
1015 }
1016
1017 func (s *Account) MarshalJSON() ([]byte, error) {
1018 type NoMethod Account
1019 raw := NoMethod(*s)
1020 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1021 }
1022
1023
1024 type AccountActiveAdSummary struct {
1025
1026 AccountId int64 `json:"accountId,omitempty,string"`
1027
1028
1029 ActiveAds int64 `json:"activeAds,omitempty,string"`
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043 ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1044
1045
1046 AvailableAds int64 `json:"availableAds,omitempty,string"`
1047
1048
1049
1050 Kind string `json:"kind,omitempty"`
1051
1052
1053
1054 googleapi.ServerResponse `json:"-"`
1055
1056
1057
1058
1059
1060
1061
1062 ForceSendFields []string `json:"-"`
1063
1064
1065
1066
1067
1068
1069
1070 NullFields []string `json:"-"`
1071 }
1072
1073 func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1074 type NoMethod AccountActiveAdSummary
1075 raw := NoMethod(*s)
1076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1077 }
1078
1079
1080
1081
1082 type AccountPermission struct {
1083
1084
1085
1086
1087
1088
1089
1090 AccountProfiles []string `json:"accountProfiles,omitempty"`
1091
1092
1093 Id int64 `json:"id,omitempty,string"`
1094
1095
1096
1097 Kind string `json:"kind,omitempty"`
1098
1099
1100
1101
1102
1103
1104
1105 Level string `json:"level,omitempty"`
1106
1107
1108 Name string `json:"name,omitempty"`
1109
1110
1111 PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1112
1113
1114
1115 googleapi.ServerResponse `json:"-"`
1116
1117
1118
1119
1120
1121
1122
1123 ForceSendFields []string `json:"-"`
1124
1125
1126
1127
1128
1129
1130
1131
1132 NullFields []string `json:"-"`
1133 }
1134
1135 func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1136 type NoMethod AccountPermission
1137 raw := NoMethod(*s)
1138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1139 }
1140
1141
1142
1143
1144 type AccountPermissionGroup struct {
1145
1146 Id int64 `json:"id,omitempty,string"`
1147
1148
1149
1150 Kind string `json:"kind,omitempty"`
1151
1152
1153 Name string `json:"name,omitempty"`
1154
1155
1156
1157 googleapi.ServerResponse `json:"-"`
1158
1159
1160
1161
1162
1163
1164
1165 ForceSendFields []string `json:"-"`
1166
1167
1168
1169
1170
1171
1172
1173 NullFields []string `json:"-"`
1174 }
1175
1176 func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1177 type NoMethod AccountPermissionGroup
1178 raw := NoMethod(*s)
1179 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1180 }
1181
1182
1183
1184 type AccountPermissionGroupsListResponse struct {
1185
1186 AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1187
1188
1189
1190 Kind string `json:"kind,omitempty"`
1191
1192
1193
1194 googleapi.ServerResponse `json:"-"`
1195
1196
1197
1198
1199
1200
1201
1202
1203 ForceSendFields []string `json:"-"`
1204
1205
1206
1207
1208
1209
1210
1211
1212 NullFields []string `json:"-"`
1213 }
1214
1215 func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1216 type NoMethod AccountPermissionGroupsListResponse
1217 raw := NoMethod(*s)
1218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1219 }
1220
1221
1222 type AccountPermissionsListResponse struct {
1223
1224 AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1225
1226
1227
1228 Kind string `json:"kind,omitempty"`
1229
1230
1231
1232 googleapi.ServerResponse `json:"-"`
1233
1234
1235
1236
1237
1238
1239
1240 ForceSendFields []string `json:"-"`
1241
1242
1243
1244
1245
1246
1247
1248
1249 NullFields []string `json:"-"`
1250 }
1251
1252 func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1253 type NoMethod AccountPermissionsListResponse
1254 raw := NoMethod(*s)
1255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1256 }
1257
1258
1259
1260
1261
1262 type AccountUserProfile struct {
1263
1264
1265 AccountId int64 `json:"accountId,omitempty,string"`
1266
1267
1268
1269 Active bool `json:"active,omitempty"`
1270
1271
1272
1273 AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1274
1275
1276
1277 CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1278
1279
1280 Comments string `json:"comments,omitempty"`
1281
1282
1283
1284
1285 Email string `json:"email,omitempty"`
1286
1287
1288
1289 Id int64 `json:"id,omitempty,string"`
1290
1291
1292
1293 Kind string `json:"kind,omitempty"`
1294
1295
1296
1297
1298
1299
1300
1301
1302 Locale string `json:"locale,omitempty"`
1303
1304
1305
1306
1307 Name string `json:"name,omitempty"`
1308
1309
1310
1311 SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1312
1313
1314
1315 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1316
1317
1318
1319
1320
1321
1322
1323
1324 TraffickerType string `json:"traffickerType,omitempty"`
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334 UserAccessType string `json:"userAccessType,omitempty"`
1335
1336
1337
1338 UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1339
1340
1341
1342 UserRoleId int64 `json:"userRoleId,omitempty,string"`
1343
1344
1345
1346 googleapi.ServerResponse `json:"-"`
1347
1348
1349
1350
1351
1352
1353
1354 ForceSendFields []string `json:"-"`
1355
1356
1357
1358
1359
1360
1361
1362 NullFields []string `json:"-"`
1363 }
1364
1365 func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1366 type NoMethod AccountUserProfile
1367 raw := NoMethod(*s)
1368 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1369 }
1370
1371
1372 type AccountUserProfilesListResponse struct {
1373
1374 AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1375
1376
1377
1378 Kind string `json:"kind,omitempty"`
1379
1380
1381
1382 NextPageToken string `json:"nextPageToken,omitempty"`
1383
1384
1385
1386 googleapi.ServerResponse `json:"-"`
1387
1388
1389
1390
1391
1392
1393
1394 ForceSendFields []string `json:"-"`
1395
1396
1397
1398
1399
1400
1401
1402
1403 NullFields []string `json:"-"`
1404 }
1405
1406 func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1407 type NoMethod AccountUserProfilesListResponse
1408 raw := NoMethod(*s)
1409 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1410 }
1411
1412
1413 type AccountsListResponse struct {
1414
1415 Accounts []*Account `json:"accounts,omitempty"`
1416
1417
1418
1419 Kind string `json:"kind,omitempty"`
1420
1421
1422
1423 NextPageToken string `json:"nextPageToken,omitempty"`
1424
1425
1426
1427 googleapi.ServerResponse `json:"-"`
1428
1429
1430
1431
1432
1433
1434
1435 ForceSendFields []string `json:"-"`
1436
1437
1438
1439
1440
1441
1442
1443 NullFields []string `json:"-"`
1444 }
1445
1446 func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1447 type NoMethod AccountsListResponse
1448 raw := NoMethod(*s)
1449 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1450 }
1451
1452
1453 type Activities struct {
1454
1455
1456 Filters []*DimensionValue `json:"filters,omitempty"`
1457
1458
1459
1460 Kind string `json:"kind,omitempty"`
1461
1462
1463 MetricNames []string `json:"metricNames,omitempty"`
1464
1465
1466
1467
1468
1469
1470
1471 ForceSendFields []string `json:"-"`
1472
1473
1474
1475
1476
1477
1478
1479 NullFields []string `json:"-"`
1480 }
1481
1482 func (s *Activities) MarshalJSON() ([]byte, error) {
1483 type NoMethod Activities
1484 raw := NoMethod(*s)
1485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1486 }
1487
1488
1489 type Ad struct {
1490
1491
1492 AccountId int64 `json:"accountId,omitempty,string"`
1493
1494
1495 Active bool `json:"active,omitempty"`
1496
1497
1498
1499 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1500
1501
1502
1503 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1504
1505
1506
1507 Archived bool `json:"archived,omitempty"`
1508
1509
1510
1511 AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1512
1513
1514
1515 CampaignId int64 `json:"campaignId,omitempty,string"`
1516
1517
1518
1519 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1520
1521
1522
1523 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1524
1525
1526
1527
1528 ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1529
1530
1531 Comments string `json:"comments,omitempty"`
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550 Compatibility string `json:"compatibility,omitempty"`
1551
1552
1553
1554 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1555
1556
1557
1558
1559
1560 CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1561
1562
1563
1564
1565
1566 CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1567
1568
1569
1570
1571 DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1572
1573
1574
1575 DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1576
1577
1578
1579
1580
1581
1582 DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1583
1584
1585
1586
1587 DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1588
1589 EndTime string `json:"endTime,omitempty"`
1590
1591
1592 EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1593
1594
1595
1596
1597 GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1598
1599
1600 Id int64 `json:"id,omitempty,string"`
1601
1602
1603
1604 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1605
1606
1607
1608
1609 KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1610
1611
1612
1613 Kind string `json:"kind,omitempty"`
1614
1615
1616
1617
1618 LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1619
1620
1621
1622 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1623
1624
1625
1626 Name string `json:"name,omitempty"`
1627
1628
1629 PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1630
1631
1632
1633
1634 RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1635
1636
1637 Size *Size `json:"size,omitempty"`
1638
1639
1640
1641 SslCompliant bool `json:"sslCompliant,omitempty"`
1642
1643
1644
1645 SslRequired bool `json:"sslRequired,omitempty"`
1646
1647 StartTime string `json:"startTime,omitempty"`
1648
1649
1650
1651 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1652
1653
1654
1655
1656
1657
1658
1659 TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1660
1661
1662
1663
1664 TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676 Type string `json:"type,omitempty"`
1677
1678
1679
1680 googleapi.ServerResponse `json:"-"`
1681
1682
1683
1684
1685
1686
1687
1688 ForceSendFields []string `json:"-"`
1689
1690
1691
1692
1693
1694
1695
1696 NullFields []string `json:"-"`
1697 }
1698
1699 func (s *Ad) MarshalJSON() ([]byte, error) {
1700 type NoMethod Ad
1701 raw := NoMethod(*s)
1702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1703 }
1704
1705
1706 type AdBlockingConfiguration struct {
1707
1708
1709 ClickThroughUrl string `json:"clickThroughUrl,omitempty"`
1710
1711
1712
1713
1714 CreativeBundleId int64 `json:"creativeBundleId,omitempty,string"`
1715
1716
1717
1718
1719
1720
1721 Enabled bool `json:"enabled,omitempty"`
1722
1723
1724
1725
1726
1727 OverrideClickThroughUrl bool `json:"overrideClickThroughUrl,omitempty"`
1728
1729
1730
1731
1732
1733
1734
1735 ForceSendFields []string `json:"-"`
1736
1737
1738
1739
1740
1741
1742
1743
1744 NullFields []string `json:"-"`
1745 }
1746
1747 func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1748 type NoMethod AdBlockingConfiguration
1749 raw := NoMethod(*s)
1750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1751 }
1752
1753
1754 type AdSlot struct {
1755
1756 Comment string `json:"comment,omitempty"`
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772 Compatibility string `json:"compatibility,omitempty"`
1773
1774
1775 Height int64 `json:"height,omitempty,string"`
1776
1777
1778
1779 LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1780
1781
1782 Name string `json:"name,omitempty"`
1783
1784
1785
1786
1787
1788
1789 PaymentSourceType string `json:"paymentSourceType,omitempty"`
1790
1791
1792 Primary bool `json:"primary,omitempty"`
1793
1794
1795 Width int64 `json:"width,omitempty,string"`
1796
1797
1798
1799
1800
1801
1802
1803 ForceSendFields []string `json:"-"`
1804
1805
1806
1807
1808
1809
1810
1811 NullFields []string `json:"-"`
1812 }
1813
1814 func (s *AdSlot) MarshalJSON() ([]byte, error) {
1815 type NoMethod AdSlot
1816 raw := NoMethod(*s)
1817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1818 }
1819
1820
1821 type AdsListResponse struct {
1822
1823 Ads []*Ad `json:"ads,omitempty"`
1824
1825
1826
1827 Kind string `json:"kind,omitempty"`
1828
1829
1830
1831 NextPageToken string `json:"nextPageToken,omitempty"`
1832
1833
1834
1835 googleapi.ServerResponse `json:"-"`
1836
1837
1838
1839
1840
1841
1842
1843 ForceSendFields []string `json:"-"`
1844
1845
1846
1847
1848
1849
1850
1851 NullFields []string `json:"-"`
1852 }
1853
1854 func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1855 type NoMethod AdsListResponse
1856 raw := NoMethod(*s)
1857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1858 }
1859
1860
1861 type Advertiser struct {
1862
1863
1864 AccountId int64 `json:"accountId,omitempty,string"`
1865
1866
1867
1868
1869 AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1870
1871
1872
1873
1874 ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1875
1876
1877
1878 DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1879
1880
1881
1882 DefaultEmail string `json:"defaultEmail,omitempty"`
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1894
1895
1896
1897
1898 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1899
1900
1901 Id int64 `json:"id,omitempty,string"`
1902
1903
1904
1905 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1906
1907
1908
1909 Kind string `json:"kind,omitempty"`
1910
1911
1912
1913
1914 Name string `json:"name,omitempty"`
1915
1916
1917
1918
1919
1920
1921
1922 OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1923
1924
1925
1926
1927
1928
1929 Status string `json:"status,omitempty"`
1930
1931
1932
1933 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1934
1935
1936 Suspended bool `json:"suspended,omitempty"`
1937
1938
1939
1940 googleapi.ServerResponse `json:"-"`
1941
1942
1943
1944
1945
1946
1947
1948 ForceSendFields []string `json:"-"`
1949
1950
1951
1952
1953
1954
1955
1956 NullFields []string `json:"-"`
1957 }
1958
1959 func (s *Advertiser) MarshalJSON() ([]byte, error) {
1960 type NoMethod Advertiser
1961 raw := NoMethod(*s)
1962 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1963 }
1964
1965
1966
1967 type AdvertiserGroup struct {
1968
1969
1970 AccountId int64 `json:"accountId,omitempty,string"`
1971
1972
1973
1974 Id int64 `json:"id,omitempty,string"`
1975
1976
1977
1978 Kind string `json:"kind,omitempty"`
1979
1980
1981
1982
1983 Name string `json:"name,omitempty"`
1984
1985
1986
1987 googleapi.ServerResponse `json:"-"`
1988
1989
1990
1991
1992
1993
1994
1995 ForceSendFields []string `json:"-"`
1996
1997
1998
1999
2000
2001
2002
2003 NullFields []string `json:"-"`
2004 }
2005
2006 func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
2007 type NoMethod AdvertiserGroup
2008 raw := NoMethod(*s)
2009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2010 }
2011
2012
2013 type AdvertiserGroupsListResponse struct {
2014
2015 AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
2016
2017
2018
2019 Kind string `json:"kind,omitempty"`
2020
2021
2022
2023 NextPageToken string `json:"nextPageToken,omitempty"`
2024
2025
2026
2027 googleapi.ServerResponse `json:"-"`
2028
2029
2030
2031
2032
2033
2034
2035 ForceSendFields []string `json:"-"`
2036
2037
2038
2039
2040
2041
2042
2043
2044 NullFields []string `json:"-"`
2045 }
2046
2047 func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
2048 type NoMethod AdvertiserGroupsListResponse
2049 raw := NoMethod(*s)
2050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2051 }
2052
2053
2054 type AdvertiserLandingPagesListResponse struct {
2055
2056
2057 Kind string `json:"kind,omitempty"`
2058
2059
2060 LandingPages []*LandingPage `json:"landingPages,omitempty"`
2061
2062
2063
2064 NextPageToken string `json:"nextPageToken,omitempty"`
2065
2066
2067
2068 googleapi.ServerResponse `json:"-"`
2069
2070
2071
2072
2073
2074
2075
2076 ForceSendFields []string `json:"-"`
2077
2078
2079
2080
2081
2082
2083
2084 NullFields []string `json:"-"`
2085 }
2086
2087 func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
2088 type NoMethod AdvertiserLandingPagesListResponse
2089 raw := NoMethod(*s)
2090 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2091 }
2092
2093
2094 type AdvertisersListResponse struct {
2095
2096 Advertisers []*Advertiser `json:"advertisers,omitempty"`
2097
2098
2099
2100 Kind string `json:"kind,omitempty"`
2101
2102
2103
2104 NextPageToken string `json:"nextPageToken,omitempty"`
2105
2106
2107
2108 googleapi.ServerResponse `json:"-"`
2109
2110
2111
2112
2113
2114
2115
2116 ForceSendFields []string `json:"-"`
2117
2118
2119
2120
2121
2122
2123
2124 NullFields []string `json:"-"`
2125 }
2126
2127 func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
2128 type NoMethod AdvertisersListResponse
2129 raw := NoMethod(*s)
2130 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2131 }
2132
2133
2134 type AudienceSegment struct {
2135
2136
2137
2138
2139 Allocation int64 `json:"allocation,omitempty"`
2140
2141
2142
2143 Id int64 `json:"id,omitempty,string"`
2144
2145
2146
2147 Name string `json:"name,omitempty"`
2148
2149
2150
2151
2152
2153
2154
2155 ForceSendFields []string `json:"-"`
2156
2157
2158
2159
2160
2161
2162
2163 NullFields []string `json:"-"`
2164 }
2165
2166 func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
2167 type NoMethod AudienceSegment
2168 raw := NoMethod(*s)
2169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2170 }
2171
2172
2173 type AudienceSegmentGroup struct {
2174
2175
2176 AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
2177
2178
2179
2180 Id int64 `json:"id,omitempty,string"`
2181
2182
2183
2184 Name string `json:"name,omitempty"`
2185
2186
2187
2188
2189
2190
2191
2192 ForceSendFields []string `json:"-"`
2193
2194
2195
2196
2197
2198
2199
2200
2201 NullFields []string `json:"-"`
2202 }
2203
2204 func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
2205 type NoMethod AudienceSegmentGroup
2206 raw := NoMethod(*s)
2207 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2208 }
2209
2210
2211
2212 type Browser struct {
2213
2214
2215 BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2216
2217
2218
2219 DartId int64 `json:"dartId,omitempty,string"`
2220
2221
2222
2223 Kind string `json:"kind,omitempty"`
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234 MajorVersion string `json:"majorVersion,omitempty"`
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245 MinorVersion string `json:"minorVersion,omitempty"`
2246
2247
2248 Name string `json:"name,omitempty"`
2249
2250
2251
2252
2253
2254
2255
2256 ForceSendFields []string `json:"-"`
2257
2258
2259
2260
2261
2262
2263
2264
2265 NullFields []string `json:"-"`
2266 }
2267
2268 func (s *Browser) MarshalJSON() ([]byte, error) {
2269 type NoMethod Browser
2270 raw := NoMethod(*s)
2271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2272 }
2273
2274
2275 type BrowsersListResponse struct {
2276
2277 Browsers []*Browser `json:"browsers,omitempty"`
2278
2279
2280
2281 Kind string `json:"kind,omitempty"`
2282
2283
2284
2285 googleapi.ServerResponse `json:"-"`
2286
2287
2288
2289
2290
2291
2292
2293 ForceSendFields []string `json:"-"`
2294
2295
2296
2297
2298
2299
2300
2301 NullFields []string `json:"-"`
2302 }
2303
2304 func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2305 type NoMethod BrowsersListResponse
2306 raw := NoMethod(*s)
2307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2308 }
2309
2310
2311 type Campaign struct {
2312
2313
2314 AccountId int64 `json:"accountId,omitempty,string"`
2315
2316
2317 AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2318
2319
2320
2321 AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2322
2323
2324 AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2325
2326
2327
2328 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2329
2330
2331
2332 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2333
2334
2335 Archived bool `json:"archived,omitempty"`
2336
2337
2338
2339 AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2340
2341
2342
2343 BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2344
2345
2346
2347 ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2348
2349
2350
2351 Comment string `json:"comment,omitempty"`
2352
2353
2354
2355 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2356
2357
2358
2359 CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2360
2361
2362
2363 CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2364
2365
2366
2367 DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2368
2369
2370 DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2371
2372 EndDate string `json:"endDate,omitempty"`
2373
2374
2375
2376 EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2377
2378
2379 ExternalId string `json:"externalId,omitempty"`
2380
2381
2382 Id int64 `json:"id,omitempty,string"`
2383
2384
2385
2386 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2387
2388
2389
2390 Kind string `json:"kind,omitempty"`
2391
2392
2393
2394 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2395
2396
2397
2398
2399 Name string `json:"name,omitempty"`
2400
2401
2402
2403 NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
2404
2405 StartDate string `json:"startDate,omitempty"`
2406
2407
2408
2409 SubaccountId int64 `json:"subaccountId,omitempty,string"`
2410
2411
2412 TraffickerEmails []string `json:"traffickerEmails,omitempty"`
2413
2414
2415
2416 googleapi.ServerResponse `json:"-"`
2417
2418
2419
2420
2421
2422
2423
2424 ForceSendFields []string `json:"-"`
2425
2426
2427
2428
2429
2430
2431
2432 NullFields []string `json:"-"`
2433 }
2434
2435 func (s *Campaign) MarshalJSON() ([]byte, error) {
2436 type NoMethod Campaign
2437 raw := NoMethod(*s)
2438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2439 }
2440
2441
2442
2443 type CampaignCreativeAssociation struct {
2444
2445
2446 CreativeId int64 `json:"creativeId,omitempty,string"`
2447
2448
2449
2450 Kind string `json:"kind,omitempty"`
2451
2452
2453
2454 googleapi.ServerResponse `json:"-"`
2455
2456
2457
2458
2459
2460
2461
2462 ForceSendFields []string `json:"-"`
2463
2464
2465
2466
2467
2468
2469
2470 NullFields []string `json:"-"`
2471 }
2472
2473 func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2474 type NoMethod CampaignCreativeAssociation
2475 raw := NoMethod(*s)
2476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2477 }
2478
2479
2480
2481 type CampaignCreativeAssociationsListResponse struct {
2482
2483
2484 CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2485
2486
2487
2488 Kind string `json:"kind,omitempty"`
2489
2490
2491
2492 NextPageToken string `json:"nextPageToken,omitempty"`
2493
2494
2495
2496 googleapi.ServerResponse `json:"-"`
2497
2498
2499
2500
2501
2502
2503
2504
2505 ForceSendFields []string `json:"-"`
2506
2507
2508
2509
2510
2511
2512
2513
2514 NullFields []string `json:"-"`
2515 }
2516
2517 func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2518 type NoMethod CampaignCreativeAssociationsListResponse
2519 raw := NoMethod(*s)
2520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2521 }
2522
2523
2524 type CampaignsListResponse struct {
2525
2526 Campaigns []*Campaign `json:"campaigns,omitempty"`
2527
2528
2529
2530 Kind string `json:"kind,omitempty"`
2531
2532
2533
2534 NextPageToken string `json:"nextPageToken,omitempty"`
2535
2536
2537
2538 googleapi.ServerResponse `json:"-"`
2539
2540
2541
2542
2543
2544
2545
2546 ForceSendFields []string `json:"-"`
2547
2548
2549
2550
2551
2552
2553
2554 NullFields []string `json:"-"`
2555 }
2556
2557 func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2558 type NoMethod CampaignsListResponse
2559 raw := NoMethod(*s)
2560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2561 }
2562
2563
2564 type ChangeLog struct {
2565
2566 AccountId int64 `json:"accountId,omitempty,string"`
2567
2568
2569 Action string `json:"action,omitempty"`
2570
2571 ChangeTime string `json:"changeTime,omitempty"`
2572
2573
2574 FieldName string `json:"fieldName,omitempty"`
2575
2576
2577 Id int64 `json:"id,omitempty,string"`
2578
2579
2580
2581 Kind string `json:"kind,omitempty"`
2582
2583
2584 NewValue string `json:"newValue,omitempty"`
2585
2586
2587
2588 ObjectId int64 `json:"objectId,omitempty,string"`
2589
2590
2591 ObjectType string `json:"objectType,omitempty"`
2592
2593
2594 OldValue string `json:"oldValue,omitempty"`
2595
2596
2597 SubaccountId int64 `json:"subaccountId,omitempty,string"`
2598
2599
2600
2601
2602 TransactionId int64 `json:"transactionId,omitempty,string"`
2603
2604
2605 UserProfileId int64 `json:"userProfileId,omitempty,string"`
2606
2607
2608
2609 UserProfileName string `json:"userProfileName,omitempty"`
2610
2611
2612
2613 googleapi.ServerResponse `json:"-"`
2614
2615
2616
2617
2618
2619
2620
2621 ForceSendFields []string `json:"-"`
2622
2623
2624
2625
2626
2627
2628
2629 NullFields []string `json:"-"`
2630 }
2631
2632 func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2633 type NoMethod ChangeLog
2634 raw := NoMethod(*s)
2635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2636 }
2637
2638
2639 type ChangeLogsListResponse struct {
2640
2641 ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2642
2643
2644
2645 Kind string `json:"kind,omitempty"`
2646
2647
2648
2649 NextPageToken string `json:"nextPageToken,omitempty"`
2650
2651
2652
2653 googleapi.ServerResponse `json:"-"`
2654
2655
2656
2657
2658
2659
2660
2661 ForceSendFields []string `json:"-"`
2662
2663
2664
2665
2666
2667
2668
2669 NullFields []string `json:"-"`
2670 }
2671
2672 func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2673 type NoMethod ChangeLogsListResponse
2674 raw := NoMethod(*s)
2675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2676 }
2677
2678
2679 type CitiesListResponse struct {
2680
2681 Cities []*City `json:"cities,omitempty"`
2682
2683
2684
2685 Kind string `json:"kind,omitempty"`
2686
2687
2688
2689 googleapi.ServerResponse `json:"-"`
2690
2691
2692
2693
2694
2695
2696
2697 ForceSendFields []string `json:"-"`
2698
2699
2700
2701
2702
2703
2704
2705 NullFields []string `json:"-"`
2706 }
2707
2708 func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2709 type NoMethod CitiesListResponse
2710 raw := NoMethod(*s)
2711 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2712 }
2713
2714
2715 type City struct {
2716
2717 CountryCode string `json:"countryCode,omitempty"`
2718
2719
2720 CountryDartId int64 `json:"countryDartId,omitempty,string"`
2721
2722
2723
2724 DartId int64 `json:"dartId,omitempty,string"`
2725
2726
2727
2728 Kind string `json:"kind,omitempty"`
2729
2730
2731
2732 MetroCode string `json:"metroCode,omitempty"`
2733
2734
2735 MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2736
2737
2738 Name string `json:"name,omitempty"`
2739
2740
2741 RegionCode string `json:"regionCode,omitempty"`
2742
2743
2744 RegionDartId int64 `json:"regionDartId,omitempty,string"`
2745
2746
2747
2748
2749
2750
2751
2752 ForceSendFields []string `json:"-"`
2753
2754
2755
2756
2757
2758
2759
2760 NullFields []string `json:"-"`
2761 }
2762
2763 func (s *City) MarshalJSON() ([]byte, error) {
2764 type NoMethod City
2765 raw := NoMethod(*s)
2766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2767 }
2768
2769
2770 type ClickTag struct {
2771
2772
2773 ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2774
2775
2776
2777
2778 EventName string `json:"eventName,omitempty"`
2779
2780
2781
2782
2783 Name string `json:"name,omitempty"`
2784
2785
2786
2787
2788
2789
2790
2791 ForceSendFields []string `json:"-"`
2792
2793
2794
2795
2796
2797
2798
2799
2800 NullFields []string `json:"-"`
2801 }
2802
2803 func (s *ClickTag) MarshalJSON() ([]byte, error) {
2804 type NoMethod ClickTag
2805 raw := NoMethod(*s)
2806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2807 }
2808
2809
2810 type ClickThroughUrl struct {
2811
2812
2813
2814
2815
2816
2817
2818
2819 ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2820
2821
2822
2823
2824 CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2825
2826
2827
2828 DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2829
2830
2831
2832 LandingPageId int64 `json:"landingPageId,omitempty,string"`
2833
2834
2835
2836
2837
2838
2839
2840
2841 ForceSendFields []string `json:"-"`
2842
2843
2844
2845
2846
2847
2848
2849
2850 NullFields []string `json:"-"`
2851 }
2852
2853 func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2854 type NoMethod ClickThroughUrl
2855 raw := NoMethod(*s)
2856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2857 }
2858
2859
2860 type ClickThroughUrlSuffixProperties struct {
2861
2862
2863 ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2864
2865
2866
2867 OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2868
2869
2870
2871
2872
2873
2874
2875
2876 ForceSendFields []string `json:"-"`
2877
2878
2879
2880
2881
2882
2883
2884
2885 NullFields []string `json:"-"`
2886 }
2887
2888 func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2889 type NoMethod ClickThroughUrlSuffixProperties
2890 raw := NoMethod(*s)
2891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2892 }
2893
2894
2895 type CompanionClickThroughOverride struct {
2896
2897
2898 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2899
2900
2901
2902 CreativeId int64 `json:"creativeId,omitempty,string"`
2903
2904
2905
2906
2907
2908
2909
2910 ForceSendFields []string `json:"-"`
2911
2912
2913
2914
2915
2916
2917
2918
2919 NullFields []string `json:"-"`
2920 }
2921
2922 func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
2923 type NoMethod CompanionClickThroughOverride
2924 raw := NoMethod(*s)
2925 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2926 }
2927
2928
2929 type CompanionSetting struct {
2930
2931
2932 CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
2933
2934
2935
2936
2937 EnabledSizes []*Size `json:"enabledSizes,omitempty"`
2938
2939
2940 ImageOnly bool `json:"imageOnly,omitempty"`
2941
2942
2943
2944 Kind string `json:"kind,omitempty"`
2945
2946
2947
2948
2949
2950
2951
2952 ForceSendFields []string `json:"-"`
2953
2954
2955
2956
2957
2958
2959
2960
2961 NullFields []string `json:"-"`
2962 }
2963
2964 func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
2965 type NoMethod CompanionSetting
2966 raw := NoMethod(*s)
2967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2968 }
2969
2970
2971
2972 type CompatibleFields struct {
2973
2974
2975
2976 CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
2977
2978
2979
2980 FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
2981
2982
2983
2984 Kind string `json:"kind,omitempty"`
2985
2986
2987
2988 PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
2989
2990
2991
2992 ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
2993
2994
2995
2996 ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
2997
2998
2999
3000 googleapi.ServerResponse `json:"-"`
3001
3002
3003
3004
3005
3006
3007
3008
3009 ForceSendFields []string `json:"-"`
3010
3011
3012
3013
3014
3015
3016
3017
3018 NullFields []string `json:"-"`
3019 }
3020
3021 func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
3022 type NoMethod CompatibleFields
3023 raw := NoMethod(*s)
3024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3025 }
3026
3027
3028
3029
3030 type ConnectionType struct {
3031
3032 Id int64 `json:"id,omitempty,string"`
3033
3034
3035
3036 Kind string `json:"kind,omitempty"`
3037
3038
3039 Name string `json:"name,omitempty"`
3040
3041
3042
3043 googleapi.ServerResponse `json:"-"`
3044
3045
3046
3047
3048
3049
3050
3051 ForceSendFields []string `json:"-"`
3052
3053
3054
3055
3056
3057
3058
3059 NullFields []string `json:"-"`
3060 }
3061
3062 func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3063 type NoMethod ConnectionType
3064 raw := NoMethod(*s)
3065 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3066 }
3067
3068
3069 type ConnectionTypesListResponse struct {
3070
3071
3072 ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3073
3074
3075
3076 Kind string `json:"kind,omitempty"`
3077
3078
3079
3080 googleapi.ServerResponse `json:"-"`
3081
3082
3083
3084
3085
3086
3087
3088 ForceSendFields []string `json:"-"`
3089
3090
3091
3092
3093
3094
3095
3096
3097 NullFields []string `json:"-"`
3098 }
3099
3100 func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3101 type NoMethod ConnectionTypesListResponse
3102 raw := NoMethod(*s)
3103 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3104 }
3105
3106
3107 type ContentCategoriesListResponse struct {
3108
3109 ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3110
3111
3112
3113 Kind string `json:"kind,omitempty"`
3114
3115
3116
3117 NextPageToken string `json:"nextPageToken,omitempty"`
3118
3119
3120
3121 googleapi.ServerResponse `json:"-"`
3122
3123
3124
3125
3126
3127
3128
3129 ForceSendFields []string `json:"-"`
3130
3131
3132
3133
3134
3135
3136
3137
3138 NullFields []string `json:"-"`
3139 }
3140
3141 func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3142 type NoMethod ContentCategoriesListResponse
3143 raw := NoMethod(*s)
3144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3145 }
3146
3147
3148
3149 type ContentCategory struct {
3150
3151
3152 AccountId int64 `json:"accountId,omitempty,string"`
3153
3154
3155
3156 Id int64 `json:"id,omitempty,string"`
3157
3158
3159
3160 Kind string `json:"kind,omitempty"`
3161
3162
3163
3164
3165 Name string `json:"name,omitempty"`
3166
3167
3168
3169 googleapi.ServerResponse `json:"-"`
3170
3171
3172
3173
3174
3175
3176
3177 ForceSendFields []string `json:"-"`
3178
3179
3180
3181
3182
3183
3184
3185 NullFields []string `json:"-"`
3186 }
3187
3188 func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3189 type NoMethod ContentCategory
3190 raw := NoMethod(*s)
3191 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3192 }
3193
3194
3195
3196 type Conversion struct {
3197
3198
3199 ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3200
3201
3202
3203 CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3204
3205
3206
3207
3208
3209
3210 EncryptedUserId string `json:"encryptedUserId,omitempty"`
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221 EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3222
3223
3224
3225 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3226
3227
3228
3229 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3230
3231
3232
3233
3234
3235
3236 Gclid string `json:"gclid,omitempty"`
3237
3238
3239
3240 Kind string `json:"kind,omitempty"`
3241
3242
3243
3244
3245 LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3246
3247
3248
3249
3250
3251
3252
3253 MatchId string `json:"matchId,omitempty"`
3254
3255
3256
3257
3258
3259 MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3260
3261
3262
3263 NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3264
3265
3266
3267
3268 Ordinal string `json:"ordinal,omitempty"`
3269
3270
3271 Quantity int64 `json:"quantity,omitempty,string"`
3272
3273
3274
3275 TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3276
3277
3278
3279
3280 TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3281
3282
3283 Value float64 `json:"value,omitempty"`
3284
3285
3286
3287
3288
3289
3290
3291
3292 ForceSendFields []string `json:"-"`
3293
3294
3295
3296
3297
3298
3299
3300
3301 NullFields []string `json:"-"`
3302 }
3303
3304 func (s *Conversion) MarshalJSON() ([]byte, error) {
3305 type NoMethod Conversion
3306 raw := NoMethod(*s)
3307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3308 }
3309
3310 func (s *Conversion) UnmarshalJSON(data []byte) error {
3311 type NoMethod Conversion
3312 var s1 struct {
3313 Value gensupport.JSONFloat64 `json:"value"`
3314 *NoMethod
3315 }
3316 s1.NoMethod = (*NoMethod)(s)
3317 if err := json.Unmarshal(data, &s1); err != nil {
3318 return err
3319 }
3320 s.Value = float64(s1.Value)
3321 return nil
3322 }
3323
3324
3325
3326 type ConversionError struct {
3327
3328
3329
3330
3331
3332
3333
3334 Code string `json:"code,omitempty"`
3335
3336
3337
3338 Kind string `json:"kind,omitempty"`
3339
3340
3341 Message string `json:"message,omitempty"`
3342
3343
3344
3345
3346
3347
3348
3349 ForceSendFields []string `json:"-"`
3350
3351
3352
3353
3354
3355
3356
3357 NullFields []string `json:"-"`
3358 }
3359
3360 func (s *ConversionError) MarshalJSON() ([]byte, error) {
3361 type NoMethod ConversionError
3362 raw := NoMethod(*s)
3363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3364 }
3365
3366
3367
3368 type ConversionStatus struct {
3369
3370 Conversion *Conversion `json:"conversion,omitempty"`
3371
3372
3373 Errors []*ConversionError `json:"errors,omitempty"`
3374
3375
3376
3377 Kind string `json:"kind,omitempty"`
3378
3379
3380
3381
3382
3383
3384
3385 ForceSendFields []string `json:"-"`
3386
3387
3388
3389
3390
3391
3392
3393 NullFields []string `json:"-"`
3394 }
3395
3396 func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3397 type NoMethod ConversionStatus
3398 raw := NoMethod(*s)
3399 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3400 }
3401
3402
3403 type ConversionsBatchInsertRequest struct {
3404
3405 Conversions []*Conversion `json:"conversions,omitempty"`
3406
3407
3408
3409
3410 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3411
3412
3413
3414 Kind string `json:"kind,omitempty"`
3415
3416
3417
3418
3419
3420
3421
3422 ForceSendFields []string `json:"-"`
3423
3424
3425
3426
3427
3428
3429
3430 NullFields []string `json:"-"`
3431 }
3432
3433 func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3434 type NoMethod ConversionsBatchInsertRequest
3435 raw := NoMethod(*s)
3436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3437 }
3438
3439
3440 type ConversionsBatchInsertResponse struct {
3441
3442 HasFailures bool `json:"hasFailures,omitempty"`
3443
3444
3445
3446 Kind string `json:"kind,omitempty"`
3447
3448
3449
3450 Status []*ConversionStatus `json:"status,omitempty"`
3451
3452
3453
3454 googleapi.ServerResponse `json:"-"`
3455
3456
3457
3458
3459
3460
3461
3462 ForceSendFields []string `json:"-"`
3463
3464
3465
3466
3467
3468
3469
3470 NullFields []string `json:"-"`
3471 }
3472
3473 func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3474 type NoMethod ConversionsBatchInsertResponse
3475 raw := NoMethod(*s)
3476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3477 }
3478
3479
3480 type ConversionsBatchUpdateRequest struct {
3481
3482 Conversions []*Conversion `json:"conversions,omitempty"`
3483
3484
3485
3486 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3487
3488
3489
3490 Kind string `json:"kind,omitempty"`
3491
3492
3493
3494
3495
3496
3497
3498 ForceSendFields []string `json:"-"`
3499
3500
3501
3502
3503
3504
3505
3506 NullFields []string `json:"-"`
3507 }
3508
3509 func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3510 type NoMethod ConversionsBatchUpdateRequest
3511 raw := NoMethod(*s)
3512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3513 }
3514
3515
3516 type ConversionsBatchUpdateResponse struct {
3517
3518 HasFailures bool `json:"hasFailures,omitempty"`
3519
3520
3521
3522 Kind string `json:"kind,omitempty"`
3523
3524
3525
3526 Status []*ConversionStatus `json:"status,omitempty"`
3527
3528
3529
3530 googleapi.ServerResponse `json:"-"`
3531
3532
3533
3534
3535
3536
3537
3538 ForceSendFields []string `json:"-"`
3539
3540
3541
3542
3543
3544
3545
3546 NullFields []string `json:"-"`
3547 }
3548
3549 func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3550 type NoMethod ConversionsBatchUpdateResponse
3551 raw := NoMethod(*s)
3552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3553 }
3554
3555
3556 type CountriesListResponse struct {
3557
3558 Countries []*Country `json:"countries,omitempty"`
3559
3560
3561
3562 Kind string `json:"kind,omitempty"`
3563
3564
3565
3566 googleapi.ServerResponse `json:"-"`
3567
3568
3569
3570
3571
3572
3573
3574 ForceSendFields []string `json:"-"`
3575
3576
3577
3578
3579
3580
3581
3582 NullFields []string `json:"-"`
3583 }
3584
3585 func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3586 type NoMethod CountriesListResponse
3587 raw := NoMethod(*s)
3588 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3589 }
3590
3591
3592
3593 type Country struct {
3594
3595 CountryCode string `json:"countryCode,omitempty"`
3596
3597
3598
3599 DartId int64 `json:"dartId,omitempty,string"`
3600
3601
3602
3603 Kind string `json:"kind,omitempty"`
3604
3605
3606 Name string `json:"name,omitempty"`
3607
3608
3609
3610 SslEnabled bool `json:"sslEnabled,omitempty"`
3611
3612
3613
3614 googleapi.ServerResponse `json:"-"`
3615
3616
3617
3618
3619
3620
3621
3622 ForceSendFields []string `json:"-"`
3623
3624
3625
3626
3627
3628
3629
3630 NullFields []string `json:"-"`
3631 }
3632
3633 func (s *Country) MarshalJSON() ([]byte, error) {
3634 type NoMethod Country
3635 raw := NoMethod(*s)
3636 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3637 }
3638
3639
3640 type Creative struct {
3641
3642
3643
3644 AccountId int64 `json:"accountId,omitempty,string"`
3645
3646
3647
3648 Active bool `json:"active,omitempty"`
3649
3650
3651
3652
3653 AdParameters string `json:"adParameters,omitempty"`
3654
3655
3656
3657
3658
3659
3660
3661 AdTagKeys []string `json:"adTagKeys,omitempty"`
3662
3663
3664
3665
3666
3667 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3668
3669
3670
3671 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3672
3673
3674
3675
3676
3677 AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3678
3679
3680
3681 Archived bool `json:"archived,omitempty"`
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692 ArtworkType string `json:"artworkType,omitempty"`
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703 AuthoringSource string `json:"authoringSource,omitempty"`
3704
3705
3706
3707
3708
3709
3710
3711
3712 AuthoringTool string `json:"authoringTool,omitempty"`
3713
3714
3715
3716
3717 AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3718
3719
3720
3721
3722
3723 BackgroundColor string `json:"backgroundColor,omitempty"`
3724
3725
3726
3727
3728 BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808 BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3809
3810
3811
3812
3813 BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3814
3815
3816
3817
3818 BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833 ClickTags []*ClickTag `json:"clickTags,omitempty"`
3834
3835
3836
3837 CommercialId string `json:"commercialId,omitempty"`
3838
3839
3840
3841
3842
3843
3844 CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867 Compatibility []string `json:"compatibility,omitempty"`
3868
3869
3870
3871
3872
3873
3874
3875 ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3876
3877
3878
3879
3880
3881 CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3882
3883
3884 CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3885
3886
3887
3888
3889 CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3890
3891
3892
3893 CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3894
3895
3896
3897
3898
3899
3900
3901 CustomKeyValues []string `json:"customKeyValues,omitempty"`
3902
3903
3904
3905
3906
3907
3908
3909 DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3910
3911
3912
3913
3914
3915
3916
3917
3918 ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3919
3920
3921
3922
3923
3924
3925 FsCommand *FsCommand `json:"fsCommand,omitempty"`
3926
3927
3928
3929
3930
3931 HtmlCode string `json:"htmlCode,omitempty"`
3932
3933
3934
3935
3936
3937 HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
3938
3939
3940
3941 Id int64 `json:"id,omitempty,string"`
3942
3943
3944
3945 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
3946
3947
3948
3949 Kind string `json:"kind,omitempty"`
3950
3951
3952
3953 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
3954
3955
3956
3957
3958
3959 LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
3960
3961
3962
3963
3964 MediaDescription string `json:"mediaDescription,omitempty"`
3965
3966
3967
3968
3969 MediaDuration float64 `json:"mediaDuration,omitempty"`
3970
3971
3972
3973 Name string `json:"name,omitempty"`
3974
3975
3976
3977 OverrideCss string `json:"overrideCss,omitempty"`
3978
3979
3980
3981 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
3982
3983
3984
3985
3986
3987
3988
3989
3990 RedirectUrl string `json:"redirectUrl,omitempty"`
3991
3992
3993
3994 RenderingId int64 `json:"renderingId,omitempty,string"`
3995
3996
3997
3998
3999 RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
4000
4001
4002
4003
4004
4005 RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
4006
4007
4008
4009
4010
4011 RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022 Size *Size `json:"size,omitempty"`
4023
4024
4025
4026
4027 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
4028
4029
4030
4031
4032 Skippable bool `json:"skippable,omitempty"`
4033
4034
4035
4036 SslCompliant bool `json:"sslCompliant,omitempty"`
4037
4038
4039
4040 SslOverride bool `json:"sslOverride,omitempty"`
4041
4042
4043
4044
4045 StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
4046
4047
4048
4049
4050 StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
4051
4052
4053
4054
4055
4056 StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
4057
4058
4059
4060
4061 SubaccountId int64 `json:"subaccountId,omitempty,string"`
4062
4063
4064
4065
4066 ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
4067
4068
4069
4070
4071 ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
4072
4073
4074
4075
4076 ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
4077
4078
4079
4080
4081
4082
4083 TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4084
4085
4086
4087
4088 TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121 Type string `json:"type,omitempty"`
4122
4123
4124
4125
4126 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136 Version int64 `json:"version,omitempty"`
4137
4138
4139
4140 googleapi.ServerResponse `json:"-"`
4141
4142
4143
4144
4145
4146
4147
4148 ForceSendFields []string `json:"-"`
4149
4150
4151
4152
4153
4154
4155
4156 NullFields []string `json:"-"`
4157 }
4158
4159 func (s *Creative) MarshalJSON() ([]byte, error) {
4160 type NoMethod Creative
4161 raw := NoMethod(*s)
4162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4163 }
4164
4165 func (s *Creative) UnmarshalJSON(data []byte) error {
4166 type NoMethod Creative
4167 var s1 struct {
4168 MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4169 *NoMethod
4170 }
4171 s1.NoMethod = (*NoMethod)(s)
4172 if err := json.Unmarshal(data, &s1); err != nil {
4173 return err
4174 }
4175 s.MediaDuration = float64(s1.MediaDuration)
4176 return nil
4177 }
4178
4179
4180 type CreativeAsset struct {
4181
4182
4183
4184
4185 ActionScript3 bool `json:"actionScript3,omitempty"`
4186
4187
4188
4189
4190
4191 Active bool `json:"active,omitempty"`
4192
4193
4194
4195
4196 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207 Alignment string `json:"alignment,omitempty"`
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217 ArtworkType string `json:"artworkType,omitempty"`
4218
4219
4220
4221
4222
4223 AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4224
4225
4226
4227
4228 AudioBitRate int64 `json:"audioBitRate,omitempty"`
4229
4230
4231
4232
4233 AudioSampleRate int64 `json:"audioSampleRate,omitempty"`
4234
4235
4236
4237 BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
4238
4239
4240
4241
4242 BitRate int64 `json:"bitRate,omitempty"`
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252 ChildAssetType string `json:"childAssetType,omitempty"`
4253
4254
4255
4256
4257
4258 CollapsedSize *Size `json:"collapsedSize,omitempty"`
4259
4260
4261
4262
4263
4264 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
4265
4266
4267
4268
4269 CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345 DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361 DisplayType string `json:"displayType,omitempty"`
4362
4363
4364
4365
4366
4367 Duration int64 `json:"duration,omitempty"`
4368
4369
4370
4371
4372
4373
4374
4375
4376 DurationType string `json:"durationType,omitempty"`
4377
4378
4379
4380
4381 ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4382
4383
4384
4385
4386 FileSize int64 `json:"fileSize,omitempty,string"`
4387
4388
4389
4390
4391
4392 FlashVersion int64 `json:"flashVersion,omitempty"`
4393
4394
4395
4396
4397 FrameRate float64 `json:"frameRate,omitempty"`
4398
4399
4400
4401 HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4402
4403
4404
4405 HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4406
4407
4408
4409
4410 HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4411
4412
4413
4414
4415 Id int64 `json:"id,omitempty,string"`
4416
4417
4418
4419 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4420
4421
4422
4423
4424 MediaDuration float64 `json:"mediaDuration,omitempty"`
4425
4426
4427
4428
4429 MimeType string `json:"mimeType,omitempty"`
4430
4431
4432
4433
4434
4435
4436 Offset *OffsetPosition `json:"offset,omitempty"`
4437
4438
4439
4440
4441
4442
4443
4444
4445 Orientation string `json:"orientation,omitempty"`
4446
4447
4448
4449
4450 OriginalBackup bool `json:"originalBackup,omitempty"`
4451
4452
4453 PoliteLoad bool `json:"politeLoad,omitempty"`
4454
4455
4456
4457 Position *OffsetPosition `json:"position,omitempty"`
4458
4459
4460
4461
4462
4463
4464
4465
4466 PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476 PositionTopUnit string `json:"positionTopUnit,omitempty"`
4477
4478
4479
4480
4481 ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4482
4483
4484
4485
4486
4487
4488 Pushdown bool `json:"pushdown,omitempty"`
4489
4490
4491
4492
4493
4494
4495
4496 PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537 Role string `json:"role,omitempty"`
4538
4539
4540
4541
4542
4543
4544
4545
4546 Size *Size `json:"size,omitempty"`
4547
4548
4549
4550
4551 SslCompliant bool `json:"sslCompliant,omitempty"`
4552
4553
4554
4555
4556
4557
4558
4559 StartTimeType string `json:"startTimeType,omitempty"`
4560
4561
4562
4563
4564 StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4565
4566
4567
4568
4569 Transparency bool `json:"transparency,omitempty"`
4570
4571
4572
4573
4574 VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585 WindowMode string `json:"windowMode,omitempty"`
4586
4587
4588
4589
4590
4591
4592 ZIndex int64 `json:"zIndex,omitempty"`
4593
4594
4595
4596 ZipFilename string `json:"zipFilename,omitempty"`
4597
4598
4599
4600 ZipFilesize string `json:"zipFilesize,omitempty"`
4601
4602
4603
4604
4605
4606
4607
4608 ForceSendFields []string `json:"-"`
4609
4610
4611
4612
4613
4614
4615
4616 NullFields []string `json:"-"`
4617 }
4618
4619 func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4620 type NoMethod CreativeAsset
4621 raw := NoMethod(*s)
4622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4623 }
4624
4625 func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4626 type NoMethod CreativeAsset
4627 var s1 struct {
4628 FrameRate gensupport.JSONFloat64 `json:"frameRate"`
4629 MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4630 PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4631 *NoMethod
4632 }
4633 s1.NoMethod = (*NoMethod)(s)
4634 if err := json.Unmarshal(data, &s1); err != nil {
4635 return err
4636 }
4637 s.FrameRate = float64(s1.FrameRate)
4638 s.MediaDuration = float64(s1.MediaDuration)
4639 s.PushdownDuration = float64(s1.PushdownDuration)
4640 return nil
4641 }
4642
4643
4644 type CreativeAssetId struct {
4645
4646
4647
4648
4649 Name string `json:"name,omitempty"`
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662 Type string `json:"type,omitempty"`
4663
4664
4665
4666
4667
4668
4669
4670 ForceSendFields []string `json:"-"`
4671
4672
4673
4674
4675
4676
4677
4678 NullFields []string `json:"-"`
4679 }
4680
4681 func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4682 type NoMethod CreativeAssetId
4683 raw := NoMethod(*s)
4684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4685 }
4686
4687
4688
4689
4690
4691 type CreativeAssetMetadata struct {
4692
4693 AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4694
4695
4696
4697
4698 ClickTags []*ClickTag `json:"clickTags,omitempty"`
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773 DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4774
4775
4776
4777 Id int64 `json:"id,omitempty,string"`
4778
4779
4780
4781 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4782
4783
4784
4785 Kind string `json:"kind,omitempty"`
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827 WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4828
4829
4830
4831 googleapi.ServerResponse `json:"-"`
4832
4833
4834
4835
4836
4837
4838
4839 ForceSendFields []string `json:"-"`
4840
4841
4842
4843
4844
4845
4846
4847
4848 NullFields []string `json:"-"`
4849 }
4850
4851 func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4852 type NoMethod CreativeAssetMetadata
4853 raw := NoMethod(*s)
4854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4855 }
4856
4857
4858
4859
4860 type CreativeAssetSelection struct {
4861
4862
4863
4864 DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4865
4866
4867
4868
4869
4870 Rules []*Rule `json:"rules,omitempty"`
4871
4872
4873
4874
4875
4876
4877
4878 ForceSendFields []string `json:"-"`
4879
4880
4881
4882
4883
4884
4885
4886
4887 NullFields []string `json:"-"`
4888 }
4889
4890 func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4891 type NoMethod CreativeAssetSelection
4892 raw := NoMethod(*s)
4893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4894 }
4895
4896
4897 type CreativeAssignment struct {
4898
4899
4900 Active bool `json:"active,omitempty"`
4901
4902
4903
4904
4905
4906
4907 ApplyEventTags bool `json:"applyEventTags,omitempty"`
4908
4909
4910 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4911
4912
4913
4914 CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4915
4916
4917
4918
4919 CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4920
4921
4922
4923 CreativeId int64 `json:"creativeId,omitempty,string"`
4924
4925
4926
4927 CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
4928
4929 EndTime string `json:"endTime,omitempty"`
4930
4931
4932
4933
4934
4935
4936
4937
4938 RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
4939
4940
4941
4942
4943 Sequence int64 `json:"sequence,omitempty"`
4944
4945
4946
4947
4948 SslCompliant bool `json:"sslCompliant,omitempty"`
4949
4950 StartTime string `json:"startTime,omitempty"`
4951
4952
4953
4954
4955 Weight int64 `json:"weight,omitempty"`
4956
4957
4958
4959
4960
4961
4962
4963 ForceSendFields []string `json:"-"`
4964
4965
4966
4967
4968
4969
4970
4971 NullFields []string `json:"-"`
4972 }
4973
4974 func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
4975 type NoMethod CreativeAssignment
4976 raw := NoMethod(*s)
4977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4978 }
4979
4980
4981 type CreativeClickThroughUrl struct {
4982
4983
4984
4985
4986
4987 ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
4988
4989
4990
4991 CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
4992
4993
4994 LandingPageId int64 `json:"landingPageId,omitempty,string"`
4995
4996
4997
4998
4999
5000
5001
5002
5003 ForceSendFields []string `json:"-"`
5004
5005
5006
5007
5008
5009
5010
5011
5012 NullFields []string `json:"-"`
5013 }
5014
5015 func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
5016 type NoMethod CreativeClickThroughUrl
5017 raw := NoMethod(*s)
5018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5019 }
5020
5021
5022 type CreativeCustomEvent struct {
5023
5024
5025 AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
5026
5027
5028 AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
5029
5030
5031
5032
5033
5034
5035
5036
5037 AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
5038
5039
5040
5041
5042 ArtworkLabel string `json:"artworkLabel,omitempty"`
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052 ArtworkType string `json:"artworkType,omitempty"`
5053
5054
5055
5056 ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
5057
5058
5059
5060 Id int64 `json:"id,omitempty,string"`
5061
5062
5063
5064 PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074 TargetType string `json:"targetType,omitempty"`
5075
5076
5077
5078 VideoReportingId string `json:"videoReportingId,omitempty"`
5079
5080
5081
5082
5083
5084
5085
5086
5087 ForceSendFields []string `json:"-"`
5088
5089
5090
5091
5092
5093
5094
5095
5096 NullFields []string `json:"-"`
5097 }
5098
5099 func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
5100 type NoMethod CreativeCustomEvent
5101 raw := NoMethod(*s)
5102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5103 }
5104
5105
5106 type CreativeField struct {
5107
5108
5109 AccountId int64 `json:"accountId,omitempty,string"`
5110
5111
5112
5113 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5114
5115
5116
5117 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5118
5119
5120
5121 Id int64 `json:"id,omitempty,string"`
5122
5123
5124
5125 Kind string `json:"kind,omitempty"`
5126
5127
5128
5129
5130 Name string `json:"name,omitempty"`
5131
5132
5133
5134 SubaccountId int64 `json:"subaccountId,omitempty,string"`
5135
5136
5137
5138 googleapi.ServerResponse `json:"-"`
5139
5140
5141
5142
5143
5144
5145
5146 ForceSendFields []string `json:"-"`
5147
5148
5149
5150
5151
5152
5153
5154 NullFields []string `json:"-"`
5155 }
5156
5157 func (s *CreativeField) MarshalJSON() ([]byte, error) {
5158 type NoMethod CreativeField
5159 raw := NoMethod(*s)
5160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5161 }
5162
5163
5164 type CreativeFieldAssignment struct {
5165
5166 CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
5167
5168
5169 CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
5170
5171
5172
5173
5174
5175
5176
5177 ForceSendFields []string `json:"-"`
5178
5179
5180
5181
5182
5183
5184
5185
5186 NullFields []string `json:"-"`
5187 }
5188
5189 func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
5190 type NoMethod CreativeFieldAssignment
5191 raw := NoMethod(*s)
5192 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5193 }
5194
5195
5196 type CreativeFieldValue struct {
5197
5198
5199 Id int64 `json:"id,omitempty,string"`
5200
5201
5202
5203 Kind string `json:"kind,omitempty"`
5204
5205
5206
5207 Value string `json:"value,omitempty"`
5208
5209
5210
5211 googleapi.ServerResponse `json:"-"`
5212
5213
5214
5215
5216
5217
5218
5219 ForceSendFields []string `json:"-"`
5220
5221
5222
5223
5224
5225
5226
5227 NullFields []string `json:"-"`
5228 }
5229
5230 func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
5231 type NoMethod CreativeFieldValue
5232 raw := NoMethod(*s)
5233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5234 }
5235
5236
5237 type CreativeFieldValuesListResponse struct {
5238
5239 CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
5240
5241
5242
5243 Kind string `json:"kind,omitempty"`
5244
5245
5246
5247 NextPageToken string `json:"nextPageToken,omitempty"`
5248
5249
5250
5251 googleapi.ServerResponse `json:"-"`
5252
5253
5254
5255
5256
5257
5258
5259 ForceSendFields []string `json:"-"`
5260
5261
5262
5263
5264
5265
5266
5267
5268 NullFields []string `json:"-"`
5269 }
5270
5271 func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
5272 type NoMethod CreativeFieldValuesListResponse
5273 raw := NoMethod(*s)
5274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5275 }
5276
5277
5278 type CreativeFieldsListResponse struct {
5279
5280 CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
5281
5282
5283
5284 Kind string `json:"kind,omitempty"`
5285
5286
5287
5288 NextPageToken string `json:"nextPageToken,omitempty"`
5289
5290
5291
5292 googleapi.ServerResponse `json:"-"`
5293
5294
5295
5296
5297
5298
5299
5300 ForceSendFields []string `json:"-"`
5301
5302
5303
5304
5305
5306
5307
5308
5309 NullFields []string `json:"-"`
5310 }
5311
5312 func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
5313 type NoMethod CreativeFieldsListResponse
5314 raw := NoMethod(*s)
5315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5316 }
5317
5318
5319 type CreativeGroup struct {
5320
5321
5322 AccountId int64 `json:"accountId,omitempty,string"`
5323
5324
5325
5326 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
5327
5328
5329
5330 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
5331
5332
5333
5334
5335
5336 GroupNumber int64 `json:"groupNumber,omitempty"`
5337
5338
5339
5340 Id int64 `json:"id,omitempty,string"`
5341
5342
5343
5344 Kind string `json:"kind,omitempty"`
5345
5346
5347
5348
5349 Name string `json:"name,omitempty"`
5350
5351
5352
5353 SubaccountId int64 `json:"subaccountId,omitempty,string"`
5354
5355
5356
5357 googleapi.ServerResponse `json:"-"`
5358
5359
5360
5361
5362
5363
5364
5365 ForceSendFields []string `json:"-"`
5366
5367
5368
5369
5370
5371
5372
5373 NullFields []string `json:"-"`
5374 }
5375
5376 func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
5377 type NoMethod CreativeGroup
5378 raw := NoMethod(*s)
5379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5380 }
5381
5382
5383 type CreativeGroupAssignment struct {
5384
5385 CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
5386
5387
5388
5389
5390
5391
5392
5393 CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
5394
5395
5396
5397
5398
5399
5400
5401 ForceSendFields []string `json:"-"`
5402
5403
5404
5405
5406
5407
5408
5409
5410 NullFields []string `json:"-"`
5411 }
5412
5413 func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
5414 type NoMethod CreativeGroupAssignment
5415 raw := NoMethod(*s)
5416 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5417 }
5418
5419
5420 type CreativeGroupsListResponse struct {
5421
5422 CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
5423
5424
5425
5426 Kind string `json:"kind,omitempty"`
5427
5428
5429
5430 NextPageToken string `json:"nextPageToken,omitempty"`
5431
5432
5433
5434 googleapi.ServerResponse `json:"-"`
5435
5436
5437
5438
5439
5440
5441
5442 ForceSendFields []string `json:"-"`
5443
5444
5445
5446
5447
5448
5449
5450
5451 NullFields []string `json:"-"`
5452 }
5453
5454 func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
5455 type NoMethod CreativeGroupsListResponse
5456 raw := NoMethod(*s)
5457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5458 }
5459
5460
5461 type CreativeOptimizationConfiguration struct {
5462
5463
5464
5465 Id int64 `json:"id,omitempty,string"`
5466
5467
5468
5469 Name string `json:"name,omitempty"`
5470
5471
5472
5473 OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483 OptimizationModel string `json:"optimizationModel,omitempty"`
5484
5485
5486
5487
5488
5489
5490
5491 ForceSendFields []string `json:"-"`
5492
5493
5494
5495
5496
5497
5498
5499 NullFields []string `json:"-"`
5500 }
5501
5502 func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5503 type NoMethod CreativeOptimizationConfiguration
5504 raw := NoMethod(*s)
5505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5506 }
5507
5508
5509 type CreativeRotation struct {
5510
5511 CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5512
5513
5514
5515
5516
5517
5518 CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5519
5520
5521
5522
5523
5524
5525
5526 Type string `json:"type,omitempty"`
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536 WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5537
5538
5539
5540
5541
5542
5543
5544 ForceSendFields []string `json:"-"`
5545
5546
5547
5548
5549
5550
5551
5552
5553 NullFields []string `json:"-"`
5554 }
5555
5556 func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5557 type NoMethod CreativeRotation
5558 raw := NoMethod(*s)
5559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5560 }
5561
5562
5563 type CreativesListResponse struct {
5564
5565 Creatives []*Creative `json:"creatives,omitempty"`
5566
5567
5568
5569 Kind string `json:"kind,omitempty"`
5570
5571
5572
5573 NextPageToken string `json:"nextPageToken,omitempty"`
5574
5575
5576
5577 googleapi.ServerResponse `json:"-"`
5578
5579
5580
5581
5582
5583
5584
5585 ForceSendFields []string `json:"-"`
5586
5587
5588
5589
5590
5591
5592
5593 NullFields []string `json:"-"`
5594 }
5595
5596 func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5597 type NoMethod CreativesListResponse
5598 raw := NoMethod(*s)
5599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5600 }
5601
5602
5603
5604
5605 type CrossDimensionReachReportCompatibleFields struct {
5606
5607
5608 Breakdown []*Dimension `json:"breakdown,omitempty"`
5609
5610
5611
5612 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5613
5614
5615
5616 Kind string `json:"kind,omitempty"`
5617
5618
5619
5620 Metrics []*Metric `json:"metrics,omitempty"`
5621
5622
5623
5624 OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5625
5626
5627
5628
5629
5630
5631
5632 ForceSendFields []string `json:"-"`
5633
5634
5635
5636
5637
5638
5639
5640 NullFields []string `json:"-"`
5641 }
5642
5643 func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5644 type NoMethod CrossDimensionReachReportCompatibleFields
5645 raw := NoMethod(*s)
5646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5647 }
5648
5649
5650
5651
5652 type CustomFloodlightVariable struct {
5653
5654
5655 Kind string `json:"kind,omitempty"`
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761 Type string `json:"type,omitempty"`
5762
5763
5764
5765 Value string `json:"value,omitempty"`
5766
5767
5768
5769
5770
5771
5772
5773 ForceSendFields []string `json:"-"`
5774
5775
5776
5777
5778
5779
5780
5781 NullFields []string `json:"-"`
5782 }
5783
5784 func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5785 type NoMethod CustomFloodlightVariable
5786 raw := NoMethod(*s)
5787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5788 }
5789
5790
5791 type CustomRichMediaEvents struct {
5792
5793
5794 FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5795
5796
5797
5798 Kind string `json:"kind,omitempty"`
5799
5800
5801
5802
5803
5804
5805
5806 ForceSendFields []string `json:"-"`
5807
5808
5809
5810
5811
5812
5813
5814
5815 NullFields []string `json:"-"`
5816 }
5817
5818 func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5819 type NoMethod CustomRichMediaEvents
5820 raw := NoMethod(*s)
5821 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5822 }
5823
5824
5825 type CustomViewabilityMetric struct {
5826
5827 Configuration *CustomViewabilityMetricConfiguration `json:"configuration,omitempty"`
5828
5829
5830 Id int64 `json:"id,omitempty,string"`
5831
5832
5833 Name string `json:"name,omitempty"`
5834
5835
5836
5837
5838
5839
5840
5841 ForceSendFields []string `json:"-"`
5842
5843
5844
5845
5846
5847
5848
5849 NullFields []string `json:"-"`
5850 }
5851
5852 func (s *CustomViewabilityMetric) MarshalJSON() ([]byte, error) {
5853 type NoMethod CustomViewabilityMetric
5854 raw := NoMethod(*s)
5855 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5856 }
5857
5858
5859
5860 type CustomViewabilityMetricConfiguration struct {
5861
5862 Audible bool `json:"audible,omitempty"`
5863
5864
5865
5866
5867 TimeMillis int64 `json:"timeMillis,omitempty"`
5868
5869
5870
5871
5872 TimePercent int64 `json:"timePercent,omitempty"`
5873
5874
5875
5876 ViewabilityPercent int64 `json:"viewabilityPercent,omitempty"`
5877
5878
5879
5880
5881
5882
5883
5884 ForceSendFields []string `json:"-"`
5885
5886
5887
5888
5889
5890
5891
5892 NullFields []string `json:"-"`
5893 }
5894
5895 func (s *CustomViewabilityMetricConfiguration) MarshalJSON() ([]byte, error) {
5896 type NoMethod CustomViewabilityMetricConfiguration
5897 raw := NoMethod(*s)
5898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5899 }
5900
5901
5902 type DateRange struct {
5903 EndDate string `json:"endDate,omitempty"`
5904
5905
5906
5907 Kind string `json:"kind,omitempty"`
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930 RelativeDateRange string `json:"relativeDateRange,omitempty"`
5931
5932 StartDate string `json:"startDate,omitempty"`
5933
5934
5935
5936
5937
5938
5939
5940 ForceSendFields []string `json:"-"`
5941
5942
5943
5944
5945
5946
5947
5948 NullFields []string `json:"-"`
5949 }
5950
5951 func (s *DateRange) MarshalJSON() ([]byte, error) {
5952 type NoMethod DateRange
5953 raw := NoMethod(*s)
5954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5955 }
5956
5957
5958 type DayPartTargeting struct {
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971 DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5972
5973
5974
5975
5976
5977
5978
5979
5980 HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
5981
5982
5983
5984 UserLocalTime bool `json:"userLocalTime,omitempty"`
5985
5986
5987
5988
5989
5990
5991
5992 ForceSendFields []string `json:"-"`
5993
5994
5995
5996
5997
5998
5999
6000 NullFields []string `json:"-"`
6001 }
6002
6003 func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
6004 type NoMethod DayPartTargeting
6005 raw := NoMethod(*s)
6006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6007 }
6008
6009
6010 type DeepLink struct {
6011
6012 AppUrl string `json:"appUrl,omitempty"`
6013
6014
6015
6016 FallbackUrl string `json:"fallbackUrl,omitempty"`
6017
6018
6019
6020 Kind string `json:"kind,omitempty"`
6021
6022
6023 MobileApp *MobileApp `json:"mobileApp,omitempty"`
6024
6025
6026
6027
6028 RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
6029
6030
6031
6032
6033
6034
6035
6036 ForceSendFields []string `json:"-"`
6037
6038
6039
6040
6041
6042
6043
6044 NullFields []string `json:"-"`
6045 }
6046
6047 func (s *DeepLink) MarshalJSON() ([]byte, error) {
6048 type NoMethod DeepLink
6049 raw := NoMethod(*s)
6050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6051 }
6052
6053
6054
6055
6056
6057 type DefaultClickThroughEventTagProperties struct {
6058
6059
6060 DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
6061
6062
6063
6064 OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
6065
6066
6067
6068
6069
6070
6071
6072
6073 ForceSendFields []string `json:"-"`
6074
6075
6076
6077
6078
6079
6080
6081
6082 NullFields []string `json:"-"`
6083 }
6084
6085 func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
6086 type NoMethod DefaultClickThroughEventTagProperties
6087 raw := NoMethod(*s)
6088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6089 }
6090
6091
6092 type DeliverySchedule struct {
6093
6094
6095 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
6096
6097
6098
6099
6100 HardCutoff bool `json:"hardCutoff,omitempty"`
6101
6102
6103
6104
6105
6106
6107 ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130 Priority string `json:"priority,omitempty"`
6131
6132
6133
6134
6135
6136
6137
6138 ForceSendFields []string `json:"-"`
6139
6140
6141
6142
6143
6144
6145
6146 NullFields []string `json:"-"`
6147 }
6148
6149 func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
6150 type NoMethod DeliverySchedule
6151 raw := NoMethod(*s)
6152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6153 }
6154
6155
6156 type DfpSettings struct {
6157
6158 DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
6159
6160
6161 DfpNetworkName string `json:"dfpNetworkName,omitempty"`
6162
6163
6164
6165 ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
6166
6167
6168
6169 PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
6170
6171
6172
6173 PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
6174
6175
6176
6177
6178
6179
6180
6181 ForceSendFields []string `json:"-"`
6182
6183
6184
6185
6186
6187
6188
6189
6190 NullFields []string `json:"-"`
6191 }
6192
6193 func (s *DfpSettings) MarshalJSON() ([]byte, error) {
6194 type NoMethod DfpSettings
6195 raw := NoMethod(*s)
6196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6197 }
6198
6199
6200 type Dimension struct {
6201
6202
6203 Kind string `json:"kind,omitempty"`
6204
6205
6206 Name string `json:"name,omitempty"`
6207
6208
6209
6210
6211
6212
6213
6214 ForceSendFields []string `json:"-"`
6215
6216
6217
6218
6219
6220
6221
6222 NullFields []string `json:"-"`
6223 }
6224
6225 func (s *Dimension) MarshalJSON() ([]byte, error) {
6226 type NoMethod Dimension
6227 raw := NoMethod(*s)
6228 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6229 }
6230
6231
6232 type DimensionFilter struct {
6233
6234 DimensionName string `json:"dimensionName,omitempty"`
6235
6236
6237
6238 Kind string `json:"kind,omitempty"`
6239
6240
6241 Value string `json:"value,omitempty"`
6242
6243
6244
6245
6246
6247
6248
6249 ForceSendFields []string `json:"-"`
6250
6251
6252
6253
6254
6255
6256
6257 NullFields []string `json:"-"`
6258 }
6259
6260 func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
6261 type NoMethod DimensionFilter
6262 raw := NoMethod(*s)
6263 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6264 }
6265
6266
6267 type DimensionValue struct {
6268
6269 DimensionName string `json:"dimensionName,omitempty"`
6270
6271
6272 Etag string `json:"etag,omitempty"`
6273
6274
6275 Id string `json:"id,omitempty"`
6276
6277
6278
6279 Kind string `json:"kind,omitempty"`
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293 MatchType string `json:"matchType,omitempty"`
6294
6295
6296 Value string `json:"value,omitempty"`
6297
6298
6299
6300
6301
6302
6303
6304 ForceSendFields []string `json:"-"`
6305
6306
6307
6308
6309
6310
6311
6312 NullFields []string `json:"-"`
6313 }
6314
6315 func (s *DimensionValue) MarshalJSON() ([]byte, error) {
6316 type NoMethod DimensionValue
6317 raw := NoMethod(*s)
6318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6319 }
6320
6321
6322 type DimensionValueList struct {
6323
6324 Etag string `json:"etag,omitempty"`
6325
6326
6327 Items []*DimensionValue `json:"items,omitempty"`
6328
6329
6330
6331 Kind string `json:"kind,omitempty"`
6332
6333
6334
6335
6336
6337 NextPageToken string `json:"nextPageToken,omitempty"`
6338
6339
6340
6341 googleapi.ServerResponse `json:"-"`
6342
6343
6344
6345
6346
6347
6348
6349 ForceSendFields []string `json:"-"`
6350
6351
6352
6353
6354
6355
6356
6357 NullFields []string `json:"-"`
6358 }
6359
6360 func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
6361 type NoMethod DimensionValueList
6362 raw := NoMethod(*s)
6363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6364 }
6365
6366
6367 type DimensionValueRequest struct {
6368
6369
6370 DimensionName string `json:"dimensionName,omitempty"`
6371
6372 EndDate string `json:"endDate,omitempty"`
6373
6374
6375
6376 Filters []*DimensionFilter `json:"filters,omitempty"`
6377
6378
6379
6380 Kind string `json:"kind,omitempty"`
6381
6382 StartDate string `json:"startDate,omitempty"`
6383
6384
6385
6386
6387
6388
6389
6390 ForceSendFields []string `json:"-"`
6391
6392
6393
6394
6395
6396
6397
6398 NullFields []string `json:"-"`
6399 }
6400
6401 func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
6402 type NoMethod DimensionValueRequest
6403 raw := NoMethod(*s)
6404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6405 }
6406
6407
6408
6409
6410 type DirectorySite struct {
6411
6412 Active bool `json:"active,omitempty"`
6413
6414
6415
6416 Id int64 `json:"id,omitempty,string"`
6417
6418
6419
6420 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431 InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441 InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
6442
6443
6444
6445 Kind string `json:"kind,omitempty"`
6446
6447
6448 Name string `json:"name,omitempty"`
6449
6450
6451 Settings *DirectorySiteSettings `json:"settings,omitempty"`
6452
6453
6454 Url string `json:"url,omitempty"`
6455
6456
6457
6458 googleapi.ServerResponse `json:"-"`
6459
6460
6461
6462
6463
6464
6465
6466 ForceSendFields []string `json:"-"`
6467
6468
6469
6470
6471
6472
6473
6474 NullFields []string `json:"-"`
6475 }
6476
6477 func (s *DirectorySite) MarshalJSON() ([]byte, error) {
6478 type NoMethod DirectorySite
6479 raw := NoMethod(*s)
6480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6481 }
6482
6483
6484 type DirectorySiteSettings struct {
6485
6486
6487 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
6488
6489
6490 DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
6491
6492
6493
6494 InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
6495
6496
6497
6498 InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
6499
6500
6501
6502
6503
6504
6505
6506 ForceSendFields []string `json:"-"`
6507
6508
6509
6510
6511
6512
6513
6514
6515 NullFields []string `json:"-"`
6516 }
6517
6518 func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
6519 type NoMethod DirectorySiteSettings
6520 raw := NoMethod(*s)
6521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6522 }
6523
6524
6525 type DirectorySitesListResponse struct {
6526
6527 DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
6528
6529
6530
6531 Kind string `json:"kind,omitempty"`
6532
6533
6534
6535 NextPageToken string `json:"nextPageToken,omitempty"`
6536
6537
6538
6539 googleapi.ServerResponse `json:"-"`
6540
6541
6542
6543
6544
6545
6546
6547 ForceSendFields []string `json:"-"`
6548
6549
6550
6551
6552
6553
6554
6555
6556 NullFields []string `json:"-"`
6557 }
6558
6559 func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
6560 type NoMethod DirectorySitesListResponse
6561 raw := NoMethod(*s)
6562 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6563 }
6564
6565
6566
6567
6568
6569
6570
6571 type DynamicTargetingKey struct {
6572
6573
6574 Kind string `json:"kind,omitempty"`
6575
6576
6577
6578
6579 Name string `json:"name,omitempty"`
6580
6581
6582
6583 ObjectId int64 `json:"objectId,omitempty,string"`
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593 ObjectType string `json:"objectType,omitempty"`
6594
6595
6596
6597 googleapi.ServerResponse `json:"-"`
6598
6599
6600
6601
6602
6603
6604
6605 ForceSendFields []string `json:"-"`
6606
6607
6608
6609
6610
6611
6612
6613 NullFields []string `json:"-"`
6614 }
6615
6616 func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
6617 type NoMethod DynamicTargetingKey
6618 raw := NoMethod(*s)
6619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6620 }
6621
6622
6623 type DynamicTargetingKeysListResponse struct {
6624
6625 DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
6626
6627
6628
6629 Kind string `json:"kind,omitempty"`
6630
6631
6632
6633 googleapi.ServerResponse `json:"-"`
6634
6635
6636
6637
6638
6639
6640
6641
6642 ForceSendFields []string `json:"-"`
6643
6644
6645
6646
6647
6648
6649
6650
6651 NullFields []string `json:"-"`
6652 }
6653
6654 func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
6655 type NoMethod DynamicTargetingKeysListResponse
6656 raw := NoMethod(*s)
6657 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6658 }
6659
6660
6661 type EncryptionInfo struct {
6662
6663
6664 EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677 EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6678
6679
6680
6681
6682
6683
6684
6685
6686 EncryptionSource string `json:"encryptionSource,omitempty"`
6687
6688
6689
6690 Kind string `json:"kind,omitempty"`
6691
6692
6693
6694
6695
6696
6697
6698 ForceSendFields []string `json:"-"`
6699
6700
6701
6702
6703
6704
6705
6706
6707 NullFields []string `json:"-"`
6708 }
6709
6710 func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6711 type NoMethod EncryptionInfo
6712 raw := NoMethod(*s)
6713 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6714 }
6715
6716
6717 type EventTag struct {
6718
6719
6720 AccountId int64 `json:"accountId,omitempty,string"`
6721
6722
6723
6724 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6725
6726
6727
6728 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6729
6730
6731
6732 CampaignId int64 `json:"campaignId,omitempty,string"`
6733
6734
6735
6736 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6737
6738
6739
6740 EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6741
6742
6743
6744
6745
6746
6747 ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6748
6749
6750 Id int64 `json:"id,omitempty,string"`
6751
6752
6753
6754 Kind string `json:"kind,omitempty"`
6755
6756
6757
6758 Name string `json:"name,omitempty"`
6759
6760
6761
6762
6763
6764
6765
6766 SiteFilterType string `json:"siteFilterType,omitempty"`
6767
6768
6769
6770
6771 SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6772
6773
6774
6775 SslCompliant bool `json:"sslCompliant,omitempty"`
6776
6777
6778
6779
6780
6781
6782
6783 Status string `json:"status,omitempty"`
6784
6785
6786
6787 SubaccountId int64 `json:"subaccountId,omitempty,string"`
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798 Type string `json:"type,omitempty"`
6799
6800
6801
6802
6803 Url string `json:"url,omitempty"`
6804
6805
6806
6807
6808
6809 UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6810
6811
6812
6813 googleapi.ServerResponse `json:"-"`
6814
6815
6816
6817
6818
6819
6820
6821 ForceSendFields []string `json:"-"`
6822
6823
6824
6825
6826
6827
6828
6829 NullFields []string `json:"-"`
6830 }
6831
6832 func (s *EventTag) MarshalJSON() ([]byte, error) {
6833 type NoMethod EventTag
6834 raw := NoMethod(*s)
6835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6836 }
6837
6838
6839 type EventTagOverride struct {
6840
6841 Enabled bool `json:"enabled,omitempty"`
6842
6843
6844
6845 Id int64 `json:"id,omitempty,string"`
6846
6847
6848
6849
6850
6851
6852
6853 ForceSendFields []string `json:"-"`
6854
6855
6856
6857
6858
6859
6860
6861 NullFields []string `json:"-"`
6862 }
6863
6864 func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
6865 type NoMethod EventTagOverride
6866 raw := NoMethod(*s)
6867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6868 }
6869
6870
6871 type EventTagsListResponse struct {
6872
6873 EventTags []*EventTag `json:"eventTags,omitempty"`
6874
6875
6876
6877 Kind string `json:"kind,omitempty"`
6878
6879
6880
6881 googleapi.ServerResponse `json:"-"`
6882
6883
6884
6885
6886
6887
6888
6889 ForceSendFields []string `json:"-"`
6890
6891
6892
6893
6894
6895
6896
6897 NullFields []string `json:"-"`
6898 }
6899
6900 func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
6901 type NoMethod EventTagsListResponse
6902 raw := NoMethod(*s)
6903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6904 }
6905
6906
6907
6908
6909
6910 type File struct {
6911
6912
6913
6914 DateRange *DateRange `json:"dateRange,omitempty"`
6915
6916
6917 Etag string `json:"etag,omitempty"`
6918
6919
6920 FileName string `json:"fileName,omitempty"`
6921
6922
6923
6924
6925
6926
6927
6928 Format string `json:"format,omitempty"`
6929
6930
6931 Id int64 `json:"id,omitempty,string"`
6932
6933
6934
6935 Kind string `json:"kind,omitempty"`
6936
6937
6938
6939 LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
6940
6941
6942 ReportId int64 `json:"reportId,omitempty,string"`
6943
6944
6945
6946
6947
6948
6949
6950
6951 Status string `json:"status,omitempty"`
6952
6953
6954 Urls *FileUrls `json:"urls,omitempty"`
6955
6956
6957
6958 googleapi.ServerResponse `json:"-"`
6959
6960
6961
6962
6963
6964
6965
6966 ForceSendFields []string `json:"-"`
6967
6968
6969
6970
6971
6972
6973
6974 NullFields []string `json:"-"`
6975 }
6976
6977 func (s *File) MarshalJSON() ([]byte, error) {
6978 type NoMethod File
6979 raw := NoMethod(*s)
6980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6981 }
6982
6983
6984 type FileUrls struct {
6985
6986 ApiUrl string `json:"apiUrl,omitempty"`
6987
6988
6989
6990 BrowserUrl string `json:"browserUrl,omitempty"`
6991
6992
6993
6994
6995
6996
6997
6998 ForceSendFields []string `json:"-"`
6999
7000
7001
7002
7003
7004
7005
7006 NullFields []string `json:"-"`
7007 }
7008
7009 func (s *FileUrls) MarshalJSON() ([]byte, error) {
7010 type NoMethod FileUrls
7011 raw := NoMethod(*s)
7012 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7013 }
7014
7015
7016 type FileList struct {
7017
7018 Etag string `json:"etag,omitempty"`
7019
7020
7021 Items []*File `json:"items,omitempty"`
7022
7023
7024
7025 Kind string `json:"kind,omitempty"`
7026
7027
7028
7029
7030
7031 NextPageToken string `json:"nextPageToken,omitempty"`
7032
7033
7034
7035 googleapi.ServerResponse `json:"-"`
7036
7037
7038
7039
7040
7041
7042
7043 ForceSendFields []string `json:"-"`
7044
7045
7046
7047
7048
7049
7050
7051 NullFields []string `json:"-"`
7052 }
7053
7054 func (s *FileList) MarshalJSON() ([]byte, error) {
7055 type NoMethod FileList
7056 raw := NoMethod(*s)
7057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7058 }
7059
7060
7061 type Flight struct {
7062 EndDate string `json:"endDate,omitempty"`
7063
7064
7065 RateOrCost int64 `json:"rateOrCost,omitempty,string"`
7066
7067 StartDate string `json:"startDate,omitempty"`
7068
7069
7070 Units int64 `json:"units,omitempty,string"`
7071
7072
7073
7074
7075
7076
7077
7078 ForceSendFields []string `json:"-"`
7079
7080
7081
7082
7083
7084
7085
7086 NullFields []string `json:"-"`
7087 }
7088
7089 func (s *Flight) MarshalJSON() ([]byte, error) {
7090 type NoMethod Flight
7091 raw := NoMethod(*s)
7092 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7093 }
7094
7095
7096
7097 type FloodlightActivitiesGenerateTagResponse struct {
7098
7099
7100 FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
7101
7102
7103
7104
7105
7106 GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
7107
7108
7109
7110 Kind string `json:"kind,omitempty"`
7111
7112
7113
7114 googleapi.ServerResponse `json:"-"`
7115
7116
7117
7118
7119
7120
7121
7122
7123 ForceSendFields []string `json:"-"`
7124
7125
7126
7127
7128
7129
7130
7131
7132 NullFields []string `json:"-"`
7133 }
7134
7135 func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
7136 type NoMethod FloodlightActivitiesGenerateTagResponse
7137 raw := NoMethod(*s)
7138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7139 }
7140
7141
7142 type FloodlightActivitiesListResponse struct {
7143
7144 FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
7145
7146
7147
7148 Kind string `json:"kind,omitempty"`
7149
7150
7151
7152 NextPageToken string `json:"nextPageToken,omitempty"`
7153
7154
7155
7156 googleapi.ServerResponse `json:"-"`
7157
7158
7159
7160
7161
7162
7163
7164
7165 ForceSendFields []string `json:"-"`
7166
7167
7168
7169
7170
7171
7172
7173
7174 NullFields []string `json:"-"`
7175 }
7176
7177 func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
7178 type NoMethod FloodlightActivitiesListResponse
7179 raw := NoMethod(*s)
7180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7181 }
7182
7183
7184 type FloodlightActivity struct {
7185
7186
7187 AccountId int64 `json:"accountId,omitempty,string"`
7188
7189
7190
7191
7192 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7193
7194
7195
7196 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208 CacheBustingType string `json:"cacheBustingType,omitempty"`
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219 CountingMethod string `json:"countingMethod,omitempty"`
7220
7221
7222 DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
7223
7224
7225
7226 ExpectedUrl string `json:"expectedUrl,omitempty"`
7227
7228
7229
7230 FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
7231
7232
7233
7234 FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
7235
7236
7237
7238 FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
7239
7240
7241
7242
7243
7244
7245
7246 FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
7247
7248
7249
7250
7251
7252 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7253
7254
7255
7256
7257 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7258
7259
7260
7261
7262
7263
7264
7265
7266 FloodlightTagType string `json:"floodlightTagType,omitempty"`
7267
7268
7269 Hidden bool `json:"hidden,omitempty"`
7270
7271
7272
7273 Id int64 `json:"id,omitempty,string"`
7274
7275
7276
7277 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7278
7279
7280
7281 Kind string `json:"kind,omitempty"`
7282
7283
7284
7285 Name string `json:"name,omitempty"`
7286
7287
7288 Notes string `json:"notes,omitempty"`
7289
7290
7291 PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
7292
7293
7294 Secure bool `json:"secure,omitempty"`
7295
7296
7297
7298
7299 SslCompliant bool `json:"sslCompliant,omitempty"`
7300
7301
7302 SslRequired bool `json:"sslRequired,omitempty"`
7303
7304
7305
7306 SubaccountId int64 `json:"subaccountId,omitempty,string"`
7307
7308
7309
7310
7311
7312
7313
7314 TagFormat string `json:"tagFormat,omitempty"`
7315
7316
7317
7318
7319
7320
7321
7322 TagString string `json:"tagString,omitempty"`
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430 UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
7431
7432
7433
7434 googleapi.ServerResponse `json:"-"`
7435
7436
7437
7438
7439
7440
7441
7442 ForceSendFields []string `json:"-"`
7443
7444
7445
7446
7447
7448
7449
7450 NullFields []string `json:"-"`
7451 }
7452
7453 func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
7454 type NoMethod FloodlightActivity
7455 raw := NoMethod(*s)
7456 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7457 }
7458
7459
7460 type FloodlightActivityDynamicTag struct {
7461
7462
7463 Id int64 `json:"id,omitempty,string"`
7464
7465
7466 Name string `json:"name,omitempty"`
7467
7468
7469 Tag string `json:"tag,omitempty"`
7470
7471
7472
7473
7474
7475
7476
7477 ForceSendFields []string `json:"-"`
7478
7479
7480
7481
7482
7483
7484
7485 NullFields []string `json:"-"`
7486 }
7487
7488 func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
7489 type NoMethod FloodlightActivityDynamicTag
7490 raw := NoMethod(*s)
7491 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7492 }
7493
7494
7495
7496 type FloodlightActivityGroup struct {
7497
7498
7499 AccountId int64 `json:"accountId,omitempty,string"`
7500
7501
7502
7503
7504
7505 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7506
7507
7508
7509 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7510
7511
7512
7513 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
7514
7515
7516
7517
7518 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
7519
7520
7521
7522 Id int64 `json:"id,omitempty,string"`
7523
7524
7525
7526 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7527
7528
7529
7530 Kind string `json:"kind,omitempty"`
7531
7532
7533
7534
7535 Name string `json:"name,omitempty"`
7536
7537
7538
7539 SubaccountId int64 `json:"subaccountId,omitempty,string"`
7540
7541
7542
7543
7544
7545
7546
7547
7548 TagString string `json:"tagString,omitempty"`
7549
7550
7551
7552
7553
7554
7555
7556 Type string `json:"type,omitempty"`
7557
7558
7559
7560 googleapi.ServerResponse `json:"-"`
7561
7562
7563
7564
7565
7566
7567
7568 ForceSendFields []string `json:"-"`
7569
7570
7571
7572
7573
7574
7575
7576 NullFields []string `json:"-"`
7577 }
7578
7579 func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
7580 type NoMethod FloodlightActivityGroup
7581 raw := NoMethod(*s)
7582 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7583 }
7584
7585
7586
7587 type FloodlightActivityGroupsListResponse struct {
7588
7589 FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
7590
7591
7592
7593 Kind string `json:"kind,omitempty"`
7594
7595
7596
7597 NextPageToken string `json:"nextPageToken,omitempty"`
7598
7599
7600
7601 googleapi.ServerResponse `json:"-"`
7602
7603
7604
7605
7606
7607
7608
7609
7610 ForceSendFields []string `json:"-"`
7611
7612
7613
7614
7615
7616
7617
7618
7619 NullFields []string `json:"-"`
7620 }
7621
7622 func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
7623 type NoMethod FloodlightActivityGroupsListResponse
7624 raw := NoMethod(*s)
7625 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7626 }
7627
7628
7629 type FloodlightActivityPublisherDynamicTag struct {
7630
7631 ClickThrough bool `json:"clickThrough,omitempty"`
7632
7633
7634
7635
7636
7637 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
7638
7639
7640 DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
7641
7642
7643 SiteId int64 `json:"siteId,omitempty,string"`
7644
7645
7646
7647 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
7648
7649
7650 ViewThrough bool `json:"viewThrough,omitempty"`
7651
7652
7653
7654
7655
7656
7657
7658 ForceSendFields []string `json:"-"`
7659
7660
7661
7662
7663
7664
7665
7666 NullFields []string `json:"-"`
7667 }
7668
7669 func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
7670 type NoMethod FloodlightActivityPublisherDynamicTag
7671 raw := NoMethod(*s)
7672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7673 }
7674
7675
7676
7677 type FloodlightConfiguration struct {
7678
7679
7680 AccountId int64 `json:"accountId,omitempty,string"`
7681
7682
7683
7684 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7685
7686
7687
7688 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
7689
7690
7691
7692 AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
7693
7694
7695
7696 CustomViewabilityMetric *CustomViewabilityMetric `json:"customViewabilityMetric,omitempty"`
7697
7698
7699
7700
7701
7702 ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
7703
7704
7705
7706
7707
7708
7709
7710 FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
7711
7712
7713
7714 Id int64 `json:"id,omitempty,string"`
7715
7716
7717
7718 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
7719
7720
7721
7722 InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
7723
7724
7725
7726 Kind string `json:"kind,omitempty"`
7727
7728
7729
7730 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
7731
7732
7733
7734
7735
7736
7737
7738
7739 NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
7740
7741
7742 OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
7743
7744
7745
7746 SubaccountId int64 `json:"subaccountId,omitempty,string"`
7747
7748
7749
7750 TagSettings *TagSettings `json:"tagSettings,omitempty"`
7751
7752
7753
7754 ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
7755
7756
7757
7758 UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
7759
7760
7761
7762 googleapi.ServerResponse `json:"-"`
7763
7764
7765
7766
7767
7768
7769
7770 ForceSendFields []string `json:"-"`
7771
7772
7773
7774
7775
7776
7777
7778 NullFields []string `json:"-"`
7779 }
7780
7781 func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
7782 type NoMethod FloodlightConfiguration
7783 raw := NoMethod(*s)
7784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7785 }
7786
7787
7788
7789 type FloodlightConfigurationsListResponse struct {
7790
7791 FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
7792
7793
7794
7795 Kind string `json:"kind,omitempty"`
7796
7797
7798
7799 googleapi.ServerResponse `json:"-"`
7800
7801
7802
7803
7804
7805
7806
7807
7808 ForceSendFields []string `json:"-"`
7809
7810
7811
7812
7813
7814
7815
7816
7817 NullFields []string `json:"-"`
7818 }
7819
7820 func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
7821 type NoMethod FloodlightConfigurationsListResponse
7822 raw := NoMethod(*s)
7823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7824 }
7825
7826
7827
7828 type FloodlightReportCompatibleFields struct {
7829
7830
7831 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
7832
7833
7834
7835 Dimensions []*Dimension `json:"dimensions,omitempty"`
7836
7837
7838
7839 Kind string `json:"kind,omitempty"`
7840
7841
7842
7843 Metrics []*Metric `json:"metrics,omitempty"`
7844
7845
7846
7847
7848
7849
7850
7851 ForceSendFields []string `json:"-"`
7852
7853
7854
7855
7856
7857
7858
7859
7860 NullFields []string `json:"-"`
7861 }
7862
7863 func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
7864 type NoMethod FloodlightReportCompatibleFields
7865 raw := NoMethod(*s)
7866 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7867 }
7868
7869
7870 type FrequencyCap struct {
7871
7872
7873
7874 Duration int64 `json:"duration,omitempty,string"`
7875
7876
7877
7878
7879 Impressions int64 `json:"impressions,omitempty,string"`
7880
7881
7882
7883
7884
7885
7886
7887 ForceSendFields []string `json:"-"`
7888
7889
7890
7891
7892
7893
7894
7895 NullFields []string `json:"-"`
7896 }
7897
7898 func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
7899 type NoMethod FrequencyCap
7900 raw := NoMethod(*s)
7901 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7902 }
7903
7904
7905 type FsCommand struct {
7906
7907
7908 Left int64 `json:"left,omitempty"`
7909
7910
7911
7912
7913
7914
7915 PositionOption string `json:"positionOption,omitempty"`
7916
7917
7918
7919 Top int64 `json:"top,omitempty"`
7920
7921
7922 WindowHeight int64 `json:"windowHeight,omitempty"`
7923
7924
7925 WindowWidth int64 `json:"windowWidth,omitempty"`
7926
7927
7928
7929
7930
7931
7932
7933 ForceSendFields []string `json:"-"`
7934
7935
7936
7937
7938
7939
7940
7941 NullFields []string `json:"-"`
7942 }
7943
7944 func (s *FsCommand) MarshalJSON() ([]byte, error) {
7945 type NoMethod FsCommand
7946 raw := NoMethod(*s)
7947 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7948 }
7949
7950
7951 type GeoTargeting struct {
7952
7953
7954
7955
7956 Cities []*City `json:"cities,omitempty"`
7957
7958
7959
7960
7961
7962
7963
7964 Countries []*Country `json:"countries,omitempty"`
7965
7966
7967
7968
7969 ExcludeCountries bool `json:"excludeCountries,omitempty"`
7970
7971
7972
7973
7974
7975 Metros []*Metro `json:"metros,omitempty"`
7976
7977
7978
7979
7980
7981 PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
7982
7983
7984
7985
7986
7987 Regions []*Region `json:"regions,omitempty"`
7988
7989
7990
7991
7992
7993
7994
7995 ForceSendFields []string `json:"-"`
7996
7997
7998
7999
8000
8001
8002
8003 NullFields []string `json:"-"`
8004 }
8005
8006 func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
8007 type NoMethod GeoTargeting
8008 raw := NoMethod(*s)
8009 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8010 }
8011
8012
8013 type InventoryItem struct {
8014
8015 AccountId int64 `json:"accountId,omitempty,string"`
8016
8017
8018
8019
8020
8021
8022 AdSlots []*AdSlot `json:"adSlots,omitempty"`
8023
8024
8025 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8026
8027
8028 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8029
8030
8031
8032 EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
8033
8034
8035
8036 EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
8037
8038
8039 Id int64 `json:"id,omitempty,string"`
8040
8041
8042 InPlan bool `json:"inPlan,omitempty"`
8043
8044
8045
8046 Kind string `json:"kind,omitempty"`
8047
8048
8049
8050 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8051
8052
8053
8054
8055
8056 Name string `json:"name,omitempty"`
8057
8058
8059 NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
8060
8061
8062 OrderId int64 `json:"orderId,omitempty,string"`
8063
8064
8065 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8066
8067
8068 Pricing *Pricing `json:"pricing,omitempty"`
8069
8070
8071 ProjectId int64 `json:"projectId,omitempty,string"`
8072
8073
8074 RfpId int64 `json:"rfpId,omitempty,string"`
8075
8076
8077 SiteId int64 `json:"siteId,omitempty,string"`
8078
8079
8080 SubaccountId int64 `json:"subaccountId,omitempty,string"`
8081
8082
8083
8084
8085
8086
8087 Type string `json:"type,omitempty"`
8088
8089
8090
8091 googleapi.ServerResponse `json:"-"`
8092
8093
8094
8095
8096
8097
8098
8099 ForceSendFields []string `json:"-"`
8100
8101
8102
8103
8104
8105
8106
8107 NullFields []string `json:"-"`
8108 }
8109
8110 func (s *InventoryItem) MarshalJSON() ([]byte, error) {
8111 type NoMethod InventoryItem
8112 raw := NoMethod(*s)
8113 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8114 }
8115
8116
8117 type InventoryItemsListResponse struct {
8118
8119 InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
8120
8121
8122
8123 Kind string `json:"kind,omitempty"`
8124
8125
8126
8127 NextPageToken string `json:"nextPageToken,omitempty"`
8128
8129
8130
8131 googleapi.ServerResponse `json:"-"`
8132
8133
8134
8135
8136
8137
8138
8139 ForceSendFields []string `json:"-"`
8140
8141
8142
8143
8144
8145
8146
8147
8148 NullFields []string `json:"-"`
8149 }
8150
8151 func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
8152 type NoMethod InventoryItemsListResponse
8153 raw := NoMethod(*s)
8154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8155 }
8156
8157
8158 type KeyValueTargetingExpression struct {
8159
8160 Expression string `json:"expression,omitempty"`
8161
8162
8163
8164
8165
8166
8167
8168 ForceSendFields []string `json:"-"`
8169
8170
8171
8172
8173
8174
8175
8176 NullFields []string `json:"-"`
8177 }
8178
8179 func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
8180 type NoMethod KeyValueTargetingExpression
8181 raw := NoMethod(*s)
8182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8183 }
8184
8185
8186
8187 type LandingPage struct {
8188
8189
8190 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8191
8192
8193 Archived bool `json:"archived,omitempty"`
8194
8195
8196
8197 DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
8198
8199
8200
8201 Id int64 `json:"id,omitempty,string"`
8202
8203
8204
8205 Kind string `json:"kind,omitempty"`
8206
8207
8208
8209 Name string `json:"name,omitempty"`
8210
8211
8212 Url string `json:"url,omitempty"`
8213
8214
8215
8216 googleapi.ServerResponse `json:"-"`
8217
8218
8219
8220
8221
8222
8223
8224 ForceSendFields []string `json:"-"`
8225
8226
8227
8228
8229
8230
8231
8232 NullFields []string `json:"-"`
8233 }
8234
8235 func (s *LandingPage) MarshalJSON() ([]byte, error) {
8236 type NoMethod LandingPage
8237 raw := NoMethod(*s)
8238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8239 }
8240
8241
8242
8243 type Language struct {
8244
8245
8246 Id int64 `json:"id,omitempty,string"`
8247
8248
8249
8250 Kind string `json:"kind,omitempty"`
8251
8252
8253
8254
8255
8256 LanguageCode string `json:"languageCode,omitempty"`
8257
8258
8259 Name string `json:"name,omitempty"`
8260
8261
8262
8263
8264
8265
8266
8267 ForceSendFields []string `json:"-"`
8268
8269
8270
8271
8272
8273
8274
8275 NullFields []string `json:"-"`
8276 }
8277
8278 func (s *Language) MarshalJSON() ([]byte, error) {
8279 type NoMethod Language
8280 raw := NoMethod(*s)
8281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8282 }
8283
8284
8285 type LanguageTargeting struct {
8286
8287
8288
8289 Languages []*Language `json:"languages,omitempty"`
8290
8291
8292
8293
8294
8295
8296
8297 ForceSendFields []string `json:"-"`
8298
8299
8300
8301
8302
8303
8304
8305 NullFields []string `json:"-"`
8306 }
8307
8308 func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
8309 type NoMethod LanguageTargeting
8310 raw := NoMethod(*s)
8311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8312 }
8313
8314
8315 type LanguagesListResponse struct {
8316
8317
8318 Kind string `json:"kind,omitempty"`
8319
8320
8321 Languages []*Language `json:"languages,omitempty"`
8322
8323
8324
8325 googleapi.ServerResponse `json:"-"`
8326
8327
8328
8329
8330
8331
8332
8333 ForceSendFields []string `json:"-"`
8334
8335
8336
8337
8338
8339
8340
8341 NullFields []string `json:"-"`
8342 }
8343
8344 func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
8345 type NoMethod LanguagesListResponse
8346 raw := NoMethod(*s)
8347 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8348 }
8349
8350
8351 type LastModifiedInfo struct {
8352
8353 Time int64 `json:"time,omitempty,string"`
8354
8355
8356
8357
8358
8359
8360
8361 ForceSendFields []string `json:"-"`
8362
8363
8364
8365
8366
8367
8368
8369 NullFields []string `json:"-"`
8370 }
8371
8372 func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
8373 type NoMethod LastModifiedInfo
8374 raw := NoMethod(*s)
8375 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8376 }
8377
8378
8379
8380 type ListPopulationClause struct {
8381
8382
8383
8384 Terms []*ListPopulationTerm `json:"terms,omitempty"`
8385
8386
8387
8388
8389
8390
8391
8392 ForceSendFields []string `json:"-"`
8393
8394
8395
8396
8397
8398
8399
8400 NullFields []string `json:"-"`
8401 }
8402
8403 func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
8404 type NoMethod ListPopulationClause
8405 raw := NoMethod(*s)
8406 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8407 }
8408
8409
8410 type ListPopulationRule struct {
8411
8412
8413 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8414
8415
8416
8417 FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
8418
8419
8420
8421
8422 ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
8423
8424
8425
8426
8427
8428
8429
8430
8431 ForceSendFields []string `json:"-"`
8432
8433
8434
8435
8436
8437
8438
8439
8440 NullFields []string `json:"-"`
8441 }
8442
8443 func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
8444 type NoMethod ListPopulationRule
8445 raw := NoMethod(*s)
8446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8447 }
8448
8449
8450 type ListPopulationTerm struct {
8451
8452
8453
8454
8455 Contains bool `json:"contains,omitempty"`
8456
8457
8458
8459
8460 Negation bool `json:"negation,omitempty"`
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474 Operator string `json:"operator,omitempty"`
8475
8476
8477
8478 RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491 Type string `json:"type,omitempty"`
8492
8493
8494
8495
8496 Value string `json:"value,omitempty"`
8497
8498
8499
8500
8501 VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
8502
8503
8504
8505
8506 VariableName string `json:"variableName,omitempty"`
8507
8508
8509
8510
8511
8512
8513
8514 ForceSendFields []string `json:"-"`
8515
8516
8517
8518
8519
8520
8521
8522 NullFields []string `json:"-"`
8523 }
8524
8525 func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
8526 type NoMethod ListPopulationTerm
8527 raw := NoMethod(*s)
8528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8529 }
8530
8531
8532 type ListTargetingExpression struct {
8533
8534
8535 Expression string `json:"expression,omitempty"`
8536
8537
8538
8539
8540
8541
8542
8543 ForceSendFields []string `json:"-"`
8544
8545
8546
8547
8548
8549
8550
8551 NullFields []string `json:"-"`
8552 }
8553
8554 func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
8555 type NoMethod ListTargetingExpression
8556 raw := NoMethod(*s)
8557 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8558 }
8559
8560
8561 type LookbackConfiguration struct {
8562
8563
8564
8565
8566
8567 ClickDuration int64 `json:"clickDuration,omitempty"`
8568
8569
8570
8571
8572
8573
8574
8575 PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
8576
8577
8578
8579
8580
8581
8582
8583 ForceSendFields []string `json:"-"`
8584
8585
8586
8587
8588
8589
8590
8591 NullFields []string `json:"-"`
8592 }
8593
8594 func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
8595 type NoMethod LookbackConfiguration
8596 raw := NoMethod(*s)
8597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8598 }
8599
8600
8601 type Metric struct {
8602
8603 Kind string `json:"kind,omitempty"`
8604
8605
8606 Name string `json:"name,omitempty"`
8607
8608
8609
8610
8611
8612
8613
8614 ForceSendFields []string `json:"-"`
8615
8616
8617
8618
8619
8620
8621
8622 NullFields []string `json:"-"`
8623 }
8624
8625 func (s *Metric) MarshalJSON() ([]byte, error) {
8626 type NoMethod Metric
8627 raw := NoMethod(*s)
8628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8629 }
8630
8631
8632
8633 type Metro struct {
8634
8635
8636 CountryCode string `json:"countryCode,omitempty"`
8637
8638
8639
8640 CountryDartId int64 `json:"countryDartId,omitempty,string"`
8641
8642
8643 DartId int64 `json:"dartId,omitempty,string"`
8644
8645
8646
8647 DmaId int64 `json:"dmaId,omitempty,string"`
8648
8649
8650
8651 Kind string `json:"kind,omitempty"`
8652
8653
8654
8655 MetroCode string `json:"metroCode,omitempty"`
8656
8657
8658 Name string `json:"name,omitempty"`
8659
8660
8661
8662
8663
8664
8665
8666 ForceSendFields []string `json:"-"`
8667
8668
8669
8670
8671
8672
8673
8674 NullFields []string `json:"-"`
8675 }
8676
8677 func (s *Metro) MarshalJSON() ([]byte, error) {
8678 type NoMethod Metro
8679 raw := NoMethod(*s)
8680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8681 }
8682
8683
8684 type MetrosListResponse struct {
8685
8686
8687 Kind string `json:"kind,omitempty"`
8688
8689
8690 Metros []*Metro `json:"metros,omitempty"`
8691
8692
8693
8694 googleapi.ServerResponse `json:"-"`
8695
8696
8697
8698
8699
8700
8701
8702 ForceSendFields []string `json:"-"`
8703
8704
8705
8706
8707
8708
8709
8710 NullFields []string `json:"-"`
8711 }
8712
8713 func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
8714 type NoMethod MetrosListResponse
8715 raw := NoMethod(*s)
8716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8717 }
8718
8719
8720
8721 type MobileApp struct {
8722
8723
8724
8725
8726
8727
8728 Directory string `json:"directory,omitempty"`
8729
8730
8731 Id string `json:"id,omitempty"`
8732
8733
8734
8735 Kind string `json:"kind,omitempty"`
8736
8737
8738 PublisherName string `json:"publisherName,omitempty"`
8739
8740
8741 Title string `json:"title,omitempty"`
8742
8743
8744
8745 googleapi.ServerResponse `json:"-"`
8746
8747
8748
8749
8750
8751
8752
8753 ForceSendFields []string `json:"-"`
8754
8755
8756
8757
8758
8759
8760
8761 NullFields []string `json:"-"`
8762 }
8763
8764 func (s *MobileApp) MarshalJSON() ([]byte, error) {
8765 type NoMethod MobileApp
8766 raw := NoMethod(*s)
8767 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8768 }
8769
8770
8771 type MobileAppsListResponse struct {
8772
8773
8774 Kind string `json:"kind,omitempty"`
8775
8776
8777 MobileApps []*MobileApp `json:"mobileApps,omitempty"`
8778
8779
8780
8781 NextPageToken string `json:"nextPageToken,omitempty"`
8782
8783
8784
8785 googleapi.ServerResponse `json:"-"`
8786
8787
8788
8789
8790
8791
8792
8793 ForceSendFields []string `json:"-"`
8794
8795
8796
8797
8798
8799
8800
8801 NullFields []string `json:"-"`
8802 }
8803
8804 func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
8805 type NoMethod MobileAppsListResponse
8806 raw := NoMethod(*s)
8807 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8808 }
8809
8810
8811
8812 type MobileCarrier struct {
8813
8814
8815 CountryCode string `json:"countryCode,omitempty"`
8816
8817
8818
8819 CountryDartId int64 `json:"countryDartId,omitempty,string"`
8820
8821
8822 Id int64 `json:"id,omitempty,string"`
8823
8824
8825
8826 Kind string `json:"kind,omitempty"`
8827
8828
8829 Name string `json:"name,omitempty"`
8830
8831
8832
8833 googleapi.ServerResponse `json:"-"`
8834
8835
8836
8837
8838
8839
8840
8841 ForceSendFields []string `json:"-"`
8842
8843
8844
8845
8846
8847
8848
8849 NullFields []string `json:"-"`
8850 }
8851
8852 func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
8853 type NoMethod MobileCarrier
8854 raw := NoMethod(*s)
8855 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8856 }
8857
8858
8859 type MobileCarriersListResponse struct {
8860
8861
8862 Kind string `json:"kind,omitempty"`
8863
8864
8865 MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
8866
8867
8868
8869 googleapi.ServerResponse `json:"-"`
8870
8871
8872
8873
8874
8875
8876
8877 ForceSendFields []string `json:"-"`
8878
8879
8880
8881
8882
8883
8884
8885 NullFields []string `json:"-"`
8886 }
8887
8888 func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
8889 type NoMethod MobileCarriersListResponse
8890 raw := NoMethod(*s)
8891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8892 }
8893
8894
8895 type ObjectFilter struct {
8896
8897
8898 Kind string `json:"kind,omitempty"`
8899
8900
8901
8902 ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913 Status string `json:"status,omitempty"`
8914
8915
8916
8917
8918
8919
8920
8921 ForceSendFields []string `json:"-"`
8922
8923
8924
8925
8926
8927
8928
8929 NullFields []string `json:"-"`
8930 }
8931
8932 func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
8933 type NoMethod ObjectFilter
8934 raw := NoMethod(*s)
8935 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8936 }
8937
8938
8939 type OffsetPosition struct {
8940
8941 Left int64 `json:"left,omitempty"`
8942
8943
8944 Top int64 `json:"top,omitempty"`
8945
8946
8947
8948
8949
8950
8951
8952 ForceSendFields []string `json:"-"`
8953
8954
8955
8956
8957
8958
8959
8960 NullFields []string `json:"-"`
8961 }
8962
8963 func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
8964 type NoMethod OffsetPosition
8965 raw := NoMethod(*s)
8966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8967 }
8968
8969
8970 type OmnitureSettings struct {
8971
8972
8973
8974 OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
8975
8976
8977
8978
8979 OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
8980
8981
8982
8983
8984
8985
8986
8987
8988 ForceSendFields []string `json:"-"`
8989
8990
8991
8992
8993
8994
8995
8996
8997 NullFields []string `json:"-"`
8998 }
8999
9000 func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
9001 type NoMethod OmnitureSettings
9002 raw := NoMethod(*s)
9003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9004 }
9005
9006
9007
9008 type OperatingSystem struct {
9009
9010
9011 DartId int64 `json:"dartId,omitempty,string"`
9012
9013
9014 Desktop bool `json:"desktop,omitempty"`
9015
9016
9017
9018 Kind string `json:"kind,omitempty"`
9019
9020
9021 Mobile bool `json:"mobile,omitempty"`
9022
9023
9024 Name string `json:"name,omitempty"`
9025
9026
9027
9028 googleapi.ServerResponse `json:"-"`
9029
9030
9031
9032
9033
9034
9035
9036 ForceSendFields []string `json:"-"`
9037
9038
9039
9040
9041
9042
9043
9044 NullFields []string `json:"-"`
9045 }
9046
9047 func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
9048 type NoMethod OperatingSystem
9049 raw := NoMethod(*s)
9050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9051 }
9052
9053
9054
9055 type OperatingSystemVersion struct {
9056
9057 Id int64 `json:"id,omitempty,string"`
9058
9059
9060
9061 Kind string `json:"kind,omitempty"`
9062
9063
9064
9065 MajorVersion string `json:"majorVersion,omitempty"`
9066
9067
9068
9069 MinorVersion string `json:"minorVersion,omitempty"`
9070
9071
9072 Name string `json:"name,omitempty"`
9073
9074
9075 OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
9076
9077
9078
9079 googleapi.ServerResponse `json:"-"`
9080
9081
9082
9083
9084
9085
9086
9087 ForceSendFields []string `json:"-"`
9088
9089
9090
9091
9092
9093
9094
9095 NullFields []string `json:"-"`
9096 }
9097
9098 func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
9099 type NoMethod OperatingSystemVersion
9100 raw := NoMethod(*s)
9101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9102 }
9103
9104
9105
9106 type OperatingSystemVersionsListResponse struct {
9107
9108
9109 Kind string `json:"kind,omitempty"`
9110
9111
9112 OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
9113
9114
9115
9116 googleapi.ServerResponse `json:"-"`
9117
9118
9119
9120
9121
9122
9123
9124 ForceSendFields []string `json:"-"`
9125
9126
9127
9128
9129
9130
9131
9132 NullFields []string `json:"-"`
9133 }
9134
9135 func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
9136 type NoMethod OperatingSystemVersionsListResponse
9137 raw := NoMethod(*s)
9138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9139 }
9140
9141
9142 type OperatingSystemsListResponse struct {
9143
9144
9145 Kind string `json:"kind,omitempty"`
9146
9147
9148 OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
9149
9150
9151
9152 googleapi.ServerResponse `json:"-"`
9153
9154
9155
9156
9157
9158
9159
9160 ForceSendFields []string `json:"-"`
9161
9162
9163
9164
9165
9166
9167
9168 NullFields []string `json:"-"`
9169 }
9170
9171 func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
9172 type NoMethod OperatingSystemsListResponse
9173 raw := NoMethod(*s)
9174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9175 }
9176
9177
9178 type OptimizationActivity struct {
9179
9180
9181 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9182
9183
9184
9185 FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
9186
9187
9188
9189
9190 Weight int64 `json:"weight,omitempty"`
9191
9192
9193
9194
9195
9196
9197
9198
9199 ForceSendFields []string `json:"-"`
9200
9201
9202
9203
9204
9205
9206
9207
9208 NullFields []string `json:"-"`
9209 }
9210
9211 func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
9212 type NoMethod OptimizationActivity
9213 raw := NoMethod(*s)
9214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9215 }
9216
9217
9218 type Order struct {
9219
9220 AccountId int64 `json:"accountId,omitempty,string"`
9221
9222
9223 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9224
9225
9226
9227 ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
9228
9229
9230 BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
9231
9232
9233 BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
9234
9235
9236 Comments string `json:"comments,omitempty"`
9237
9238
9239 Contacts []*OrderContact `json:"contacts,omitempty"`
9240
9241
9242 Id int64 `json:"id,omitempty,string"`
9243
9244
9245
9246 Kind string `json:"kind,omitempty"`
9247
9248
9249
9250 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9251
9252
9253 Name string `json:"name,omitempty"`
9254
9255
9256 Notes string `json:"notes,omitempty"`
9257
9258
9259
9260 PlanningTermId int64 `json:"planningTermId,omitempty,string"`
9261
9262
9263 ProjectId int64 `json:"projectId,omitempty,string"`
9264
9265
9266 SellerOrderId string `json:"sellerOrderId,omitempty"`
9267
9268
9269 SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
9270
9271
9272 SiteId googleapi.Int64s `json:"siteId,omitempty"`
9273
9274
9275 SiteNames []string `json:"siteNames,omitempty"`
9276
9277
9278 SubaccountId int64 `json:"subaccountId,omitempty,string"`
9279
9280
9281 TermsAndConditions string `json:"termsAndConditions,omitempty"`
9282
9283
9284
9285 googleapi.ServerResponse `json:"-"`
9286
9287
9288
9289
9290
9291
9292
9293 ForceSendFields []string `json:"-"`
9294
9295
9296
9297
9298
9299
9300
9301 NullFields []string `json:"-"`
9302 }
9303
9304 func (s *Order) MarshalJSON() ([]byte, error) {
9305 type NoMethod Order
9306 raw := NoMethod(*s)
9307 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9308 }
9309
9310
9311 type OrderContact struct {
9312
9313
9314
9315 ContactInfo string `json:"contactInfo,omitempty"`
9316
9317
9318 ContactName string `json:"contactName,omitempty"`
9319
9320
9321 ContactTitle string `json:"contactTitle,omitempty"`
9322
9323
9324
9325
9326
9327
9328
9329 ContactType string `json:"contactType,omitempty"`
9330
9331
9332
9333 SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
9334
9335
9336
9337
9338
9339
9340
9341 ForceSendFields []string `json:"-"`
9342
9343
9344
9345
9346
9347
9348
9349 NullFields []string `json:"-"`
9350 }
9351
9352 func (s *OrderContact) MarshalJSON() ([]byte, error) {
9353 type NoMethod OrderContact
9354 raw := NoMethod(*s)
9355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9356 }
9357
9358
9359 type OrderDocument struct {
9360
9361 AccountId int64 `json:"accountId,omitempty,string"`
9362
9363
9364 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9365
9366
9367
9368
9369 AmendedOrderDocumentId int64 `json:"amendedOrderDocumentId,omitempty,string"`
9370
9371
9372
9373 ApprovedByUserProfileIds googleapi.Int64s `json:"approvedByUserProfileIds,omitempty"`
9374
9375
9376 Cancelled bool `json:"cancelled,omitempty"`
9377
9378
9379 CreatedInfo *LastModifiedInfo `json:"createdInfo,omitempty"`
9380
9381 EffectiveDate string `json:"effectiveDate,omitempty"`
9382
9383
9384 Id int64 `json:"id,omitempty,string"`
9385
9386
9387
9388 Kind string `json:"kind,omitempty"`
9389
9390
9391
9392 LastSentRecipients []string `json:"lastSentRecipients,omitempty"`
9393
9394 LastSentTime string `json:"lastSentTime,omitempty"`
9395
9396
9397 OrderId int64 `json:"orderId,omitempty,string"`
9398
9399
9400 ProjectId int64 `json:"projectId,omitempty,string"`
9401
9402
9403 Signed bool `json:"signed,omitempty"`
9404
9405
9406 SubaccountId int64 `json:"subaccountId,omitempty,string"`
9407
9408
9409 Title string `json:"title,omitempty"`
9410
9411
9412
9413
9414
9415
9416 Type string `json:"type,omitempty"`
9417
9418
9419
9420 googleapi.ServerResponse `json:"-"`
9421
9422
9423
9424
9425
9426
9427
9428 ForceSendFields []string `json:"-"`
9429
9430
9431
9432
9433
9434
9435
9436 NullFields []string `json:"-"`
9437 }
9438
9439 func (s *OrderDocument) MarshalJSON() ([]byte, error) {
9440 type NoMethod OrderDocument
9441 raw := NoMethod(*s)
9442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9443 }
9444
9445
9446 type OrderDocumentsListResponse struct {
9447
9448
9449 Kind string `json:"kind,omitempty"`
9450
9451
9452
9453 NextPageToken string `json:"nextPageToken,omitempty"`
9454
9455
9456 OrderDocuments []*OrderDocument `json:"orderDocuments,omitempty"`
9457
9458
9459
9460 googleapi.ServerResponse `json:"-"`
9461
9462
9463
9464
9465
9466
9467
9468 ForceSendFields []string `json:"-"`
9469
9470
9471
9472
9473
9474
9475
9476 NullFields []string `json:"-"`
9477 }
9478
9479 func (s *OrderDocumentsListResponse) MarshalJSON() ([]byte, error) {
9480 type NoMethod OrderDocumentsListResponse
9481 raw := NoMethod(*s)
9482 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9483 }
9484
9485
9486 type OrdersListResponse struct {
9487
9488
9489 Kind string `json:"kind,omitempty"`
9490
9491
9492
9493 NextPageToken string `json:"nextPageToken,omitempty"`
9494
9495
9496 Orders []*Order `json:"orders,omitempty"`
9497
9498
9499
9500 googleapi.ServerResponse `json:"-"`
9501
9502
9503
9504
9505
9506
9507
9508 ForceSendFields []string `json:"-"`
9509
9510
9511
9512
9513
9514
9515
9516 NullFields []string `json:"-"`
9517 }
9518
9519 func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
9520 type NoMethod OrdersListResponse
9521 raw := NoMethod(*s)
9522 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9523 }
9524
9525
9526
9527 type PathToConversionReportCompatibleFields struct {
9528
9529
9530 ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
9531
9532
9533
9534
9535 CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
9536
9537
9538
9539 Kind string `json:"kind,omitempty"`
9540
9541
9542
9543 Metrics []*Metric `json:"metrics,omitempty"`
9544
9545
9546
9547
9548 PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
9549
9550
9551
9552
9553
9554
9555
9556
9557 ForceSendFields []string `json:"-"`
9558
9559
9560
9561
9562
9563
9564
9565
9566 NullFields []string `json:"-"`
9567 }
9568
9569 func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
9570 type NoMethod PathToConversionReportCompatibleFields
9571 raw := NoMethod(*s)
9572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9573 }
9574
9575
9576 type Placement struct {
9577
9578
9579 AccountId int64 `json:"accountId,omitempty,string"`
9580
9581
9582
9583
9584 AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
9585
9586
9587
9588
9589 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
9590
9591
9592
9593 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9594
9595
9596
9597 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9598
9599
9600 Archived bool `json:"archived,omitempty"`
9601
9602
9603
9604 CampaignId int64 `json:"campaignId,omitempty,string"`
9605
9606
9607
9608 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9609
9610
9611 Comment string `json:"comment,omitempty"`
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628 Compatibility string `json:"compatibility,omitempty"`
9629
9630
9631
9632 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9633
9634
9635
9636 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9637
9638
9639
9640
9641
9642 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9643
9644
9645
9646 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9647
9648
9649 ExternalId string `json:"externalId,omitempty"`
9650
9651
9652 Id int64 `json:"id,omitempty,string"`
9653
9654
9655
9656 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9657
9658
9659
9660 KeyName string `json:"keyName,omitempty"`
9661
9662
9663
9664 Kind string `json:"kind,omitempty"`
9665
9666
9667
9668 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9669
9670
9671 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
9672
9673
9674
9675 Name string `json:"name,omitempty"`
9676
9677
9678
9679 PaymentApproved bool `json:"paymentApproved,omitempty"`
9680
9681
9682
9683
9684
9685
9686
9687 PaymentSource string `json:"paymentSource,omitempty"`
9688
9689
9690 PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
9691
9692
9693
9694 PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
9695
9696
9697
9698 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9699
9700
9701
9702
9703 PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9704
9705
9706
9707
9708
9709
9710
9711 Primary bool `json:"primary,omitempty"`
9712
9713
9714
9715 PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
9716
9717
9718
9719
9720
9721 SiteId int64 `json:"siteId,omitempty,string"`
9722
9723
9724
9725 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
9726
9727
9728
9729
9730 Size *Size `json:"size,omitempty"`
9731
9732
9733
9734 SslRequired bool `json:"sslRequired,omitempty"`
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745 Status string `json:"status,omitempty"`
9746
9747
9748
9749 SubaccountId int64 `json:"subaccountId,omitempty,string"`
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787 TagFormats []string `json:"tagFormats,omitempty"`
9788
9789
9790 TagSetting *TagSetting `json:"tagSetting,omitempty"`
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800 VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
9801
9802
9803
9804
9805 VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818 VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
9819
9820
9821
9822 googleapi.ServerResponse `json:"-"`
9823
9824
9825
9826
9827
9828
9829
9830 ForceSendFields []string `json:"-"`
9831
9832
9833
9834
9835
9836
9837
9838 NullFields []string `json:"-"`
9839 }
9840
9841 func (s *Placement) MarshalJSON() ([]byte, error) {
9842 type NoMethod Placement
9843 raw := NoMethod(*s)
9844 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9845 }
9846
9847
9848 type PlacementAssignment struct {
9849
9850
9851 Active bool `json:"active,omitempty"`
9852
9853
9854
9855 PlacementId int64 `json:"placementId,omitempty,string"`
9856
9857
9858
9859 PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
9860
9861
9862
9863
9864 SslRequired bool `json:"sslRequired,omitempty"`
9865
9866
9867
9868
9869
9870
9871
9872 ForceSendFields []string `json:"-"`
9873
9874
9875
9876
9877
9878
9879
9880 NullFields []string `json:"-"`
9881 }
9882
9883 func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
9884 type NoMethod PlacementAssignment
9885 raw := NoMethod(*s)
9886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9887 }
9888
9889
9890 type PlacementGroup struct {
9891
9892
9893 AccountId int64 `json:"accountId,omitempty,string"`
9894
9895
9896
9897 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9898
9899
9900
9901 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9902
9903
9904 Archived bool `json:"archived,omitempty"`
9905
9906
9907
9908 CampaignId int64 `json:"campaignId,omitempty,string"`
9909
9910
9911
9912 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
9913
9914
9915
9916 ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
9917
9918
9919 Comment string `json:"comment,omitempty"`
9920
9921
9922
9923 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
9924
9925
9926
9927 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
9928
9929
9930
9931
9932
9933 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
9934
9935
9936
9937 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
9938
9939
9940 ExternalId string `json:"externalId,omitempty"`
9941
9942
9943
9944 Id int64 `json:"id,omitempty,string"`
9945
9946
9947
9948 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
9949
9950
9951
9952 Kind string `json:"kind,omitempty"`
9953
9954
9955
9956 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9957
9958
9959
9960 Name string `json:"name,omitempty"`
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973 PlacementGroupType string `json:"placementGroupType,omitempty"`
9974
9975
9976
9977 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
9978
9979
9980
9981 PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
9982
9983
9984
9985
9986
9987 PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
9988
9989
9990
9991 PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
9992
9993
9994
9995
9996
9997 SiteId int64 `json:"siteId,omitempty,string"`
9998
9999
10000
10001 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
10002
10003
10004
10005 SubaccountId int64 `json:"subaccountId,omitempty,string"`
10006
10007
10008
10009 googleapi.ServerResponse `json:"-"`
10010
10011
10012
10013
10014
10015
10016
10017 ForceSendFields []string `json:"-"`
10018
10019
10020
10021
10022
10023
10024
10025 NullFields []string `json:"-"`
10026 }
10027
10028 func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
10029 type NoMethod PlacementGroup
10030 raw := NoMethod(*s)
10031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10032 }
10033
10034
10035 type PlacementGroupsListResponse struct {
10036
10037
10038 Kind string `json:"kind,omitempty"`
10039
10040
10041
10042 NextPageToken string `json:"nextPageToken,omitempty"`
10043
10044
10045 PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
10046
10047
10048
10049 googleapi.ServerResponse `json:"-"`
10050
10051
10052
10053
10054
10055
10056
10057 ForceSendFields []string `json:"-"`
10058
10059
10060
10061
10062
10063
10064
10065 NullFields []string `json:"-"`
10066 }
10067
10068 func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
10069 type NoMethod PlacementGroupsListResponse
10070 raw := NoMethod(*s)
10071 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10072 }
10073
10074
10075 type PlacementStrategiesListResponse struct {
10076
10077
10078 Kind string `json:"kind,omitempty"`
10079
10080
10081
10082 NextPageToken string `json:"nextPageToken,omitempty"`
10083
10084
10085 PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
10086
10087
10088
10089 googleapi.ServerResponse `json:"-"`
10090
10091
10092
10093
10094
10095
10096
10097 ForceSendFields []string `json:"-"`
10098
10099
10100
10101
10102
10103
10104
10105 NullFields []string `json:"-"`
10106 }
10107
10108 func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
10109 type NoMethod PlacementStrategiesListResponse
10110 raw := NoMethod(*s)
10111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10112 }
10113
10114
10115 type PlacementStrategy struct {
10116
10117
10118 AccountId int64 `json:"accountId,omitempty,string"`
10119
10120
10121
10122 Id int64 `json:"id,omitempty,string"`
10123
10124
10125
10126 Kind string `json:"kind,omitempty"`
10127
10128
10129
10130
10131 Name string `json:"name,omitempty"`
10132
10133
10134
10135 googleapi.ServerResponse `json:"-"`
10136
10137
10138
10139
10140
10141
10142
10143 ForceSendFields []string `json:"-"`
10144
10145
10146
10147
10148
10149
10150
10151 NullFields []string `json:"-"`
10152 }
10153
10154 func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
10155 type NoMethod PlacementStrategy
10156 raw := NoMethod(*s)
10157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10158 }
10159
10160
10161 type PlacementTag struct {
10162
10163 PlacementId int64 `json:"placementId,omitempty,string"`
10164
10165
10166 TagDatas []*TagData `json:"tagDatas,omitempty"`
10167
10168
10169
10170
10171
10172
10173
10174 ForceSendFields []string `json:"-"`
10175
10176
10177
10178
10179
10180
10181
10182 NullFields []string `json:"-"`
10183 }
10184
10185 func (s *PlacementTag) MarshalJSON() ([]byte, error) {
10186 type NoMethod PlacementTag
10187 raw := NoMethod(*s)
10188 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10189 }
10190
10191
10192 type PlacementsGenerateTagsResponse struct {
10193
10194
10195 Kind string `json:"kind,omitempty"`
10196
10197
10198 PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
10199
10200
10201
10202 googleapi.ServerResponse `json:"-"`
10203
10204
10205
10206
10207
10208
10209
10210 ForceSendFields []string `json:"-"`
10211
10212
10213
10214
10215
10216
10217
10218 NullFields []string `json:"-"`
10219 }
10220
10221 func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
10222 type NoMethod PlacementsGenerateTagsResponse
10223 raw := NoMethod(*s)
10224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10225 }
10226
10227
10228 type PlacementsListResponse struct {
10229
10230
10231 Kind string `json:"kind,omitempty"`
10232
10233
10234
10235 NextPageToken string `json:"nextPageToken,omitempty"`
10236
10237
10238 Placements []*Placement `json:"placements,omitempty"`
10239
10240
10241
10242 googleapi.ServerResponse `json:"-"`
10243
10244
10245
10246
10247
10248
10249
10250 ForceSendFields []string `json:"-"`
10251
10252
10253
10254
10255
10256
10257
10258 NullFields []string `json:"-"`
10259 }
10260
10261 func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
10262 type NoMethod PlacementsListResponse
10263 raw := NoMethod(*s)
10264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10265 }
10266
10267
10268
10269 type PlatformType struct {
10270
10271 Id int64 `json:"id,omitempty,string"`
10272
10273
10274
10275 Kind string `json:"kind,omitempty"`
10276
10277
10278 Name string `json:"name,omitempty"`
10279
10280
10281
10282 googleapi.ServerResponse `json:"-"`
10283
10284
10285
10286
10287
10288
10289
10290 ForceSendFields []string `json:"-"`
10291
10292
10293
10294
10295
10296
10297
10298 NullFields []string `json:"-"`
10299 }
10300
10301 func (s *PlatformType) MarshalJSON() ([]byte, error) {
10302 type NoMethod PlatformType
10303 raw := NoMethod(*s)
10304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10305 }
10306
10307
10308 type PlatformTypesListResponse struct {
10309
10310
10311 Kind string `json:"kind,omitempty"`
10312
10313
10314 PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
10315
10316
10317
10318 googleapi.ServerResponse `json:"-"`
10319
10320
10321
10322
10323
10324
10325
10326 ForceSendFields []string `json:"-"`
10327
10328
10329
10330
10331
10332
10333
10334 NullFields []string `json:"-"`
10335 }
10336
10337 func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
10338 type NoMethod PlatformTypesListResponse
10339 raw := NoMethod(*s)
10340 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10341 }
10342
10343
10344 type PopupWindowProperties struct {
10345
10346
10347
10348 Dimension *Size `json:"dimension,omitempty"`
10349
10350
10351
10352 Offset *OffsetPosition `json:"offset,omitempty"`
10353
10354
10355
10356
10357
10358
10359
10360 PositionType string `json:"positionType,omitempty"`
10361
10362
10363 ShowAddressBar bool `json:"showAddressBar,omitempty"`
10364
10365
10366 ShowMenuBar bool `json:"showMenuBar,omitempty"`
10367
10368
10369 ShowScrollBar bool `json:"showScrollBar,omitempty"`
10370
10371
10372 ShowStatusBar bool `json:"showStatusBar,omitempty"`
10373
10374
10375 ShowToolBar bool `json:"showToolBar,omitempty"`
10376
10377
10378 Title string `json:"title,omitempty"`
10379
10380
10381
10382
10383
10384
10385
10386 ForceSendFields []string `json:"-"`
10387
10388
10389
10390
10391
10392
10393
10394 NullFields []string `json:"-"`
10395 }
10396
10397 func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
10398 type NoMethod PopupWindowProperties
10399 raw := NoMethod(*s)
10400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10401 }
10402
10403
10404
10405 type PostalCode struct {
10406
10407 Code string `json:"code,omitempty"`
10408
10409
10410
10411 CountryCode string `json:"countryCode,omitempty"`
10412
10413
10414
10415 CountryDartId int64 `json:"countryDartId,omitempty,string"`
10416
10417
10418 Id string `json:"id,omitempty"`
10419
10420
10421
10422 Kind string `json:"kind,omitempty"`
10423
10424
10425
10426 googleapi.ServerResponse `json:"-"`
10427
10428
10429
10430
10431
10432
10433
10434 ForceSendFields []string `json:"-"`
10435
10436
10437
10438
10439
10440
10441
10442 NullFields []string `json:"-"`
10443 }
10444
10445 func (s *PostalCode) MarshalJSON() ([]byte, error) {
10446 type NoMethod PostalCode
10447 raw := NoMethod(*s)
10448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10449 }
10450
10451
10452 type PostalCodesListResponse struct {
10453
10454
10455 Kind string `json:"kind,omitempty"`
10456
10457
10458 PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
10459
10460
10461
10462 googleapi.ServerResponse `json:"-"`
10463
10464
10465
10466
10467
10468
10469
10470 ForceSendFields []string `json:"-"`
10471
10472
10473
10474
10475
10476
10477
10478 NullFields []string `json:"-"`
10479 }
10480
10481 func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
10482 type NoMethod PostalCodesListResponse
10483 raw := NoMethod(*s)
10484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10485 }
10486
10487
10488 type Pricing struct {
10489
10490
10491
10492
10493
10494
10495 CapCostType string `json:"capCostType,omitempty"`
10496
10497 EndDate string `json:"endDate,omitempty"`
10498
10499
10500
10501
10502 Flights []*Flight `json:"flights,omitempty"`
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516 GroupType string `json:"groupType,omitempty"`
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529 PricingType string `json:"pricingType,omitempty"`
10530
10531 StartDate string `json:"startDate,omitempty"`
10532
10533
10534
10535
10536
10537
10538
10539 ForceSendFields []string `json:"-"`
10540
10541
10542
10543
10544
10545
10546
10547 NullFields []string `json:"-"`
10548 }
10549
10550 func (s *Pricing) MarshalJSON() ([]byte, error) {
10551 type NoMethod Pricing
10552 raw := NoMethod(*s)
10553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10554 }
10555
10556
10557 type PricingSchedule struct {
10558
10559
10560
10561
10562
10563
10564 CapCostOption string `json:"capCostOption,omitempty"`
10565
10566
10567 DisregardOverdelivery bool `json:"disregardOverdelivery,omitempty"`
10568
10569 EndDate string `json:"endDate,omitempty"`
10570
10571
10572
10573 Flighted bool `json:"flighted,omitempty"`
10574
10575
10576
10577
10578 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
10579
10580
10581 PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593 PricingType string `json:"pricingType,omitempty"`
10594
10595 StartDate string `json:"startDate,omitempty"`
10596
10597 TestingStartDate string `json:"testingStartDate,omitempty"`
10598
10599
10600
10601
10602
10603
10604
10605 ForceSendFields []string `json:"-"`
10606
10607
10608
10609
10610
10611
10612
10613 NullFields []string `json:"-"`
10614 }
10615
10616 func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
10617 type NoMethod PricingSchedule
10618 raw := NoMethod(*s)
10619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10620 }
10621
10622
10623 type PricingSchedulePricingPeriod struct {
10624 EndDate string `json:"endDate,omitempty"`
10625
10626
10627 PricingComment string `json:"pricingComment,omitempty"`
10628
10629
10630
10631
10632 RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
10633
10634 StartDate string `json:"startDate,omitempty"`
10635
10636
10637
10638 Units int64 `json:"units,omitempty,string"`
10639
10640
10641
10642
10643
10644
10645
10646 ForceSendFields []string `json:"-"`
10647
10648
10649
10650
10651
10652
10653
10654 NullFields []string `json:"-"`
10655 }
10656
10657 func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
10658 type NoMethod PricingSchedulePricingPeriod
10659 raw := NoMethod(*s)
10660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10661 }
10662
10663
10664 type Project struct {
10665
10666 AccountId int64 `json:"accountId,omitempty,string"`
10667
10668
10669 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681 AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
10682
10683
10684
10685
10686
10687
10688 AudienceGender string `json:"audienceGender,omitempty"`
10689
10690
10691
10692
10693
10694 Budget int64 `json:"budget,omitempty,string"`
10695
10696
10697 ClientBillingCode string `json:"clientBillingCode,omitempty"`
10698
10699
10700 ClientName string `json:"clientName,omitempty"`
10701
10702 EndDate string `json:"endDate,omitempty"`
10703
10704
10705 Id int64 `json:"id,omitempty,string"`
10706
10707
10708
10709 Kind string `json:"kind,omitempty"`
10710
10711
10712
10713 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
10714
10715
10716 Name string `json:"name,omitempty"`
10717
10718
10719 Overview string `json:"overview,omitempty"`
10720
10721 StartDate string `json:"startDate,omitempty"`
10722
10723
10724 SubaccountId int64 `json:"subaccountId,omitempty,string"`
10725
10726
10727 TargetClicks int64 `json:"targetClicks,omitempty,string"`
10728
10729
10730
10731 TargetConversions int64 `json:"targetConversions,omitempty,string"`
10732
10733
10734 TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
10735
10736
10737 TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
10738
10739
10740
10741 TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
10742
10743
10744 TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
10745
10746
10747
10748 TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
10749
10750
10751
10752 googleapi.ServerResponse `json:"-"`
10753
10754
10755
10756
10757
10758
10759
10760 ForceSendFields []string `json:"-"`
10761
10762
10763
10764
10765
10766
10767
10768 NullFields []string `json:"-"`
10769 }
10770
10771 func (s *Project) MarshalJSON() ([]byte, error) {
10772 type NoMethod Project
10773 raw := NoMethod(*s)
10774 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10775 }
10776
10777
10778 type ProjectsListResponse struct {
10779
10780
10781 Kind string `json:"kind,omitempty"`
10782
10783
10784
10785 NextPageToken string `json:"nextPageToken,omitempty"`
10786
10787
10788 Projects []*Project `json:"projects,omitempty"`
10789
10790
10791
10792 googleapi.ServerResponse `json:"-"`
10793
10794
10795
10796
10797
10798
10799
10800 ForceSendFields []string `json:"-"`
10801
10802
10803
10804
10805
10806
10807
10808 NullFields []string `json:"-"`
10809 }
10810
10811 func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
10812 type NoMethod ProjectsListResponse
10813 raw := NoMethod(*s)
10814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10815 }
10816
10817
10818
10819 type ReachReportCompatibleFields struct {
10820
10821
10822 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10823
10824
10825
10826 Dimensions []*Dimension `json:"dimensions,omitempty"`
10827
10828
10829
10830 Kind string `json:"kind,omitempty"`
10831
10832
10833
10834 Metrics []*Metric `json:"metrics,omitempty"`
10835
10836
10837
10838
10839 PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
10840
10841
10842
10843 ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
10844
10845
10846
10847
10848
10849
10850
10851 ForceSendFields []string `json:"-"`
10852
10853
10854
10855
10856
10857
10858
10859
10860 NullFields []string `json:"-"`
10861 }
10862
10863 func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
10864 type NoMethod ReachReportCompatibleFields
10865 raw := NoMethod(*s)
10866 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10867 }
10868
10869
10870 type Recipient struct {
10871
10872
10873
10874
10875
10876 DeliveryType string `json:"deliveryType,omitempty"`
10877
10878
10879 Email string `json:"email,omitempty"`
10880
10881
10882
10883 Kind string `json:"kind,omitempty"`
10884
10885
10886
10887
10888
10889
10890
10891 ForceSendFields []string `json:"-"`
10892
10893
10894
10895
10896
10897
10898
10899 NullFields []string `json:"-"`
10900 }
10901
10902 func (s *Recipient) MarshalJSON() ([]byte, error) {
10903 type NoMethod Recipient
10904 raw := NoMethod(*s)
10905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10906 }
10907
10908
10909
10910 type Region struct {
10911
10912
10913 CountryCode string `json:"countryCode,omitempty"`
10914
10915
10916 CountryDartId int64 `json:"countryDartId,omitempty,string"`
10917
10918
10919 DartId int64 `json:"dartId,omitempty,string"`
10920
10921
10922
10923 Kind string `json:"kind,omitempty"`
10924
10925
10926 Name string `json:"name,omitempty"`
10927
10928
10929 RegionCode string `json:"regionCode,omitempty"`
10930
10931
10932
10933
10934
10935
10936
10937 ForceSendFields []string `json:"-"`
10938
10939
10940
10941
10942
10943
10944
10945 NullFields []string `json:"-"`
10946 }
10947
10948 func (s *Region) MarshalJSON() ([]byte, error) {
10949 type NoMethod Region
10950 raw := NoMethod(*s)
10951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10952 }
10953
10954
10955 type RegionsListResponse struct {
10956
10957
10958 Kind string `json:"kind,omitempty"`
10959
10960
10961 Regions []*Region `json:"regions,omitempty"`
10962
10963
10964
10965 googleapi.ServerResponse `json:"-"`
10966
10967
10968
10969
10970
10971
10972
10973 ForceSendFields []string `json:"-"`
10974
10975
10976
10977
10978
10979
10980
10981 NullFields []string `json:"-"`
10982 }
10983
10984 func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
10985 type NoMethod RegionsListResponse
10986 raw := NoMethod(*s)
10987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10988 }
10989
10990
10991
10992
10993
10994
10995
10996
10997 type RemarketingList struct {
10998
10999
11000 AccountId int64 `json:"accountId,omitempty,string"`
11001
11002
11003 Active bool `json:"active,omitempty"`
11004
11005
11006
11007 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11008
11009
11010
11011 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11012
11013
11014 Description string `json:"description,omitempty"`
11015
11016
11017 Id int64 `json:"id,omitempty,string"`
11018
11019
11020
11021 Kind string `json:"kind,omitempty"`
11022
11023
11024
11025
11026 LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11027
11028
11029
11030 ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
11031
11032
11033
11034 ListSize int64 `json:"listSize,omitempty,string"`
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050 ListSource string `json:"listSource,omitempty"`
11051
11052
11053
11054 Name string `json:"name,omitempty"`
11055
11056
11057
11058
11059 SubaccountId int64 `json:"subaccountId,omitempty,string"`
11060
11061
11062
11063 googleapi.ServerResponse `json:"-"`
11064
11065
11066
11067
11068
11069
11070
11071 ForceSendFields []string `json:"-"`
11072
11073
11074
11075
11076
11077
11078
11079 NullFields []string `json:"-"`
11080 }
11081
11082 func (s *RemarketingList) MarshalJSON() ([]byte, error) {
11083 type NoMethod RemarketingList
11084 raw := NoMethod(*s)
11085 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11086 }
11087
11088
11089
11090
11091
11092 type RemarketingListShare struct {
11093
11094
11095 Kind string `json:"kind,omitempty"`
11096
11097
11098
11099 RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
11100
11101
11102 SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
11103
11104
11105
11106 SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
11107
11108
11109
11110 googleapi.ServerResponse `json:"-"`
11111
11112
11113
11114
11115
11116
11117
11118 ForceSendFields []string `json:"-"`
11119
11120
11121
11122
11123
11124
11125
11126 NullFields []string `json:"-"`
11127 }
11128
11129 func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
11130 type NoMethod RemarketingListShare
11131 raw := NoMethod(*s)
11132 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11133 }
11134
11135
11136 type RemarketingListsListResponse struct {
11137
11138
11139 Kind string `json:"kind,omitempty"`
11140
11141
11142
11143 NextPageToken string `json:"nextPageToken,omitempty"`
11144
11145
11146 RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
11147
11148
11149
11150 googleapi.ServerResponse `json:"-"`
11151
11152
11153
11154
11155
11156
11157
11158 ForceSendFields []string `json:"-"`
11159
11160
11161
11162
11163
11164
11165
11166 NullFields []string `json:"-"`
11167 }
11168
11169 func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11170 type NoMethod RemarketingListsListResponse
11171 raw := NoMethod(*s)
11172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11173 }
11174
11175
11176 type Report struct {
11177
11178 AccountId int64 `json:"accountId,omitempty,string"`
11179
11180
11181 Criteria *ReportCriteria `json:"criteria,omitempty"`
11182
11183
11184
11185 CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
11186
11187
11188 Delivery *ReportDelivery `json:"delivery,omitempty"`
11189
11190
11191 Etag string `json:"etag,omitempty"`
11192
11193
11194
11195 FileName string `json:"fileName,omitempty"`
11196
11197
11198
11199 FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209 Format string `json:"format,omitempty"`
11210
11211
11212 Id int64 `json:"id,omitempty,string"`
11213
11214
11215 Kind string `json:"kind,omitempty"`
11216
11217
11218
11219 LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
11220
11221
11222 Name string `json:"name,omitempty"`
11223
11224
11225 OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
11226
11227
11228
11229 PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
11230
11231
11232 ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
11233
11234
11235
11236
11237 Schedule *ReportSchedule `json:"schedule,omitempty"`
11238
11239
11240
11241 SubAccountId int64 `json:"subAccountId,omitempty,string"`
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251 Type string `json:"type,omitempty"`
11252
11253
11254
11255 googleapi.ServerResponse `json:"-"`
11256
11257
11258
11259
11260
11261
11262
11263 ForceSendFields []string `json:"-"`
11264
11265
11266
11267
11268
11269
11270
11271 NullFields []string `json:"-"`
11272 }
11273
11274 func (s *Report) MarshalJSON() ([]byte, error) {
11275 type NoMethod Report
11276 raw := NoMethod(*s)
11277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11278 }
11279
11280
11281 type ReportCriteria struct {
11282
11283 Activities *Activities `json:"activities,omitempty"`
11284
11285
11286 CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11287
11288
11289 DateRange *DateRange `json:"dateRange,omitempty"`
11290
11291
11292
11293
11294 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11295
11296
11297
11298 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11299
11300
11301 MetricNames []string `json:"metricNames,omitempty"`
11302
11303
11304
11305
11306
11307
11308
11309 ForceSendFields []string `json:"-"`
11310
11311
11312
11313
11314
11315
11316
11317 NullFields []string `json:"-"`
11318 }
11319
11320 func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
11321 type NoMethod ReportCriteria
11322 raw := NoMethod(*s)
11323 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11324 }
11325
11326
11327
11328 type ReportCrossDimensionReachCriteria struct {
11329
11330 Breakdown []*SortedDimension `json:"breakdown,omitempty"`
11331
11332
11333 DateRange *DateRange `json:"dateRange,omitempty"`
11334
11335
11336
11337
11338
11339
11340
11341
11342 Dimension string `json:"dimension,omitempty"`
11343
11344
11345
11346 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11347
11348
11349 MetricNames []string `json:"metricNames,omitempty"`
11350
11351
11352
11353 OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
11354
11355
11356 Pivoted bool `json:"pivoted,omitempty"`
11357
11358
11359
11360
11361
11362
11363
11364 ForceSendFields []string `json:"-"`
11365
11366
11367
11368
11369
11370
11371
11372 NullFields []string `json:"-"`
11373 }
11374
11375 func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
11376 type NoMethod ReportCrossDimensionReachCriteria
11377 raw := NoMethod(*s)
11378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11379 }
11380
11381
11382 type ReportDelivery struct {
11383
11384 EmailOwner bool `json:"emailOwner,omitempty"`
11385
11386
11387
11388
11389
11390
11391
11392 EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
11393
11394
11395 Message string `json:"message,omitempty"`
11396
11397
11398 Recipients []*Recipient `json:"recipients,omitempty"`
11399
11400
11401
11402
11403
11404
11405
11406 ForceSendFields []string `json:"-"`
11407
11408
11409
11410
11411
11412
11413
11414 NullFields []string `json:"-"`
11415 }
11416
11417 func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
11418 type NoMethod ReportDelivery
11419 raw := NoMethod(*s)
11420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11421 }
11422
11423
11424
11425 type ReportFloodlightCriteria struct {
11426
11427
11428 CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11429
11430
11431 DateRange *DateRange `json:"dateRange,omitempty"`
11432
11433
11434
11435
11436 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11437
11438
11439 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11440
11441
11442
11443
11444
11445 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11446
11447
11448 MetricNames []string `json:"metricNames,omitempty"`
11449
11450
11451 ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
11452
11453
11454
11455
11456
11457
11458
11459
11460 ForceSendFields []string `json:"-"`
11461
11462
11463
11464
11465
11466
11467
11468
11469 NullFields []string `json:"-"`
11470 }
11471
11472 func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
11473 type NoMethod ReportFloodlightCriteria
11474 raw := NoMethod(*s)
11475 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11476 }
11477
11478
11479
11480 type ReportFloodlightCriteriaReportProperties struct {
11481
11482
11483 IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11484
11485
11486
11487
11488
11489
11490 IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11491
11492
11493
11494
11495
11496 IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11497
11498
11499
11500
11501
11502
11503
11504
11505 ForceSendFields []string `json:"-"`
11506
11507
11508
11509
11510
11511
11512
11513
11514 NullFields []string `json:"-"`
11515 }
11516
11517 func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11518 type NoMethod ReportFloodlightCriteriaReportProperties
11519 raw := NoMethod(*s)
11520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11521 }
11522
11523
11524
11525 type ReportPathToConversionCriteria struct {
11526
11527 ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
11528
11529
11530
11531 ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
11532
11533
11534
11535 CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
11536
11537
11538
11539 CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
11540
11541
11542 DateRange *DateRange `json:"dateRange,omitempty"`
11543
11544
11545
11546
11547
11548 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
11549
11550
11551 MetricNames []string `json:"metricNames,omitempty"`
11552
11553
11554
11555 PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
11556
11557
11558 ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
11559
11560
11561
11562
11563
11564
11565
11566 ForceSendFields []string `json:"-"`
11567
11568
11569
11570
11571
11572
11573
11574
11575 NullFields []string `json:"-"`
11576 }
11577
11578 func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
11579 type NoMethod ReportPathToConversionCriteria
11580 raw := NoMethod(*s)
11581 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11582 }
11583
11584
11585
11586 type ReportPathToConversionCriteriaReportProperties struct {
11587
11588
11589
11590
11591 ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
11592
11593
11594
11595
11596
11597 ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
11598
11599
11600 IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
11601
11602
11603
11604
11605
11606
11607 IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
11608
11609
11610
11611
11612
11613 IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
11614
11615
11616
11617
11618
11619
11620 MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
11621
11622
11623
11624
11625
11626
11627 MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
11628
11629
11630
11631
11632 MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
11633
11634
11635 PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
11636
11637
11638
11639
11640
11641
11642
11643
11644 ForceSendFields []string `json:"-"`
11645
11646
11647
11648
11649
11650
11651
11652
11653 NullFields []string `json:"-"`
11654 }
11655
11656 func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
11657 type NoMethod ReportPathToConversionCriteriaReportProperties
11658 raw := NoMethod(*s)
11659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11660 }
11661
11662
11663
11664 type ReportReachCriteria struct {
11665
11666 Activities *Activities `json:"activities,omitempty"`
11667
11668
11669 CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
11670
11671
11672 DateRange *DateRange `json:"dateRange,omitempty"`
11673
11674
11675
11676
11677 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
11678
11679
11680 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
11681
11682
11683
11684
11685 EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
11686
11687
11688 MetricNames []string `json:"metricNames,omitempty"`
11689
11690
11691
11692 ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
11693
11694
11695
11696
11697
11698
11699
11700 ForceSendFields []string `json:"-"`
11701
11702
11703
11704
11705
11706
11707
11708 NullFields []string `json:"-"`
11709 }
11710
11711 func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
11712 type NoMethod ReportReachCriteria
11713 raw := NoMethod(*s)
11714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11715 }
11716
11717
11718
11719
11720 type ReportSchedule struct {
11721
11722
11723 Active bool `json:"active,omitempty"`
11724
11725
11726
11727
11728 Every int64 `json:"every,omitempty"`
11729
11730 ExpirationDate string `json:"expirationDate,omitempty"`
11731
11732
11733
11734
11735
11736
11737 Repeats string `json:"repeats,omitempty"`
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750 RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763 RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
11764
11765 StartDate string `json:"startDate,omitempty"`
11766
11767
11768
11769
11770
11771
11772
11773 ForceSendFields []string `json:"-"`
11774
11775
11776
11777
11778
11779
11780
11781 NullFields []string `json:"-"`
11782 }
11783
11784 func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
11785 type NoMethod ReportSchedule
11786 raw := NoMethod(*s)
11787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11788 }
11789
11790
11791
11792 type ReportCompatibleFields struct {
11793
11794
11795 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
11796
11797
11798
11799 Dimensions []*Dimension `json:"dimensions,omitempty"`
11800
11801
11802
11803 Kind string `json:"kind,omitempty"`
11804
11805
11806
11807 Metrics []*Metric `json:"metrics,omitempty"`
11808
11809
11810
11811
11812 PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
11813
11814
11815
11816
11817
11818
11819
11820 ForceSendFields []string `json:"-"`
11821
11822
11823
11824
11825
11826
11827
11828
11829 NullFields []string `json:"-"`
11830 }
11831
11832 func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
11833 type NoMethod ReportCompatibleFields
11834 raw := NoMethod(*s)
11835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11836 }
11837
11838
11839 type ReportList struct {
11840
11841 Etag string `json:"etag,omitempty"`
11842
11843
11844 Items []*Report `json:"items,omitempty"`
11845
11846
11847 Kind string `json:"kind,omitempty"`
11848
11849
11850
11851
11852
11853 NextPageToken string `json:"nextPageToken,omitempty"`
11854
11855
11856
11857 googleapi.ServerResponse `json:"-"`
11858
11859
11860
11861
11862
11863
11864
11865 ForceSendFields []string `json:"-"`
11866
11867
11868
11869
11870
11871
11872
11873 NullFields []string `json:"-"`
11874 }
11875
11876 func (s *ReportList) MarshalJSON() ([]byte, error) {
11877 type NoMethod ReportList
11878 raw := NoMethod(*s)
11879 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11880 }
11881
11882
11883 type ReportsConfiguration struct {
11884
11885
11886
11887
11888 ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
11889
11890
11891
11892 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911 ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
11912
11913
11914
11915
11916
11917
11918
11919
11920 ForceSendFields []string `json:"-"`
11921
11922
11923
11924
11925
11926
11927
11928
11929 NullFields []string `json:"-"`
11930 }
11931
11932 func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
11933 type NoMethod ReportsConfiguration
11934 raw := NoMethod(*s)
11935 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11936 }
11937
11938
11939 type RichMediaExitOverride struct {
11940
11941
11942 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
11943
11944
11945
11946 Enabled bool `json:"enabled,omitempty"`
11947
11948
11949
11950 ExitId int64 `json:"exitId,omitempty,string"`
11951
11952
11953
11954
11955
11956
11957
11958 ForceSendFields []string `json:"-"`
11959
11960
11961
11962
11963
11964
11965
11966
11967 NullFields []string `json:"-"`
11968 }
11969
11970 func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
11971 type NoMethod RichMediaExitOverride
11972 raw := NoMethod(*s)
11973 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11974 }
11975
11976
11977
11978 type Rule struct {
11979
11980
11981 AssetId int64 `json:"assetId,omitempty,string"`
11982
11983
11984 Name string `json:"name,omitempty"`
11985
11986
11987
11988
11989 TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
11990
11991
11992
11993
11994
11995
11996
11997 ForceSendFields []string `json:"-"`
11998
11999
12000
12001
12002
12003
12004
12005 NullFields []string `json:"-"`
12006 }
12007
12008 func (s *Rule) MarshalJSON() ([]byte, error) {
12009 type NoMethod Rule
12010 raw := NoMethod(*s)
12011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12012 }
12013
12014
12015 type Site struct {
12016
12017
12018 AccountId int64 `json:"accountId,omitempty,string"`
12019
12020
12021 Approved bool `json:"approved,omitempty"`
12022
12023
12024
12025 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
12026
12027
12028
12029 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
12030
12031
12032 Id int64 `json:"id,omitempty,string"`
12033
12034
12035
12036 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
12037
12038
12039
12040 KeyName string `json:"keyName,omitempty"`
12041
12042
12043
12044 Kind string `json:"kind,omitempty"`
12045
12046
12047
12048
12049
12050
12051 Name string `json:"name,omitempty"`
12052
12053
12054 SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
12055
12056
12057 SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
12058
12059
12060
12061 SubaccountId int64 `json:"subaccountId,omitempty,string"`
12062
12063
12064
12065
12066
12067 VideoSettings *SiteVideoSettings `json:"videoSettings,omitempty"`
12068
12069
12070
12071 googleapi.ServerResponse `json:"-"`
12072
12073
12074
12075
12076
12077
12078
12079 ForceSendFields []string `json:"-"`
12080
12081
12082
12083
12084
12085
12086
12087 NullFields []string `json:"-"`
12088 }
12089
12090 func (s *Site) MarshalJSON() ([]byte, error) {
12091 type NoMethod Site
12092 raw := NoMethod(*s)
12093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12094 }
12095
12096
12097 type SiteCompanionSetting struct {
12098
12099
12100 CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
12101
12102
12103
12104
12105 EnabledSizes []*Size `json:"enabledSizes,omitempty"`
12106
12107
12108 ImageOnly bool `json:"imageOnly,omitempty"`
12109
12110
12111
12112 Kind string `json:"kind,omitempty"`
12113
12114
12115
12116
12117
12118
12119
12120 ForceSendFields []string `json:"-"`
12121
12122
12123
12124
12125
12126
12127
12128
12129 NullFields []string `json:"-"`
12130 }
12131
12132 func (s *SiteCompanionSetting) MarshalJSON() ([]byte, error) {
12133 type NoMethod SiteCompanionSetting
12134 raw := NoMethod(*s)
12135 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12136 }
12137
12138
12139 type SiteContact struct {
12140
12141 Address string `json:"address,omitempty"`
12142
12143
12144
12145
12146
12147
12148 ContactType string `json:"contactType,omitempty"`
12149
12150
12151 Email string `json:"email,omitempty"`
12152
12153
12154 FirstName string `json:"firstName,omitempty"`
12155
12156
12157
12158 Id int64 `json:"id,omitempty,string"`
12159
12160
12161 LastName string `json:"lastName,omitempty"`
12162
12163
12164 Phone string `json:"phone,omitempty"`
12165
12166
12167 Title string `json:"title,omitempty"`
12168
12169
12170
12171
12172
12173
12174
12175 ForceSendFields []string `json:"-"`
12176
12177
12178
12179
12180
12181
12182
12183 NullFields []string `json:"-"`
12184 }
12185
12186 func (s *SiteContact) MarshalJSON() ([]byte, error) {
12187 type NoMethod SiteContact
12188 raw := NoMethod(*s)
12189 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12190 }
12191
12192
12193 type SiteSettings struct {
12194
12195
12196 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
12197
12198
12199
12200
12201
12202 AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
12203
12204
12205 DisableNewCookie bool `json:"disableNewCookie,omitempty"`
12206
12207
12208
12209 TagSetting *TagSetting `json:"tagSetting,omitempty"`
12210
12211
12212
12213
12214
12215
12216 VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234 VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
12235
12236
12237
12238
12239
12240
12241
12242 ForceSendFields []string `json:"-"`
12243
12244
12245
12246
12247
12248
12249
12250
12251 NullFields []string `json:"-"`
12252 }
12253
12254 func (s *SiteSettings) MarshalJSON() ([]byte, error) {
12255 type NoMethod SiteSettings
12256 raw := NoMethod(*s)
12257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12258 }
12259
12260
12261 type SiteSkippableSetting struct {
12262
12263
12264 Kind string `json:"kind,omitempty"`
12265
12266
12267
12268 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12269
12270
12271
12272 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12273
12274
12275
12276 Skippable bool `json:"skippable,omitempty"`
12277
12278
12279
12280
12281
12282
12283
12284 ForceSendFields []string `json:"-"`
12285
12286
12287
12288
12289
12290
12291
12292 NullFields []string `json:"-"`
12293 }
12294
12295 func (s *SiteSkippableSetting) MarshalJSON() ([]byte, error) {
12296 type NoMethod SiteSkippableSetting
12297 raw := NoMethod(*s)
12298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12299 }
12300
12301
12302 type SiteTranscodeSetting struct {
12303
12304
12305
12306 EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
12307
12308
12309
12310 Kind string `json:"kind,omitempty"`
12311
12312
12313
12314
12315
12316
12317
12318 ForceSendFields []string `json:"-"`
12319
12320
12321
12322
12323
12324
12325
12326
12327 NullFields []string `json:"-"`
12328 }
12329
12330 func (s *SiteTranscodeSetting) MarshalJSON() ([]byte, error) {
12331 type NoMethod SiteTranscodeSetting
12332 raw := NoMethod(*s)
12333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12334 }
12335
12336
12337 type SiteVideoSettings struct {
12338
12339
12340 CompanionSettings *SiteCompanionSetting `json:"companionSettings,omitempty"`
12341
12342
12343
12344 Kind string `json:"kind,omitempty"`
12345
12346
12347
12348
12349
12350
12351
12352
12353 Orientation string `json:"orientation,omitempty"`
12354
12355
12356
12357
12358 SkippableSettings *SiteSkippableSetting `json:"skippableSettings,omitempty"`
12359
12360
12361
12362
12363 TranscodeSettings *SiteTranscodeSetting `json:"transcodeSettings,omitempty"`
12364
12365
12366
12367
12368
12369
12370
12371 ForceSendFields []string `json:"-"`
12372
12373
12374
12375
12376
12377
12378
12379
12380 NullFields []string `json:"-"`
12381 }
12382
12383 func (s *SiteVideoSettings) MarshalJSON() ([]byte, error) {
12384 type NoMethod SiteVideoSettings
12385 raw := NoMethod(*s)
12386 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12387 }
12388
12389
12390 type SitesListResponse struct {
12391
12392
12393 Kind string `json:"kind,omitempty"`
12394
12395
12396
12397 NextPageToken string `json:"nextPageToken,omitempty"`
12398
12399
12400 Sites []*Site `json:"sites,omitempty"`
12401
12402
12403
12404 googleapi.ServerResponse `json:"-"`
12405
12406
12407
12408
12409
12410
12411
12412 ForceSendFields []string `json:"-"`
12413
12414
12415
12416
12417
12418
12419
12420 NullFields []string `json:"-"`
12421 }
12422
12423 func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
12424 type NoMethod SitesListResponse
12425 raw := NoMethod(*s)
12426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12427 }
12428
12429
12430
12431 type Size struct {
12432
12433
12434 Height int64 `json:"height,omitempty"`
12435
12436
12437 Iab bool `json:"iab,omitempty"`
12438
12439
12440 Id int64 `json:"id,omitempty,string"`
12441
12442
12443
12444 Kind string `json:"kind,omitempty"`
12445
12446
12447
12448 Width int64 `json:"width,omitempty"`
12449
12450
12451
12452 googleapi.ServerResponse `json:"-"`
12453
12454
12455
12456
12457
12458
12459
12460 ForceSendFields []string `json:"-"`
12461
12462
12463
12464
12465
12466
12467
12468 NullFields []string `json:"-"`
12469 }
12470
12471 func (s *Size) MarshalJSON() ([]byte, error) {
12472 type NoMethod Size
12473 raw := NoMethod(*s)
12474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12475 }
12476
12477
12478 type SizesListResponse struct {
12479
12480
12481 Kind string `json:"kind,omitempty"`
12482
12483
12484 Sizes []*Size `json:"sizes,omitempty"`
12485
12486
12487
12488 googleapi.ServerResponse `json:"-"`
12489
12490
12491
12492
12493
12494
12495
12496 ForceSendFields []string `json:"-"`
12497
12498
12499
12500
12501
12502
12503
12504 NullFields []string `json:"-"`
12505 }
12506
12507 func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
12508 type NoMethod SizesListResponse
12509 raw := NoMethod(*s)
12510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12511 }
12512
12513
12514 type SkippableSetting struct {
12515
12516
12517 Kind string `json:"kind,omitempty"`
12518
12519
12520
12521 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
12522
12523
12524
12525
12526 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
12527
12528
12529
12530 Skippable bool `json:"skippable,omitempty"`
12531
12532
12533
12534
12535
12536
12537
12538 ForceSendFields []string `json:"-"`
12539
12540
12541
12542
12543
12544
12545
12546 NullFields []string `json:"-"`
12547 }
12548
12549 func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
12550 type NoMethod SkippableSetting
12551 raw := NoMethod(*s)
12552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12553 }
12554
12555
12556 type SortedDimension struct {
12557
12558
12559 Kind string `json:"kind,omitempty"`
12560
12561
12562 Name string `json:"name,omitempty"`
12563
12564
12565
12566
12567
12568
12569 SortOrder string `json:"sortOrder,omitempty"`
12570
12571
12572
12573
12574
12575
12576
12577 ForceSendFields []string `json:"-"`
12578
12579
12580
12581
12582
12583
12584
12585 NullFields []string `json:"-"`
12586 }
12587
12588 func (s *SortedDimension) MarshalJSON() ([]byte, error) {
12589 type NoMethod SortedDimension
12590 raw := NoMethod(*s)
12591 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12592 }
12593
12594
12595 type Subaccount struct {
12596
12597
12598 AccountId int64 `json:"accountId,omitempty,string"`
12599
12600
12601
12602 AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
12603
12604
12605 Id int64 `json:"id,omitempty,string"`
12606
12607
12608
12609 Kind string `json:"kind,omitempty"`
12610
12611
12612
12613
12614 Name string `json:"name,omitempty"`
12615
12616
12617
12618 googleapi.ServerResponse `json:"-"`
12619
12620
12621
12622
12623
12624
12625
12626 ForceSendFields []string `json:"-"`
12627
12628
12629
12630
12631
12632
12633
12634 NullFields []string `json:"-"`
12635 }
12636
12637 func (s *Subaccount) MarshalJSON() ([]byte, error) {
12638 type NoMethod Subaccount
12639 raw := NoMethod(*s)
12640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12641 }
12642
12643
12644 type SubaccountsListResponse struct {
12645
12646
12647 Kind string `json:"kind,omitempty"`
12648
12649
12650
12651 NextPageToken string `json:"nextPageToken,omitempty"`
12652
12653
12654 Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
12655
12656
12657
12658 googleapi.ServerResponse `json:"-"`
12659
12660
12661
12662
12663
12664
12665
12666 ForceSendFields []string `json:"-"`
12667
12668
12669
12670
12671
12672
12673
12674 NullFields []string `json:"-"`
12675 }
12676
12677 func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
12678 type NoMethod SubaccountsListResponse
12679 raw := NoMethod(*s)
12680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12681 }
12682
12683
12684 type TagData struct {
12685
12686
12687 AdId int64 `json:"adId,omitempty,string"`
12688
12689
12690 ClickTag string `json:"clickTag,omitempty"`
12691
12692
12693
12694 CreativeId int64 `json:"creativeId,omitempty,string"`
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719 Format string `json:"format,omitempty"`
12720
12721
12722 ImpressionTag string `json:"impressionTag,omitempty"`
12723
12724
12725
12726
12727
12728
12729
12730 ForceSendFields []string `json:"-"`
12731
12732
12733
12734
12735
12736
12737
12738 NullFields []string `json:"-"`
12739 }
12740
12741 func (s *TagData) MarshalJSON() ([]byte, error) {
12742 type NoMethod TagData
12743 raw := NoMethod(*s)
12744 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12745 }
12746
12747
12748 type TagSetting struct {
12749
12750
12751
12752
12753 AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
12754
12755
12756
12757 IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
12758
12759
12760
12761 IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772 KeywordOption string `json:"keywordOption,omitempty"`
12773
12774
12775
12776
12777
12778
12779
12780 ForceSendFields []string `json:"-"`
12781
12782
12783
12784
12785
12786
12787
12788
12789 NullFields []string `json:"-"`
12790 }
12791
12792 func (s *TagSetting) MarshalJSON() ([]byte, error) {
12793 type NoMethod TagSetting
12794 raw := NoMethod(*s)
12795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12796 }
12797
12798
12799 type TagSettings struct {
12800
12801 DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
12802
12803
12804 ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
12805
12806
12807
12808
12809
12810
12811
12812 ForceSendFields []string `json:"-"`
12813
12814
12815
12816
12817
12818
12819
12820
12821 NullFields []string `json:"-"`
12822 }
12823
12824 func (s *TagSettings) MarshalJSON() ([]byte, error) {
12825 type NoMethod TagSettings
12826 raw := NoMethod(*s)
12827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12828 }
12829
12830
12831 type TargetWindow struct {
12832
12833 CustomHtml string `json:"customHtml,omitempty"`
12834
12835
12836
12837
12838
12839
12840
12841
12842 TargetWindowOption string `json:"targetWindowOption,omitempty"`
12843
12844
12845
12846
12847
12848
12849
12850 ForceSendFields []string `json:"-"`
12851
12852
12853
12854
12855
12856
12857
12858 NullFields []string `json:"-"`
12859 }
12860
12861 func (s *TargetWindow) MarshalJSON() ([]byte, error) {
12862 type NoMethod TargetWindow
12863 raw := NoMethod(*s)
12864 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12865 }
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876 type TargetableRemarketingList struct {
12877
12878
12879 AccountId int64 `json:"accountId,omitempty,string"`
12880
12881
12882 Active bool `json:"active,omitempty"`
12883
12884
12885
12886 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
12887
12888
12889
12890 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
12891
12892
12893 Description string `json:"description,omitempty"`
12894
12895
12896 Id int64 `json:"id,omitempty,string"`
12897
12898
12899
12900 Kind string `json:"kind,omitempty"`
12901
12902
12903
12904 LifeSpan int64 `json:"lifeSpan,omitempty,string"`
12905
12906
12907
12908 ListSize int64 `json:"listSize,omitempty,string"`
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925 ListSource string `json:"listSource,omitempty"`
12926
12927
12928
12929 Name string `json:"name,omitempty"`
12930
12931
12932
12933
12934 SubaccountId int64 `json:"subaccountId,omitempty,string"`
12935
12936
12937
12938 googleapi.ServerResponse `json:"-"`
12939
12940
12941
12942
12943
12944
12945
12946 ForceSendFields []string `json:"-"`
12947
12948
12949
12950
12951
12952
12953
12954 NullFields []string `json:"-"`
12955 }
12956
12957 func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
12958 type NoMethod TargetableRemarketingList
12959 raw := NoMethod(*s)
12960 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12961 }
12962
12963
12964
12965 type TargetableRemarketingListsListResponse struct {
12966
12967
12968 Kind string `json:"kind,omitempty"`
12969
12970
12971
12972 NextPageToken string `json:"nextPageToken,omitempty"`
12973
12974
12975 TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
12976
12977
12978
12979 googleapi.ServerResponse `json:"-"`
12980
12981
12982
12983
12984
12985
12986
12987 ForceSendFields []string `json:"-"`
12988
12989
12990
12991
12992
12993
12994
12995 NullFields []string `json:"-"`
12996 }
12997
12998 func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
12999 type NoMethod TargetableRemarketingListsListResponse
13000 raw := NoMethod(*s)
13001 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13002 }
13003
13004
13005
13006
13007 type TargetingTemplate struct {
13008
13009
13010
13011 AccountId int64 `json:"accountId,omitempty,string"`
13012
13013
13014
13015 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
13016
13017
13018
13019 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
13020
13021
13022 DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
13023
13024
13025 GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
13026
13027
13028
13029 Id int64 `json:"id,omitempty,string"`
13030
13031
13032 KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
13033
13034
13035
13036 Kind string `json:"kind,omitempty"`
13037
13038
13039 LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
13040
13041
13042 ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
13043
13044
13045
13046
13047 Name string `json:"name,omitempty"`
13048
13049
13050
13051
13052 SubaccountId int64 `json:"subaccountId,omitempty,string"`
13053
13054
13055 TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
13056
13057
13058
13059 googleapi.ServerResponse `json:"-"`
13060
13061
13062
13063
13064
13065
13066
13067 ForceSendFields []string `json:"-"`
13068
13069
13070
13071
13072
13073
13074
13075 NullFields []string `json:"-"`
13076 }
13077
13078 func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
13079 type NoMethod TargetingTemplate
13080 raw := NoMethod(*s)
13081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13082 }
13083
13084
13085 type TargetingTemplatesListResponse struct {
13086
13087
13088 Kind string `json:"kind,omitempty"`
13089
13090
13091
13092 NextPageToken string `json:"nextPageToken,omitempty"`
13093
13094
13095 TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
13096
13097
13098
13099 googleapi.ServerResponse `json:"-"`
13100
13101
13102
13103
13104
13105
13106
13107 ForceSendFields []string `json:"-"`
13108
13109
13110
13111
13112
13113
13114
13115 NullFields []string `json:"-"`
13116 }
13117
13118 func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
13119 type NoMethod TargetingTemplatesListResponse
13120 raw := NoMethod(*s)
13121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13122 }
13123
13124
13125 type TechnologyTargeting struct {
13126
13127
13128
13129
13130 Browsers []*Browser `json:"browsers,omitempty"`
13131
13132
13133
13134
13135 ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
13136
13137
13138
13139
13140
13141 MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
13142
13143
13144
13145
13146
13147
13148
13149 OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
13150
13151
13152
13153
13154
13155
13156
13157 OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
13158
13159
13160
13161
13162
13163 PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
13164
13165
13166
13167
13168
13169
13170
13171 ForceSendFields []string `json:"-"`
13172
13173
13174
13175
13176
13177
13178
13179 NullFields []string `json:"-"`
13180 }
13181
13182 func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
13183 type NoMethod TechnologyTargeting
13184 raw := NoMethod(*s)
13185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13186 }
13187
13188
13189 type ThirdPartyAuthenticationToken struct {
13190
13191 Name string `json:"name,omitempty"`
13192
13193
13194
13195 Value string `json:"value,omitempty"`
13196
13197
13198
13199
13200
13201
13202
13203 ForceSendFields []string `json:"-"`
13204
13205
13206
13207
13208
13209
13210
13211 NullFields []string `json:"-"`
13212 }
13213
13214 func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
13215 type NoMethod ThirdPartyAuthenticationToken
13216 raw := NoMethod(*s)
13217 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13218 }
13219
13220
13221 type ThirdPartyTrackingUrl struct {
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245 ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
13246
13247
13248 Url string `json:"url,omitempty"`
13249
13250
13251
13252
13253
13254
13255
13256 ForceSendFields []string `json:"-"`
13257
13258
13259
13260
13261
13262
13263
13264
13265 NullFields []string `json:"-"`
13266 }
13267
13268 func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
13269 type NoMethod ThirdPartyTrackingUrl
13270 raw := NoMethod(*s)
13271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13272 }
13273
13274
13275 type TranscodeSetting struct {
13276
13277
13278 EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
13279
13280
13281
13282 Kind string `json:"kind,omitempty"`
13283
13284
13285
13286
13287
13288
13289
13290 ForceSendFields []string `json:"-"`
13291
13292
13293
13294
13295
13296
13297
13298
13299 NullFields []string `json:"-"`
13300 }
13301
13302 func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
13303 type NoMethod TranscodeSetting
13304 raw := NoMethod(*s)
13305 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13306 }
13307
13308
13309
13310
13311 type UniversalAdId struct {
13312
13313
13314
13315
13316
13317
13318
13319 Registry string `json:"registry,omitempty"`
13320
13321
13322
13323
13324 Value string `json:"value,omitempty"`
13325
13326
13327
13328
13329
13330
13331
13332 ForceSendFields []string `json:"-"`
13333
13334
13335
13336
13337
13338
13339
13340 NullFields []string `json:"-"`
13341 }
13342
13343 func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
13344 type NoMethod UniversalAdId
13345 raw := NoMethod(*s)
13346 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13347 }
13348
13349
13350
13351 type UserDefinedVariableConfiguration struct {
13352
13353
13354
13355
13356
13357 DataType string `json:"dataType,omitempty"`
13358
13359
13360
13361
13362 ReportName string `json:"reportName,omitempty"`
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467 VariableType string `json:"variableType,omitempty"`
13468
13469
13470
13471
13472
13473
13474
13475 ForceSendFields []string `json:"-"`
13476
13477
13478
13479
13480
13481
13482
13483 NullFields []string `json:"-"`
13484 }
13485
13486 func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
13487 type NoMethod UserDefinedVariableConfiguration
13488 raw := NoMethod(*s)
13489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13490 }
13491
13492
13493
13494
13495 type UserProfile struct {
13496
13497 AccountId int64 `json:"accountId,omitempty,string"`
13498
13499
13500 AccountName string `json:"accountName,omitempty"`
13501
13502
13503 Etag string `json:"etag,omitempty"`
13504
13505
13506
13507 Kind string `json:"kind,omitempty"`
13508
13509
13510 ProfileId int64 `json:"profileId,omitempty,string"`
13511
13512
13513
13514 SubAccountId int64 `json:"subAccountId,omitempty,string"`
13515
13516
13517
13518 SubAccountName string `json:"subAccountName,omitempty"`
13519
13520
13521 UserName string `json:"userName,omitempty"`
13522
13523
13524
13525 googleapi.ServerResponse `json:"-"`
13526
13527
13528
13529
13530
13531
13532
13533 ForceSendFields []string `json:"-"`
13534
13535
13536
13537
13538
13539
13540
13541 NullFields []string `json:"-"`
13542 }
13543
13544 func (s *UserProfile) MarshalJSON() ([]byte, error) {
13545 type NoMethod UserProfile
13546 raw := NoMethod(*s)
13547 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13548 }
13549
13550
13551 type UserProfileList struct {
13552
13553 Etag string `json:"etag,omitempty"`
13554
13555
13556 Items []*UserProfile `json:"items,omitempty"`
13557
13558
13559
13560 Kind string `json:"kind,omitempty"`
13561
13562
13563
13564 googleapi.ServerResponse `json:"-"`
13565
13566
13567
13568
13569
13570
13571
13572 ForceSendFields []string `json:"-"`
13573
13574
13575
13576
13577
13578
13579
13580 NullFields []string `json:"-"`
13581 }
13582
13583 func (s *UserProfileList) MarshalJSON() ([]byte, error) {
13584 type NoMethod UserProfileList
13585 raw := NoMethod(*s)
13586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13587 }
13588
13589
13590
13591 type UserRole struct {
13592
13593
13594 AccountId int64 `json:"accountId,omitempty,string"`
13595
13596
13597
13598
13599
13600 DefaultUserRole bool `json:"defaultUserRole,omitempty"`
13601
13602
13603 Id int64 `json:"id,omitempty,string"`
13604
13605
13606
13607 Kind string `json:"kind,omitempty"`
13608
13609
13610
13611
13612
13613
13614 Name string `json:"name,omitempty"`
13615
13616
13617
13618 ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
13619
13620
13621 Permissions []*UserRolePermission `json:"permissions,omitempty"`
13622
13623
13624
13625 SubaccountId int64 `json:"subaccountId,omitempty,string"`
13626
13627
13628
13629 googleapi.ServerResponse `json:"-"`
13630
13631
13632
13633
13634
13635
13636
13637 ForceSendFields []string `json:"-"`
13638
13639
13640
13641
13642
13643
13644
13645 NullFields []string `json:"-"`
13646 }
13647
13648 func (s *UserRole) MarshalJSON() ([]byte, error) {
13649 type NoMethod UserRole
13650 raw := NoMethod(*s)
13651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13652 }
13653
13654
13655 type UserRolePermission struct {
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665 Availability string `json:"availability,omitempty"`
13666
13667
13668 Id int64 `json:"id,omitempty,string"`
13669
13670
13671
13672 Kind string `json:"kind,omitempty"`
13673
13674
13675 Name string `json:"name,omitempty"`
13676
13677
13678
13679 PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
13680
13681
13682
13683 googleapi.ServerResponse `json:"-"`
13684
13685
13686
13687
13688
13689
13690
13691 ForceSendFields []string `json:"-"`
13692
13693
13694
13695
13696
13697
13698
13699 NullFields []string `json:"-"`
13700 }
13701
13702 func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
13703 type NoMethod UserRolePermission
13704 raw := NoMethod(*s)
13705 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13706 }
13707
13708
13709
13710 type UserRolePermissionGroup struct {
13711
13712 Id int64 `json:"id,omitempty,string"`
13713
13714
13715
13716 Kind string `json:"kind,omitempty"`
13717
13718
13719 Name string `json:"name,omitempty"`
13720
13721
13722
13723 googleapi.ServerResponse `json:"-"`
13724
13725
13726
13727
13728
13729
13730
13731 ForceSendFields []string `json:"-"`
13732
13733
13734
13735
13736
13737
13738
13739 NullFields []string `json:"-"`
13740 }
13741
13742 func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
13743 type NoMethod UserRolePermissionGroup
13744 raw := NoMethod(*s)
13745 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13746 }
13747
13748
13749
13750 type UserRolePermissionGroupsListResponse struct {
13751
13752
13753 Kind string `json:"kind,omitempty"`
13754
13755
13756 UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
13757
13758
13759
13760 googleapi.ServerResponse `json:"-"`
13761
13762
13763
13764
13765
13766
13767
13768 ForceSendFields []string `json:"-"`
13769
13770
13771
13772
13773
13774
13775
13776 NullFields []string `json:"-"`
13777 }
13778
13779 func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
13780 type NoMethod UserRolePermissionGroupsListResponse
13781 raw := NoMethod(*s)
13782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13783 }
13784
13785
13786 type UserRolePermissionsListResponse struct {
13787
13788
13789 Kind string `json:"kind,omitempty"`
13790
13791
13792 UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
13793
13794
13795
13796 googleapi.ServerResponse `json:"-"`
13797
13798
13799
13800
13801
13802
13803
13804 ForceSendFields []string `json:"-"`
13805
13806
13807
13808
13809
13810
13811
13812 NullFields []string `json:"-"`
13813 }
13814
13815 func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
13816 type NoMethod UserRolePermissionsListResponse
13817 raw := NoMethod(*s)
13818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13819 }
13820
13821
13822 type UserRolesListResponse struct {
13823
13824
13825 Kind string `json:"kind,omitempty"`
13826
13827
13828
13829 NextPageToken string `json:"nextPageToken,omitempty"`
13830
13831
13832 UserRoles []*UserRole `json:"userRoles,omitempty"`
13833
13834
13835
13836 googleapi.ServerResponse `json:"-"`
13837
13838
13839
13840
13841
13842
13843
13844 ForceSendFields []string `json:"-"`
13845
13846
13847
13848
13849
13850
13851
13852 NullFields []string `json:"-"`
13853 }
13854
13855 func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
13856 type NoMethod UserRolesListResponse
13857 raw := NoMethod(*s)
13858 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13859 }
13860
13861
13862 type VideoFormat struct {
13863
13864
13865
13866
13867
13868
13869
13870
13871 FileType string `json:"fileType,omitempty"`
13872
13873
13874 Id int64 `json:"id,omitempty"`
13875
13876
13877
13878 Kind string `json:"kind,omitempty"`
13879
13880
13881 Resolution *Size `json:"resolution,omitempty"`
13882
13883
13884 TargetBitRate int64 `json:"targetBitRate,omitempty"`
13885
13886
13887
13888 googleapi.ServerResponse `json:"-"`
13889
13890
13891
13892
13893
13894
13895
13896 ForceSendFields []string `json:"-"`
13897
13898
13899
13900
13901
13902
13903
13904 NullFields []string `json:"-"`
13905 }
13906
13907 func (s *VideoFormat) MarshalJSON() ([]byte, error) {
13908 type NoMethod VideoFormat
13909 raw := NoMethod(*s)
13910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13911 }
13912
13913
13914 type VideoFormatsListResponse struct {
13915
13916
13917 Kind string `json:"kind,omitempty"`
13918
13919
13920 VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
13921
13922
13923
13924 googleapi.ServerResponse `json:"-"`
13925
13926
13927
13928
13929
13930
13931
13932 ForceSendFields []string `json:"-"`
13933
13934
13935
13936
13937
13938
13939
13940 NullFields []string `json:"-"`
13941 }
13942
13943 func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
13944 type NoMethod VideoFormatsListResponse
13945 raw := NoMethod(*s)
13946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13947 }
13948
13949
13950 type VideoOffset struct {
13951
13952
13953
13954 OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
13955
13956
13957
13958 OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
13959
13960
13961
13962
13963
13964
13965
13966 ForceSendFields []string `json:"-"`
13967
13968
13969
13970
13971
13972
13973
13974
13975 NullFields []string `json:"-"`
13976 }
13977
13978 func (s *VideoOffset) MarshalJSON() ([]byte, error) {
13979 type NoMethod VideoOffset
13980 raw := NoMethod(*s)
13981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13982 }
13983
13984
13985 type VideoSettings struct {
13986
13987
13988 CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
13989
13990
13991
13992 Kind string `json:"kind,omitempty"`
13993
13994
13995
13996
13997
13998
13999
14000
14001 Orientation string `json:"orientation,omitempty"`
14002
14003
14004
14005
14006 SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
14007
14008
14009
14010
14011 TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
14012
14013
14014
14015
14016
14017
14018
14019 ForceSendFields []string `json:"-"`
14020
14021
14022
14023
14024
14025
14026
14027
14028 NullFields []string `json:"-"`
14029 }
14030
14031 func (s *VideoSettings) MarshalJSON() ([]byte, error) {
14032 type NoMethod VideoSettings
14033 raw := NoMethod(*s)
14034 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14035 }
14036
14037
14038
14039 type AccountActiveAdSummariesGetCall struct {
14040 s *Service
14041 profileId int64
14042 summaryAccountId int64
14043 urlParams_ gensupport.URLParams
14044 ifNoneMatch_ string
14045 ctx_ context.Context
14046 header_ http.Header
14047 }
14048
14049
14050
14051
14052
14053 func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
14054 c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14055 c.profileId = profileId
14056 c.summaryAccountId = summaryAccountId
14057 return c
14058 }
14059
14060
14061
14062
14063 func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
14064 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14065 return c
14066 }
14067
14068
14069
14070
14071
14072
14073 func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
14074 c.ifNoneMatch_ = entityTag
14075 return c
14076 }
14077
14078
14079
14080
14081 func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
14082 c.ctx_ = ctx
14083 return c
14084 }
14085
14086
14087
14088 func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
14089 if c.header_ == nil {
14090 c.header_ = make(http.Header)
14091 }
14092 return c.header_
14093 }
14094
14095 func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
14096 reqHeaders := make(http.Header)
14097 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14098 for k, v := range c.header_ {
14099 reqHeaders[k] = v
14100 }
14101 reqHeaders.Set("User-Agent", c.s.userAgent())
14102 if c.ifNoneMatch_ != "" {
14103 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14104 }
14105 var body io.Reader = nil
14106 c.urlParams_.Set("alt", alt)
14107 c.urlParams_.Set("prettyPrint", "false")
14108 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}")
14109 urls += "?" + c.urlParams_.Encode()
14110 req, err := http.NewRequest("GET", urls, body)
14111 if err != nil {
14112 return nil, err
14113 }
14114 req.Header = reqHeaders
14115 googleapi.Expand(req.URL, map[string]string{
14116 "profileId": strconv.FormatInt(c.profileId, 10),
14117 "summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
14118 })
14119 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14120 }
14121
14122
14123
14124
14125
14126
14127
14128
14129 func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
14130 gensupport.SetOptions(c.urlParams_, opts...)
14131 res, err := c.doRequest("json")
14132 if res != nil && res.StatusCode == http.StatusNotModified {
14133 if res.Body != nil {
14134 res.Body.Close()
14135 }
14136 return nil, &googleapi.Error{
14137 Code: res.StatusCode,
14138 Header: res.Header,
14139 }
14140 }
14141 if err != nil {
14142 return nil, err
14143 }
14144 defer googleapi.CloseBody(res)
14145 if err := googleapi.CheckResponse(res); err != nil {
14146 return nil, err
14147 }
14148 ret := &AccountActiveAdSummary{
14149 ServerResponse: googleapi.ServerResponse{
14150 Header: res.Header,
14151 HTTPStatusCode: res.StatusCode,
14152 },
14153 }
14154 target := &ret
14155 if err := gensupport.DecodeResponse(target, res); err != nil {
14156 return nil, err
14157 }
14158 return ret, nil
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193 }
14194
14195
14196
14197 type AccountPermissionGroupsGetCall struct {
14198 s *Service
14199 profileId int64
14200 id int64
14201 urlParams_ gensupport.URLParams
14202 ifNoneMatch_ string
14203 ctx_ context.Context
14204 header_ http.Header
14205 }
14206
14207
14208
14209
14210
14211 func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
14212 c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14213 c.profileId = profileId
14214 c.id = id
14215 return c
14216 }
14217
14218
14219
14220
14221 func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
14222 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14223 return c
14224 }
14225
14226
14227
14228
14229
14230
14231 func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
14232 c.ifNoneMatch_ = entityTag
14233 return c
14234 }
14235
14236
14237
14238
14239 func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
14240 c.ctx_ = ctx
14241 return c
14242 }
14243
14244
14245
14246 func (c *AccountPermissionGroupsGetCall) Header() http.Header {
14247 if c.header_ == nil {
14248 c.header_ = make(http.Header)
14249 }
14250 return c.header_
14251 }
14252
14253 func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14254 reqHeaders := make(http.Header)
14255 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14256 for k, v := range c.header_ {
14257 reqHeaders[k] = v
14258 }
14259 reqHeaders.Set("User-Agent", c.s.userAgent())
14260 if c.ifNoneMatch_ != "" {
14261 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14262 }
14263 var body io.Reader = nil
14264 c.urlParams_.Set("alt", alt)
14265 c.urlParams_.Set("prettyPrint", "false")
14266 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups/{id}")
14267 urls += "?" + c.urlParams_.Encode()
14268 req, err := http.NewRequest("GET", urls, body)
14269 if err != nil {
14270 return nil, err
14271 }
14272 req.Header = reqHeaders
14273 googleapi.Expand(req.URL, map[string]string{
14274 "profileId": strconv.FormatInt(c.profileId, 10),
14275 "id": strconv.FormatInt(c.id, 10),
14276 })
14277 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14278 }
14279
14280
14281
14282
14283
14284
14285
14286
14287 func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
14288 gensupport.SetOptions(c.urlParams_, opts...)
14289 res, err := c.doRequest("json")
14290 if res != nil && res.StatusCode == http.StatusNotModified {
14291 if res.Body != nil {
14292 res.Body.Close()
14293 }
14294 return nil, &googleapi.Error{
14295 Code: res.StatusCode,
14296 Header: res.Header,
14297 }
14298 }
14299 if err != nil {
14300 return nil, err
14301 }
14302 defer googleapi.CloseBody(res)
14303 if err := googleapi.CheckResponse(res); err != nil {
14304 return nil, err
14305 }
14306 ret := &AccountPermissionGroup{
14307 ServerResponse: googleapi.ServerResponse{
14308 Header: res.Header,
14309 HTTPStatusCode: res.StatusCode,
14310 },
14311 }
14312 target := &ret
14313 if err := gensupport.DecodeResponse(target, res); err != nil {
14314 return nil, err
14315 }
14316 return ret, nil
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351 }
14352
14353
14354
14355 type AccountPermissionGroupsListCall struct {
14356 s *Service
14357 profileId int64
14358 urlParams_ gensupport.URLParams
14359 ifNoneMatch_ string
14360 ctx_ context.Context
14361 header_ http.Header
14362 }
14363
14364
14365
14366
14367 func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
14368 c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14369 c.profileId = profileId
14370 return c
14371 }
14372
14373
14374
14375
14376 func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
14377 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14378 return c
14379 }
14380
14381
14382
14383
14384
14385
14386 func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
14387 c.ifNoneMatch_ = entityTag
14388 return c
14389 }
14390
14391
14392
14393
14394 func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
14395 c.ctx_ = ctx
14396 return c
14397 }
14398
14399
14400
14401 func (c *AccountPermissionGroupsListCall) Header() http.Header {
14402 if c.header_ == nil {
14403 c.header_ = make(http.Header)
14404 }
14405 return c.header_
14406 }
14407
14408 func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
14409 reqHeaders := make(http.Header)
14410 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14411 for k, v := range c.header_ {
14412 reqHeaders[k] = v
14413 }
14414 reqHeaders.Set("User-Agent", c.s.userAgent())
14415 if c.ifNoneMatch_ != "" {
14416 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14417 }
14418 var body io.Reader = nil
14419 c.urlParams_.Set("alt", alt)
14420 c.urlParams_.Set("prettyPrint", "false")
14421 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissionGroups")
14422 urls += "?" + c.urlParams_.Encode()
14423 req, err := http.NewRequest("GET", urls, body)
14424 if err != nil {
14425 return nil, err
14426 }
14427 req.Header = reqHeaders
14428 googleapi.Expand(req.URL, map[string]string{
14429 "profileId": strconv.FormatInt(c.profileId, 10),
14430 })
14431 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14432 }
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442 func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
14443 gensupport.SetOptions(c.urlParams_, opts...)
14444 res, err := c.doRequest("json")
14445 if res != nil && res.StatusCode == http.StatusNotModified {
14446 if res.Body != nil {
14447 res.Body.Close()
14448 }
14449 return nil, &googleapi.Error{
14450 Code: res.StatusCode,
14451 Header: res.Header,
14452 }
14453 }
14454 if err != nil {
14455 return nil, err
14456 }
14457 defer googleapi.CloseBody(res)
14458 if err := googleapi.CheckResponse(res); err != nil {
14459 return nil, err
14460 }
14461 ret := &AccountPermissionGroupsListResponse{
14462 ServerResponse: googleapi.ServerResponse{
14463 Header: res.Header,
14464 HTTPStatusCode: res.StatusCode,
14465 },
14466 }
14467 target := &ret
14468 if err := gensupport.DecodeResponse(target, res); err != nil {
14469 return nil, err
14470 }
14471 return ret, nil
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498 }
14499
14500
14501
14502 type AccountPermissionsGetCall struct {
14503 s *Service
14504 profileId int64
14505 id int64
14506 urlParams_ gensupport.URLParams
14507 ifNoneMatch_ string
14508 ctx_ context.Context
14509 header_ http.Header
14510 }
14511
14512
14513
14514
14515
14516 func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
14517 c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14518 c.profileId = profileId
14519 c.id = id
14520 return c
14521 }
14522
14523
14524
14525
14526 func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
14527 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14528 return c
14529 }
14530
14531
14532
14533
14534
14535
14536 func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
14537 c.ifNoneMatch_ = entityTag
14538 return c
14539 }
14540
14541
14542
14543
14544 func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
14545 c.ctx_ = ctx
14546 return c
14547 }
14548
14549
14550
14551 func (c *AccountPermissionsGetCall) Header() http.Header {
14552 if c.header_ == nil {
14553 c.header_ = make(http.Header)
14554 }
14555 return c.header_
14556 }
14557
14558 func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
14559 reqHeaders := make(http.Header)
14560 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14561 for k, v := range c.header_ {
14562 reqHeaders[k] = v
14563 }
14564 reqHeaders.Set("User-Agent", c.s.userAgent())
14565 if c.ifNoneMatch_ != "" {
14566 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14567 }
14568 var body io.Reader = nil
14569 c.urlParams_.Set("alt", alt)
14570 c.urlParams_.Set("prettyPrint", "false")
14571 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions/{id}")
14572 urls += "?" + c.urlParams_.Encode()
14573 req, err := http.NewRequest("GET", urls, body)
14574 if err != nil {
14575 return nil, err
14576 }
14577 req.Header = reqHeaders
14578 googleapi.Expand(req.URL, map[string]string{
14579 "profileId": strconv.FormatInt(c.profileId, 10),
14580 "id": strconv.FormatInt(c.id, 10),
14581 })
14582 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14583 }
14584
14585
14586
14587
14588
14589
14590
14591
14592 func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
14593 gensupport.SetOptions(c.urlParams_, opts...)
14594 res, err := c.doRequest("json")
14595 if res != nil && res.StatusCode == http.StatusNotModified {
14596 if res.Body != nil {
14597 res.Body.Close()
14598 }
14599 return nil, &googleapi.Error{
14600 Code: res.StatusCode,
14601 Header: res.Header,
14602 }
14603 }
14604 if err != nil {
14605 return nil, err
14606 }
14607 defer googleapi.CloseBody(res)
14608 if err := googleapi.CheckResponse(res); err != nil {
14609 return nil, err
14610 }
14611 ret := &AccountPermission{
14612 ServerResponse: googleapi.ServerResponse{
14613 Header: res.Header,
14614 HTTPStatusCode: res.StatusCode,
14615 },
14616 }
14617 target := &ret
14618 if err := gensupport.DecodeResponse(target, res); err != nil {
14619 return nil, err
14620 }
14621 return ret, nil
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656 }
14657
14658
14659
14660 type AccountPermissionsListCall struct {
14661 s *Service
14662 profileId int64
14663 urlParams_ gensupport.URLParams
14664 ifNoneMatch_ string
14665 ctx_ context.Context
14666 header_ http.Header
14667 }
14668
14669
14670
14671
14672 func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
14673 c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14674 c.profileId = profileId
14675 return c
14676 }
14677
14678
14679
14680
14681 func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
14682 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14683 return c
14684 }
14685
14686
14687
14688
14689
14690
14691 func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
14692 c.ifNoneMatch_ = entityTag
14693 return c
14694 }
14695
14696
14697
14698
14699 func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
14700 c.ctx_ = ctx
14701 return c
14702 }
14703
14704
14705
14706 func (c *AccountPermissionsListCall) Header() http.Header {
14707 if c.header_ == nil {
14708 c.header_ = make(http.Header)
14709 }
14710 return c.header_
14711 }
14712
14713 func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
14714 reqHeaders := make(http.Header)
14715 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14716 for k, v := range c.header_ {
14717 reqHeaders[k] = v
14718 }
14719 reqHeaders.Set("User-Agent", c.s.userAgent())
14720 if c.ifNoneMatch_ != "" {
14721 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14722 }
14723 var body io.Reader = nil
14724 c.urlParams_.Set("alt", alt)
14725 c.urlParams_.Set("prettyPrint", "false")
14726 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountPermissions")
14727 urls += "?" + c.urlParams_.Encode()
14728 req, err := http.NewRequest("GET", urls, body)
14729 if err != nil {
14730 return nil, err
14731 }
14732 req.Header = reqHeaders
14733 googleapi.Expand(req.URL, map[string]string{
14734 "profileId": strconv.FormatInt(c.profileId, 10),
14735 })
14736 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14737 }
14738
14739
14740
14741
14742
14743
14744
14745
14746 func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
14747 gensupport.SetOptions(c.urlParams_, opts...)
14748 res, err := c.doRequest("json")
14749 if res != nil && res.StatusCode == http.StatusNotModified {
14750 if res.Body != nil {
14751 res.Body.Close()
14752 }
14753 return nil, &googleapi.Error{
14754 Code: res.StatusCode,
14755 Header: res.Header,
14756 }
14757 }
14758 if err != nil {
14759 return nil, err
14760 }
14761 defer googleapi.CloseBody(res)
14762 if err := googleapi.CheckResponse(res); err != nil {
14763 return nil, err
14764 }
14765 ret := &AccountPermissionsListResponse{
14766 ServerResponse: googleapi.ServerResponse{
14767 Header: res.Header,
14768 HTTPStatusCode: res.StatusCode,
14769 },
14770 }
14771 target := &ret
14772 if err := gensupport.DecodeResponse(target, res); err != nil {
14773 return nil, err
14774 }
14775 return ret, nil
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802 }
14803
14804
14805
14806 type AccountUserProfilesGetCall struct {
14807 s *Service
14808 profileId int64
14809 id int64
14810 urlParams_ gensupport.URLParams
14811 ifNoneMatch_ string
14812 ctx_ context.Context
14813 header_ http.Header
14814 }
14815
14816
14817
14818
14819
14820 func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
14821 c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14822 c.profileId = profileId
14823 c.id = id
14824 return c
14825 }
14826
14827
14828
14829
14830 func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
14831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14832 return c
14833 }
14834
14835
14836
14837
14838
14839
14840 func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
14841 c.ifNoneMatch_ = entityTag
14842 return c
14843 }
14844
14845
14846
14847
14848 func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
14849 c.ctx_ = ctx
14850 return c
14851 }
14852
14853
14854
14855 func (c *AccountUserProfilesGetCall) Header() http.Header {
14856 if c.header_ == nil {
14857 c.header_ = make(http.Header)
14858 }
14859 return c.header_
14860 }
14861
14862 func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
14863 reqHeaders := make(http.Header)
14864 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
14865 for k, v := range c.header_ {
14866 reqHeaders[k] = v
14867 }
14868 reqHeaders.Set("User-Agent", c.s.userAgent())
14869 if c.ifNoneMatch_ != "" {
14870 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14871 }
14872 var body io.Reader = nil
14873 c.urlParams_.Set("alt", alt)
14874 c.urlParams_.Set("prettyPrint", "false")
14875 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{id}")
14876 urls += "?" + c.urlParams_.Encode()
14877 req, err := http.NewRequest("GET", urls, body)
14878 if err != nil {
14879 return nil, err
14880 }
14881 req.Header = reqHeaders
14882 googleapi.Expand(req.URL, map[string]string{
14883 "profileId": strconv.FormatInt(c.profileId, 10),
14884 "id": strconv.FormatInt(c.id, 10),
14885 })
14886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14887 }
14888
14889
14890
14891
14892
14893
14894
14895
14896 func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
14897 gensupport.SetOptions(c.urlParams_, opts...)
14898 res, err := c.doRequest("json")
14899 if res != nil && res.StatusCode == http.StatusNotModified {
14900 if res.Body != nil {
14901 res.Body.Close()
14902 }
14903 return nil, &googleapi.Error{
14904 Code: res.StatusCode,
14905 Header: res.Header,
14906 }
14907 }
14908 if err != nil {
14909 return nil, err
14910 }
14911 defer googleapi.CloseBody(res)
14912 if err := googleapi.CheckResponse(res); err != nil {
14913 return nil, err
14914 }
14915 ret := &AccountUserProfile{
14916 ServerResponse: googleapi.ServerResponse{
14917 Header: res.Header,
14918 HTTPStatusCode: res.StatusCode,
14919 },
14920 }
14921 target := &ret
14922 if err := gensupport.DecodeResponse(target, res); err != nil {
14923 return nil, err
14924 }
14925 return ret, nil
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960 }
14961
14962
14963
14964 type AccountUserProfilesInsertCall struct {
14965 s *Service
14966 profileId int64
14967 accountuserprofile *AccountUserProfile
14968 urlParams_ gensupport.URLParams
14969 ctx_ context.Context
14970 header_ http.Header
14971 }
14972
14973
14974
14975
14976 func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
14977 c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14978 c.profileId = profileId
14979 c.accountuserprofile = accountuserprofile
14980 return c
14981 }
14982
14983
14984
14985
14986 func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
14987 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14988 return c
14989 }
14990
14991
14992
14993
14994 func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
14995 c.ctx_ = ctx
14996 return c
14997 }
14998
14999
15000
15001 func (c *AccountUserProfilesInsertCall) Header() http.Header {
15002 if c.header_ == nil {
15003 c.header_ = make(http.Header)
15004 }
15005 return c.header_
15006 }
15007
15008 func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
15009 reqHeaders := make(http.Header)
15010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
15011 for k, v := range c.header_ {
15012 reqHeaders[k] = v
15013 }
15014 reqHeaders.Set("User-Agent", c.s.userAgent())
15015 var body io.Reader = nil
15016 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15017 if err != nil {
15018 return nil, err
15019 }
15020 reqHeaders.Set("Content-Type", "application/json")
15021 c.urlParams_.Set("alt", alt)
15022 c.urlParams_.Set("prettyPrint", "false")
15023 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15024 urls += "?" + c.urlParams_.Encode()
15025 req, err := http.NewRequest("POST", urls, body)
15026 if err != nil {
15027 return nil, err
15028 }
15029 req.Header = reqHeaders
15030 googleapi.Expand(req.URL, map[string]string{
15031 "profileId": strconv.FormatInt(c.profileId, 10),
15032 })
15033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15034 }
15035
15036
15037
15038
15039
15040
15041
15042
15043 func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15044 gensupport.SetOptions(c.urlParams_, opts...)
15045 res, err := c.doRequest("json")
15046 if res != nil && res.StatusCode == http.StatusNotModified {
15047 if res.Body != nil {
15048 res.Body.Close()
15049 }
15050 return nil, &googleapi.Error{
15051 Code: res.StatusCode,
15052 Header: res.Header,
15053 }
15054 }
15055 if err != nil {
15056 return nil, err
15057 }
15058 defer googleapi.CloseBody(res)
15059 if err := googleapi.CheckResponse(res); err != nil {
15060 return nil, err
15061 }
15062 ret := &AccountUserProfile{
15063 ServerResponse: googleapi.ServerResponse{
15064 Header: res.Header,
15065 HTTPStatusCode: res.StatusCode,
15066 },
15067 }
15068 target := &ret
15069 if err := gensupport.DecodeResponse(target, res); err != nil {
15070 return nil, err
15071 }
15072 return ret, nil
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102 }
15103
15104
15105
15106 type AccountUserProfilesListCall struct {
15107 s *Service
15108 profileId int64
15109 urlParams_ gensupport.URLParams
15110 ifNoneMatch_ string
15111 ctx_ context.Context
15112 header_ http.Header
15113 }
15114
15115
15116
15117
15118
15119 func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
15120 c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15121 c.profileId = profileId
15122 return c
15123 }
15124
15125
15126
15127 func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
15128 c.urlParams_.Set("active", fmt.Sprint(active))
15129 return c
15130 }
15131
15132
15133
15134 func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
15135 var ids_ []string
15136 for _, v := range ids {
15137 ids_ = append(ids_, fmt.Sprint(v))
15138 }
15139 c.urlParams_.SetMulti("ids", ids_)
15140 return c
15141 }
15142
15143
15144
15145 func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
15146 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15147 return c
15148 }
15149
15150
15151
15152 func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
15153 c.urlParams_.Set("pageToken", pageToken)
15154 return c
15155 }
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166 func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
15167 c.urlParams_.Set("searchString", searchString)
15168 return c
15169 }
15170
15171
15172
15173
15174
15175
15176
15177
15178 func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
15179 c.urlParams_.Set("sortField", sortField)
15180 return c
15181 }
15182
15183
15184
15185
15186
15187
15188
15189
15190 func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
15191 c.urlParams_.Set("sortOrder", sortOrder)
15192 return c
15193 }
15194
15195
15196
15197 func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
15198 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15199 return c
15200 }
15201
15202
15203
15204 func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
15205 c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
15206 return c
15207 }
15208
15209
15210
15211
15212 func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
15213 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15214 return c
15215 }
15216
15217
15218
15219
15220
15221
15222 func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
15223 c.ifNoneMatch_ = entityTag
15224 return c
15225 }
15226
15227
15228
15229
15230 func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
15231 c.ctx_ = ctx
15232 return c
15233 }
15234
15235
15236
15237 func (c *AccountUserProfilesListCall) Header() http.Header {
15238 if c.header_ == nil {
15239 c.header_ = make(http.Header)
15240 }
15241 return c.header_
15242 }
15243
15244 func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
15245 reqHeaders := make(http.Header)
15246 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
15247 for k, v := range c.header_ {
15248 reqHeaders[k] = v
15249 }
15250 reqHeaders.Set("User-Agent", c.s.userAgent())
15251 if c.ifNoneMatch_ != "" {
15252 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15253 }
15254 var body io.Reader = nil
15255 c.urlParams_.Set("alt", alt)
15256 c.urlParams_.Set("prettyPrint", "false")
15257 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15258 urls += "?" + c.urlParams_.Encode()
15259 req, err := http.NewRequest("GET", urls, body)
15260 if err != nil {
15261 return nil, err
15262 }
15263 req.Header = reqHeaders
15264 googleapi.Expand(req.URL, map[string]string{
15265 "profileId": strconv.FormatInt(c.profileId, 10),
15266 })
15267 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15268 }
15269
15270
15271
15272
15273
15274
15275
15276
15277 func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
15278 gensupport.SetOptions(c.urlParams_, opts...)
15279 res, err := c.doRequest("json")
15280 if res != nil && res.StatusCode == http.StatusNotModified {
15281 if res.Body != nil {
15282 res.Body.Close()
15283 }
15284 return nil, &googleapi.Error{
15285 Code: res.StatusCode,
15286 Header: res.Header,
15287 }
15288 }
15289 if err != nil {
15290 return nil, err
15291 }
15292 defer googleapi.CloseBody(res)
15293 if err := googleapi.CheckResponse(res); err != nil {
15294 return nil, err
15295 }
15296 ret := &AccountUserProfilesListResponse{
15297 ServerResponse: googleapi.ServerResponse{
15298 Header: res.Header,
15299 HTTPStatusCode: res.StatusCode,
15300 },
15301 }
15302 target := &ret
15303 if err := gensupport.DecodeResponse(target, res); err != nil {
15304 return nil, err
15305 }
15306 return ret, nil
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404 }
15405
15406
15407
15408
15409 func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
15410 c.ctx_ = ctx
15411 defer c.PageToken(c.urlParams_.Get("pageToken"))
15412 for {
15413 x, err := c.Do()
15414 if err != nil {
15415 return err
15416 }
15417 if err := f(x); err != nil {
15418 return err
15419 }
15420 if x.NextPageToken == "" {
15421 return nil
15422 }
15423 c.PageToken(x.NextPageToken)
15424 }
15425 }
15426
15427
15428
15429 type AccountUserProfilesPatchCall struct {
15430 s *Service
15431 profileId int64
15432 accountuserprofile *AccountUserProfile
15433 urlParams_ gensupport.URLParams
15434 ctx_ context.Context
15435 header_ http.Header
15436 }
15437
15438
15439
15440
15441
15442
15443 func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
15444 c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15445 c.profileId = profileId
15446 c.urlParams_.Set("id", fmt.Sprint(id))
15447 c.accountuserprofile = accountuserprofile
15448 return c
15449 }
15450
15451
15452
15453
15454 func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
15455 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15456 return c
15457 }
15458
15459
15460
15461
15462 func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
15463 c.ctx_ = ctx
15464 return c
15465 }
15466
15467
15468
15469 func (c *AccountUserProfilesPatchCall) Header() http.Header {
15470 if c.header_ == nil {
15471 c.header_ = make(http.Header)
15472 }
15473 return c.header_
15474 }
15475
15476 func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
15477 reqHeaders := make(http.Header)
15478 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
15479 for k, v := range c.header_ {
15480 reqHeaders[k] = v
15481 }
15482 reqHeaders.Set("User-Agent", c.s.userAgent())
15483 var body io.Reader = nil
15484 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15485 if err != nil {
15486 return nil, err
15487 }
15488 reqHeaders.Set("Content-Type", "application/json")
15489 c.urlParams_.Set("alt", alt)
15490 c.urlParams_.Set("prettyPrint", "false")
15491 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15492 urls += "?" + c.urlParams_.Encode()
15493 req, err := http.NewRequest("PATCH", urls, body)
15494 if err != nil {
15495 return nil, err
15496 }
15497 req.Header = reqHeaders
15498 googleapi.Expand(req.URL, map[string]string{
15499 "profileId": strconv.FormatInt(c.profileId, 10),
15500 })
15501 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15502 }
15503
15504
15505
15506
15507
15508
15509
15510
15511 func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15512 gensupport.SetOptions(c.urlParams_, opts...)
15513 res, err := c.doRequest("json")
15514 if res != nil && res.StatusCode == http.StatusNotModified {
15515 if res.Body != nil {
15516 res.Body.Close()
15517 }
15518 return nil, &googleapi.Error{
15519 Code: res.StatusCode,
15520 Header: res.Header,
15521 }
15522 }
15523 if err != nil {
15524 return nil, err
15525 }
15526 defer googleapi.CloseBody(res)
15527 if err := googleapi.CheckResponse(res); err != nil {
15528 return nil, err
15529 }
15530 ret := &AccountUserProfile{
15531 ServerResponse: googleapi.ServerResponse{
15532 Header: res.Header,
15533 HTTPStatusCode: res.StatusCode,
15534 },
15535 }
15536 target := &ret
15537 if err := gensupport.DecodeResponse(target, res); err != nil {
15538 return nil, err
15539 }
15540 return ret, nil
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578 }
15579
15580
15581
15582 type AccountUserProfilesUpdateCall struct {
15583 s *Service
15584 profileId int64
15585 accountuserprofile *AccountUserProfile
15586 urlParams_ gensupport.URLParams
15587 ctx_ context.Context
15588 header_ http.Header
15589 }
15590
15591
15592
15593
15594 func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
15595 c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15596 c.profileId = profileId
15597 c.accountuserprofile = accountuserprofile
15598 return c
15599 }
15600
15601
15602
15603
15604 func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
15605 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15606 return c
15607 }
15608
15609
15610
15611
15612 func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
15613 c.ctx_ = ctx
15614 return c
15615 }
15616
15617
15618
15619 func (c *AccountUserProfilesUpdateCall) Header() http.Header {
15620 if c.header_ == nil {
15621 c.header_ = make(http.Header)
15622 }
15623 return c.header_
15624 }
15625
15626 func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
15627 reqHeaders := make(http.Header)
15628 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
15629 for k, v := range c.header_ {
15630 reqHeaders[k] = v
15631 }
15632 reqHeaders.Set("User-Agent", c.s.userAgent())
15633 var body io.Reader = nil
15634 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
15635 if err != nil {
15636 return nil, err
15637 }
15638 reqHeaders.Set("Content-Type", "application/json")
15639 c.urlParams_.Set("alt", alt)
15640 c.urlParams_.Set("prettyPrint", "false")
15641 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles")
15642 urls += "?" + c.urlParams_.Encode()
15643 req, err := http.NewRequest("PUT", urls, body)
15644 if err != nil {
15645 return nil, err
15646 }
15647 req.Header = reqHeaders
15648 googleapi.Expand(req.URL, map[string]string{
15649 "profileId": strconv.FormatInt(c.profileId, 10),
15650 })
15651 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15652 }
15653
15654
15655
15656
15657
15658
15659
15660
15661 func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
15662 gensupport.SetOptions(c.urlParams_, opts...)
15663 res, err := c.doRequest("json")
15664 if res != nil && res.StatusCode == http.StatusNotModified {
15665 if res.Body != nil {
15666 res.Body.Close()
15667 }
15668 return nil, &googleapi.Error{
15669 Code: res.StatusCode,
15670 Header: res.Header,
15671 }
15672 }
15673 if err != nil {
15674 return nil, err
15675 }
15676 defer googleapi.CloseBody(res)
15677 if err := googleapi.CheckResponse(res); err != nil {
15678 return nil, err
15679 }
15680 ret := &AccountUserProfile{
15681 ServerResponse: googleapi.ServerResponse{
15682 Header: res.Header,
15683 HTTPStatusCode: res.StatusCode,
15684 },
15685 }
15686 target := &ret
15687 if err := gensupport.DecodeResponse(target, res); err != nil {
15688 return nil, err
15689 }
15690 return ret, nil
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720 }
15721
15722
15723
15724 type AccountsGetCall struct {
15725 s *Service
15726 profileId int64
15727 id int64
15728 urlParams_ gensupport.URLParams
15729 ifNoneMatch_ string
15730 ctx_ context.Context
15731 header_ http.Header
15732 }
15733
15734
15735
15736
15737
15738 func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
15739 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15740 c.profileId = profileId
15741 c.id = id
15742 return c
15743 }
15744
15745
15746
15747
15748 func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
15749 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15750 return c
15751 }
15752
15753
15754
15755
15756
15757
15758 func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
15759 c.ifNoneMatch_ = entityTag
15760 return c
15761 }
15762
15763
15764
15765
15766 func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
15767 c.ctx_ = ctx
15768 return c
15769 }
15770
15771
15772
15773 func (c *AccountsGetCall) Header() http.Header {
15774 if c.header_ == nil {
15775 c.header_ = make(http.Header)
15776 }
15777 return c.header_
15778 }
15779
15780 func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
15781 reqHeaders := make(http.Header)
15782 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
15783 for k, v := range c.header_ {
15784 reqHeaders[k] = v
15785 }
15786 reqHeaders.Set("User-Agent", c.s.userAgent())
15787 if c.ifNoneMatch_ != "" {
15788 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15789 }
15790 var body io.Reader = nil
15791 c.urlParams_.Set("alt", alt)
15792 c.urlParams_.Set("prettyPrint", "false")
15793 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts/{id}")
15794 urls += "?" + c.urlParams_.Encode()
15795 req, err := http.NewRequest("GET", urls, body)
15796 if err != nil {
15797 return nil, err
15798 }
15799 req.Header = reqHeaders
15800 googleapi.Expand(req.URL, map[string]string{
15801 "profileId": strconv.FormatInt(c.profileId, 10),
15802 "id": strconv.FormatInt(c.id, 10),
15803 })
15804 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15805 }
15806
15807
15808
15809
15810
15811
15812
15813
15814 func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
15815 gensupport.SetOptions(c.urlParams_, opts...)
15816 res, err := c.doRequest("json")
15817 if res != nil && res.StatusCode == http.StatusNotModified {
15818 if res.Body != nil {
15819 res.Body.Close()
15820 }
15821 return nil, &googleapi.Error{
15822 Code: res.StatusCode,
15823 Header: res.Header,
15824 }
15825 }
15826 if err != nil {
15827 return nil, err
15828 }
15829 defer googleapi.CloseBody(res)
15830 if err := googleapi.CheckResponse(res); err != nil {
15831 return nil, err
15832 }
15833 ret := &Account{
15834 ServerResponse: googleapi.ServerResponse{
15835 Header: res.Header,
15836 HTTPStatusCode: res.StatusCode,
15837 },
15838 }
15839 target := &ret
15840 if err := gensupport.DecodeResponse(target, res); err != nil {
15841 return nil, err
15842 }
15843 return ret, nil
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878 }
15879
15880
15881
15882 type AccountsListCall struct {
15883 s *Service
15884 profileId int64
15885 urlParams_ gensupport.URLParams
15886 ifNoneMatch_ string
15887 ctx_ context.Context
15888 header_ http.Header
15889 }
15890
15891
15892
15893
15894
15895 func (r *AccountsService) List(profileId int64) *AccountsListCall {
15896 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15897 c.profileId = profileId
15898 return c
15899 }
15900
15901
15902
15903
15904 func (c *AccountsListCall) Active(active bool) *AccountsListCall {
15905 c.urlParams_.Set("active", fmt.Sprint(active))
15906 return c
15907 }
15908
15909
15910
15911 func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
15912 var ids_ []string
15913 for _, v := range ids {
15914 ids_ = append(ids_, fmt.Sprint(v))
15915 }
15916 c.urlParams_.SetMulti("ids", ids_)
15917 return c
15918 }
15919
15920
15921
15922 func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
15923 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15924 return c
15925 }
15926
15927
15928
15929 func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
15930 c.urlParams_.Set("pageToken", pageToken)
15931 return c
15932 }
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942 func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
15943 c.urlParams_.Set("searchString", searchString)
15944 return c
15945 }
15946
15947
15948
15949
15950
15951
15952
15953
15954 func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
15955 c.urlParams_.Set("sortField", sortField)
15956 return c
15957 }
15958
15959
15960
15961
15962
15963
15964
15965
15966 func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
15967 c.urlParams_.Set("sortOrder", sortOrder)
15968 return c
15969 }
15970
15971
15972
15973
15974 func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
15975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15976 return c
15977 }
15978
15979
15980
15981
15982
15983
15984 func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
15985 c.ifNoneMatch_ = entityTag
15986 return c
15987 }
15988
15989
15990
15991
15992 func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
15993 c.ctx_ = ctx
15994 return c
15995 }
15996
15997
15998
15999 func (c *AccountsListCall) Header() http.Header {
16000 if c.header_ == nil {
16001 c.header_ = make(http.Header)
16002 }
16003 return c.header_
16004 }
16005
16006 func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
16007 reqHeaders := make(http.Header)
16008 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
16009 for k, v := range c.header_ {
16010 reqHeaders[k] = v
16011 }
16012 reqHeaders.Set("User-Agent", c.s.userAgent())
16013 if c.ifNoneMatch_ != "" {
16014 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16015 }
16016 var body io.Reader = nil
16017 c.urlParams_.Set("alt", alt)
16018 c.urlParams_.Set("prettyPrint", "false")
16019 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16020 urls += "?" + c.urlParams_.Encode()
16021 req, err := http.NewRequest("GET", urls, body)
16022 if err != nil {
16023 return nil, err
16024 }
16025 req.Header = reqHeaders
16026 googleapi.Expand(req.URL, map[string]string{
16027 "profileId": strconv.FormatInt(c.profileId, 10),
16028 })
16029 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16030 }
16031
16032
16033
16034
16035
16036
16037
16038
16039 func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
16040 gensupport.SetOptions(c.urlParams_, opts...)
16041 res, err := c.doRequest("json")
16042 if res != nil && res.StatusCode == http.StatusNotModified {
16043 if res.Body != nil {
16044 res.Body.Close()
16045 }
16046 return nil, &googleapi.Error{
16047 Code: res.StatusCode,
16048 Header: res.Header,
16049 }
16050 }
16051 if err != nil {
16052 return nil, err
16053 }
16054 defer googleapi.CloseBody(res)
16055 if err := googleapi.CheckResponse(res); err != nil {
16056 return nil, err
16057 }
16058 ret := &AccountsListResponse{
16059 ServerResponse: googleapi.ServerResponse{
16060 Header: res.Header,
16061 HTTPStatusCode: res.StatusCode,
16062 },
16063 }
16064 target := &ret
16065 if err := gensupport.DecodeResponse(target, res); err != nil {
16066 return nil, err
16067 }
16068 return ret, nil
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154 }
16155
16156
16157
16158
16159 func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
16160 c.ctx_ = ctx
16161 defer c.PageToken(c.urlParams_.Get("pageToken"))
16162 for {
16163 x, err := c.Do()
16164 if err != nil {
16165 return err
16166 }
16167 if err := f(x); err != nil {
16168 return err
16169 }
16170 if x.NextPageToken == "" {
16171 return nil
16172 }
16173 c.PageToken(x.NextPageToken)
16174 }
16175 }
16176
16177
16178
16179 type AccountsPatchCall struct {
16180 s *Service
16181 profileId int64
16182 account *Account
16183 urlParams_ gensupport.URLParams
16184 ctx_ context.Context
16185 header_ http.Header
16186 }
16187
16188
16189
16190
16191
16192
16193 func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
16194 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16195 c.profileId = profileId
16196 c.urlParams_.Set("id", fmt.Sprint(id))
16197 c.account = account
16198 return c
16199 }
16200
16201
16202
16203
16204 func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
16205 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16206 return c
16207 }
16208
16209
16210
16211
16212 func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
16213 c.ctx_ = ctx
16214 return c
16215 }
16216
16217
16218
16219 func (c *AccountsPatchCall) Header() http.Header {
16220 if c.header_ == nil {
16221 c.header_ = make(http.Header)
16222 }
16223 return c.header_
16224 }
16225
16226 func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
16227 reqHeaders := make(http.Header)
16228 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
16229 for k, v := range c.header_ {
16230 reqHeaders[k] = v
16231 }
16232 reqHeaders.Set("User-Agent", c.s.userAgent())
16233 var body io.Reader = nil
16234 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16235 if err != nil {
16236 return nil, err
16237 }
16238 reqHeaders.Set("Content-Type", "application/json")
16239 c.urlParams_.Set("alt", alt)
16240 c.urlParams_.Set("prettyPrint", "false")
16241 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16242 urls += "?" + c.urlParams_.Encode()
16243 req, err := http.NewRequest("PATCH", urls, body)
16244 if err != nil {
16245 return nil, err
16246 }
16247 req.Header = reqHeaders
16248 googleapi.Expand(req.URL, map[string]string{
16249 "profileId": strconv.FormatInt(c.profileId, 10),
16250 })
16251 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16252 }
16253
16254
16255
16256
16257
16258
16259
16260
16261 func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16262 gensupport.SetOptions(c.urlParams_, opts...)
16263 res, err := c.doRequest("json")
16264 if res != nil && res.StatusCode == http.StatusNotModified {
16265 if res.Body != nil {
16266 res.Body.Close()
16267 }
16268 return nil, &googleapi.Error{
16269 Code: res.StatusCode,
16270 Header: res.Header,
16271 }
16272 }
16273 if err != nil {
16274 return nil, err
16275 }
16276 defer googleapi.CloseBody(res)
16277 if err := googleapi.CheckResponse(res); err != nil {
16278 return nil, err
16279 }
16280 ret := &Account{
16281 ServerResponse: googleapi.ServerResponse{
16282 Header: res.Header,
16283 HTTPStatusCode: res.StatusCode,
16284 },
16285 }
16286 target := &ret
16287 if err := gensupport.DecodeResponse(target, res); err != nil {
16288 return nil, err
16289 }
16290 return ret, nil
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328 }
16329
16330
16331
16332 type AccountsUpdateCall struct {
16333 s *Service
16334 profileId int64
16335 account *Account
16336 urlParams_ gensupport.URLParams
16337 ctx_ context.Context
16338 header_ http.Header
16339 }
16340
16341
16342
16343
16344 func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
16345 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16346 c.profileId = profileId
16347 c.account = account
16348 return c
16349 }
16350
16351
16352
16353
16354 func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
16355 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16356 return c
16357 }
16358
16359
16360
16361
16362 func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
16363 c.ctx_ = ctx
16364 return c
16365 }
16366
16367
16368
16369 func (c *AccountsUpdateCall) Header() http.Header {
16370 if c.header_ == nil {
16371 c.header_ = make(http.Header)
16372 }
16373 return c.header_
16374 }
16375
16376 func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
16377 reqHeaders := make(http.Header)
16378 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
16379 for k, v := range c.header_ {
16380 reqHeaders[k] = v
16381 }
16382 reqHeaders.Set("User-Agent", c.s.userAgent())
16383 var body io.Reader = nil
16384 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
16385 if err != nil {
16386 return nil, err
16387 }
16388 reqHeaders.Set("Content-Type", "application/json")
16389 c.urlParams_.Set("alt", alt)
16390 c.urlParams_.Set("prettyPrint", "false")
16391 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accounts")
16392 urls += "?" + c.urlParams_.Encode()
16393 req, err := http.NewRequest("PUT", urls, body)
16394 if err != nil {
16395 return nil, err
16396 }
16397 req.Header = reqHeaders
16398 googleapi.Expand(req.URL, map[string]string{
16399 "profileId": strconv.FormatInt(c.profileId, 10),
16400 })
16401 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16402 }
16403
16404
16405
16406
16407
16408
16409
16410
16411 func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
16412 gensupport.SetOptions(c.urlParams_, opts...)
16413 res, err := c.doRequest("json")
16414 if res != nil && res.StatusCode == http.StatusNotModified {
16415 if res.Body != nil {
16416 res.Body.Close()
16417 }
16418 return nil, &googleapi.Error{
16419 Code: res.StatusCode,
16420 Header: res.Header,
16421 }
16422 }
16423 if err != nil {
16424 return nil, err
16425 }
16426 defer googleapi.CloseBody(res)
16427 if err := googleapi.CheckResponse(res); err != nil {
16428 return nil, err
16429 }
16430 ret := &Account{
16431 ServerResponse: googleapi.ServerResponse{
16432 Header: res.Header,
16433 HTTPStatusCode: res.StatusCode,
16434 },
16435 }
16436 target := &ret
16437 if err := gensupport.DecodeResponse(target, res); err != nil {
16438 return nil, err
16439 }
16440 return ret, nil
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470 }
16471
16472
16473
16474 type AdsGetCall struct {
16475 s *Service
16476 profileId int64
16477 id int64
16478 urlParams_ gensupport.URLParams
16479 ifNoneMatch_ string
16480 ctx_ context.Context
16481 header_ http.Header
16482 }
16483
16484
16485
16486
16487
16488 func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
16489 c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16490 c.profileId = profileId
16491 c.id = id
16492 return c
16493 }
16494
16495
16496
16497
16498 func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
16499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16500 return c
16501 }
16502
16503
16504
16505
16506
16507
16508 func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
16509 c.ifNoneMatch_ = entityTag
16510 return c
16511 }
16512
16513
16514
16515
16516 func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
16517 c.ctx_ = ctx
16518 return c
16519 }
16520
16521
16522
16523 func (c *AdsGetCall) Header() http.Header {
16524 if c.header_ == nil {
16525 c.header_ = make(http.Header)
16526 }
16527 return c.header_
16528 }
16529
16530 func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
16531 reqHeaders := make(http.Header)
16532 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
16533 for k, v := range c.header_ {
16534 reqHeaders[k] = v
16535 }
16536 reqHeaders.Set("User-Agent", c.s.userAgent())
16537 if c.ifNoneMatch_ != "" {
16538 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16539 }
16540 var body io.Reader = nil
16541 c.urlParams_.Set("alt", alt)
16542 c.urlParams_.Set("prettyPrint", "false")
16543 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads/{id}")
16544 urls += "?" + c.urlParams_.Encode()
16545 req, err := http.NewRequest("GET", urls, body)
16546 if err != nil {
16547 return nil, err
16548 }
16549 req.Header = reqHeaders
16550 googleapi.Expand(req.URL, map[string]string{
16551 "profileId": strconv.FormatInt(c.profileId, 10),
16552 "id": strconv.FormatInt(c.id, 10),
16553 })
16554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16555 }
16556
16557
16558
16559
16560
16561
16562
16563
16564 func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16565 gensupport.SetOptions(c.urlParams_, opts...)
16566 res, err := c.doRequest("json")
16567 if res != nil && res.StatusCode == http.StatusNotModified {
16568 if res.Body != nil {
16569 res.Body.Close()
16570 }
16571 return nil, &googleapi.Error{
16572 Code: res.StatusCode,
16573 Header: res.Header,
16574 }
16575 }
16576 if err != nil {
16577 return nil, err
16578 }
16579 defer googleapi.CloseBody(res)
16580 if err := googleapi.CheckResponse(res); err != nil {
16581 return nil, err
16582 }
16583 ret := &Ad{
16584 ServerResponse: googleapi.ServerResponse{
16585 Header: res.Header,
16586 HTTPStatusCode: res.StatusCode,
16587 },
16588 }
16589 target := &ret
16590 if err := gensupport.DecodeResponse(target, res); err != nil {
16591 return nil, err
16592 }
16593 return ret, nil
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628 }
16629
16630
16631
16632 type AdsInsertCall struct {
16633 s *Service
16634 profileId int64
16635 ad *Ad
16636 urlParams_ gensupport.URLParams
16637 ctx_ context.Context
16638 header_ http.Header
16639 }
16640
16641
16642
16643
16644 func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
16645 c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16646 c.profileId = profileId
16647 c.ad = ad
16648 return c
16649 }
16650
16651
16652
16653
16654 func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
16655 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16656 return c
16657 }
16658
16659
16660
16661
16662 func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
16663 c.ctx_ = ctx
16664 return c
16665 }
16666
16667
16668
16669 func (c *AdsInsertCall) Header() http.Header {
16670 if c.header_ == nil {
16671 c.header_ = make(http.Header)
16672 }
16673 return c.header_
16674 }
16675
16676 func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
16677 reqHeaders := make(http.Header)
16678 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
16679 for k, v := range c.header_ {
16680 reqHeaders[k] = v
16681 }
16682 reqHeaders.Set("User-Agent", c.s.userAgent())
16683 var body io.Reader = nil
16684 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
16685 if err != nil {
16686 return nil, err
16687 }
16688 reqHeaders.Set("Content-Type", "application/json")
16689 c.urlParams_.Set("alt", alt)
16690 c.urlParams_.Set("prettyPrint", "false")
16691 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
16692 urls += "?" + c.urlParams_.Encode()
16693 req, err := http.NewRequest("POST", urls, body)
16694 if err != nil {
16695 return nil, err
16696 }
16697 req.Header = reqHeaders
16698 googleapi.Expand(req.URL, map[string]string{
16699 "profileId": strconv.FormatInt(c.profileId, 10),
16700 })
16701 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16702 }
16703
16704
16705
16706
16707
16708
16709
16710
16711 func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
16712 gensupport.SetOptions(c.urlParams_, opts...)
16713 res, err := c.doRequest("json")
16714 if res != nil && res.StatusCode == http.StatusNotModified {
16715 if res.Body != nil {
16716 res.Body.Close()
16717 }
16718 return nil, &googleapi.Error{
16719 Code: res.StatusCode,
16720 Header: res.Header,
16721 }
16722 }
16723 if err != nil {
16724 return nil, err
16725 }
16726 defer googleapi.CloseBody(res)
16727 if err := googleapi.CheckResponse(res); err != nil {
16728 return nil, err
16729 }
16730 ret := &Ad{
16731 ServerResponse: googleapi.ServerResponse{
16732 Header: res.Header,
16733 HTTPStatusCode: res.StatusCode,
16734 },
16735 }
16736 target := &ret
16737 if err := gensupport.DecodeResponse(target, res); err != nil {
16738 return nil, err
16739 }
16740 return ret, nil
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770 }
16771
16772
16773
16774 type AdsListCall struct {
16775 s *Service
16776 profileId int64
16777 urlParams_ gensupport.URLParams
16778 ifNoneMatch_ string
16779 ctx_ context.Context
16780 header_ http.Header
16781 }
16782
16783
16784
16785
16786
16787 func (r *AdsService) List(profileId int64) *AdsListCall {
16788 c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16789 c.profileId = profileId
16790 return c
16791 }
16792
16793
16794 func (c *AdsListCall) Active(active bool) *AdsListCall {
16795 c.urlParams_.Set("active", fmt.Sprint(active))
16796 return c
16797 }
16798
16799
16800
16801 func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
16802 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
16803 return c
16804 }
16805
16806
16807
16808 func (c *AdsListCall) Archived(archived bool) *AdsListCall {
16809 c.urlParams_.Set("archived", fmt.Sprint(archived))
16810 return c
16811 }
16812
16813
16814
16815 func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
16816 var audienceSegmentIds_ []string
16817 for _, v := range audienceSegmentIds {
16818 audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
16819 }
16820 c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
16821 return c
16822 }
16823
16824
16825
16826 func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
16827 var campaignIds_ []string
16828 for _, v := range campaignIds {
16829 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
16830 }
16831 c.urlParams_.SetMulti("campaignIds", campaignIds_)
16832 return c
16833 }
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851 func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
16852 c.urlParams_.Set("compatibility", compatibility)
16853 return c
16854 }
16855
16856
16857
16858 func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
16859 var creativeIds_ []string
16860 for _, v := range creativeIds {
16861 creativeIds_ = append(creativeIds_, fmt.Sprint(v))
16862 }
16863 c.urlParams_.SetMulti("creativeIds", creativeIds_)
16864 return c
16865 }
16866
16867
16868
16869
16870 func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
16871 var creativeOptimizationConfigurationIds_ []string
16872 for _, v := range creativeOptimizationConfigurationIds {
16873 creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
16874 }
16875 c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
16876 return c
16877 }
16878
16879
16880
16881
16882
16883
16884 func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
16885 c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
16886 return c
16887 }
16888
16889
16890
16891 func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
16892 var ids_ []string
16893 for _, v := range ids {
16894 ids_ = append(ids_, fmt.Sprint(v))
16895 }
16896 c.urlParams_.SetMulti("ids", ids_)
16897 return c
16898 }
16899
16900
16901
16902 func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
16903 var landingPageIds_ []string
16904 for _, v := range landingPageIds {
16905 landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
16906 }
16907 c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
16908 return c
16909 }
16910
16911
16912
16913 func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
16914 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16915 return c
16916 }
16917
16918
16919
16920
16921 func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
16922 c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
16923 return c
16924 }
16925
16926
16927
16928 func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
16929 c.urlParams_.Set("pageToken", pageToken)
16930 return c
16931 }
16932
16933
16934
16935 func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
16936 var placementIds_ []string
16937 for _, v := range placementIds {
16938 placementIds_ = append(placementIds_, fmt.Sprint(v))
16939 }
16940 c.urlParams_.SetMulti("placementIds", placementIds_)
16941 return c
16942 }
16943
16944
16945
16946
16947 func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
16948 var remarketingListIds_ []string
16949 for _, v := range remarketingListIds {
16950 remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
16951 }
16952 c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
16953 return c
16954 }
16955
16956
16957
16958
16959
16960
16961
16962
16963 func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
16964 c.urlParams_.Set("searchString", searchString)
16965 return c
16966 }
16967
16968
16969
16970 func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
16971 var sizeIds_ []string
16972 for _, v := range sizeIds {
16973 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
16974 }
16975 c.urlParams_.SetMulti("sizeIds", sizeIds_)
16976 return c
16977 }
16978
16979
16980
16981
16982
16983
16984
16985
16986 func (c *AdsListCall) SortField(sortField string) *AdsListCall {
16987 c.urlParams_.Set("sortField", sortField)
16988 return c
16989 }
16990
16991
16992
16993
16994
16995
16996
16997
16998 func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
16999 c.urlParams_.Set("sortOrder", sortOrder)
17000 return c
17001 }
17002
17003
17004
17005 func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
17006 c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
17007 return c
17008 }
17009
17010
17011
17012 func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
17013 c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
17014 return c
17015 }
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027 func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
17028 c.urlParams_.SetMulti("type", append([]string{}, type_...))
17029 return c
17030 }
17031
17032
17033
17034
17035 func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
17036 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17037 return c
17038 }
17039
17040
17041
17042
17043
17044
17045 func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
17046 c.ifNoneMatch_ = entityTag
17047 return c
17048 }
17049
17050
17051
17052
17053 func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
17054 c.ctx_ = ctx
17055 return c
17056 }
17057
17058
17059
17060 func (c *AdsListCall) Header() http.Header {
17061 if c.header_ == nil {
17062 c.header_ = make(http.Header)
17063 }
17064 return c.header_
17065 }
17066
17067 func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
17068 reqHeaders := make(http.Header)
17069 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17070 for k, v := range c.header_ {
17071 reqHeaders[k] = v
17072 }
17073 reqHeaders.Set("User-Agent", c.s.userAgent())
17074 if c.ifNoneMatch_ != "" {
17075 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17076 }
17077 var body io.Reader = nil
17078 c.urlParams_.Set("alt", alt)
17079 c.urlParams_.Set("prettyPrint", "false")
17080 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17081 urls += "?" + c.urlParams_.Encode()
17082 req, err := http.NewRequest("GET", urls, body)
17083 if err != nil {
17084 return nil, err
17085 }
17086 req.Header = reqHeaders
17087 googleapi.Expand(req.URL, map[string]string{
17088 "profileId": strconv.FormatInt(c.profileId, 10),
17089 })
17090 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17091 }
17092
17093
17094
17095
17096
17097
17098
17099
17100 func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
17101 gensupport.SetOptions(c.urlParams_, opts...)
17102 res, err := c.doRequest("json")
17103 if res != nil && res.StatusCode == http.StatusNotModified {
17104 if res.Body != nil {
17105 res.Body.Close()
17106 }
17107 return nil, &googleapi.Error{
17108 Code: res.StatusCode,
17109 Header: res.Header,
17110 }
17111 }
17112 if err != nil {
17113 return nil, err
17114 }
17115 defer googleapi.CloseBody(res)
17116 if err := googleapi.CheckResponse(res); err != nil {
17117 return nil, err
17118 }
17119 ret := &AdsListResponse{
17120 ServerResponse: googleapi.ServerResponse{
17121 Header: res.Header,
17122 HTTPStatusCode: res.StatusCode,
17123 },
17124 }
17125 target := &ret
17126 if err := gensupport.DecodeResponse(target, res); err != nil {
17127 return nil, err
17128 }
17129 return ret, nil
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344 }
17345
17346
17347
17348
17349 func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
17350 c.ctx_ = ctx
17351 defer c.PageToken(c.urlParams_.Get("pageToken"))
17352 for {
17353 x, err := c.Do()
17354 if err != nil {
17355 return err
17356 }
17357 if err := f(x); err != nil {
17358 return err
17359 }
17360 if x.NextPageToken == "" {
17361 return nil
17362 }
17363 c.PageToken(x.NextPageToken)
17364 }
17365 }
17366
17367
17368
17369 type AdsPatchCall struct {
17370 s *Service
17371 profileId int64
17372 ad *Ad
17373 urlParams_ gensupport.URLParams
17374 ctx_ context.Context
17375 header_ http.Header
17376 }
17377
17378
17379
17380
17381
17382 func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
17383 c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17384 c.profileId = profileId
17385 c.urlParams_.Set("id", fmt.Sprint(id))
17386 c.ad = ad
17387 return c
17388 }
17389
17390
17391
17392
17393 func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
17394 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17395 return c
17396 }
17397
17398
17399
17400
17401 func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
17402 c.ctx_ = ctx
17403 return c
17404 }
17405
17406
17407
17408 func (c *AdsPatchCall) Header() http.Header {
17409 if c.header_ == nil {
17410 c.header_ = make(http.Header)
17411 }
17412 return c.header_
17413 }
17414
17415 func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
17416 reqHeaders := make(http.Header)
17417 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17418 for k, v := range c.header_ {
17419 reqHeaders[k] = v
17420 }
17421 reqHeaders.Set("User-Agent", c.s.userAgent())
17422 var body io.Reader = nil
17423 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17424 if err != nil {
17425 return nil, err
17426 }
17427 reqHeaders.Set("Content-Type", "application/json")
17428 c.urlParams_.Set("alt", alt)
17429 c.urlParams_.Set("prettyPrint", "false")
17430 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17431 urls += "?" + c.urlParams_.Encode()
17432 req, err := http.NewRequest("PATCH", urls, body)
17433 if err != nil {
17434 return nil, err
17435 }
17436 req.Header = reqHeaders
17437 googleapi.Expand(req.URL, map[string]string{
17438 "profileId": strconv.FormatInt(c.profileId, 10),
17439 })
17440 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17441 }
17442
17443
17444
17445
17446
17447
17448
17449
17450 func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17451 gensupport.SetOptions(c.urlParams_, opts...)
17452 res, err := c.doRequest("json")
17453 if res != nil && res.StatusCode == http.StatusNotModified {
17454 if res.Body != nil {
17455 res.Body.Close()
17456 }
17457 return nil, &googleapi.Error{
17458 Code: res.StatusCode,
17459 Header: res.Header,
17460 }
17461 }
17462 if err != nil {
17463 return nil, err
17464 }
17465 defer googleapi.CloseBody(res)
17466 if err := googleapi.CheckResponse(res); err != nil {
17467 return nil, err
17468 }
17469 ret := &Ad{
17470 ServerResponse: googleapi.ServerResponse{
17471 Header: res.Header,
17472 HTTPStatusCode: res.StatusCode,
17473 },
17474 }
17475 target := &ret
17476 if err := gensupport.DecodeResponse(target, res); err != nil {
17477 return nil, err
17478 }
17479 return ret, nil
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517 }
17518
17519
17520
17521 type AdsUpdateCall struct {
17522 s *Service
17523 profileId int64
17524 ad *Ad
17525 urlParams_ gensupport.URLParams
17526 ctx_ context.Context
17527 header_ http.Header
17528 }
17529
17530
17531
17532
17533 func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
17534 c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17535 c.profileId = profileId
17536 c.ad = ad
17537 return c
17538 }
17539
17540
17541
17542
17543 func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
17544 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17545 return c
17546 }
17547
17548
17549
17550
17551 func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
17552 c.ctx_ = ctx
17553 return c
17554 }
17555
17556
17557
17558 func (c *AdsUpdateCall) Header() http.Header {
17559 if c.header_ == nil {
17560 c.header_ = make(http.Header)
17561 }
17562 return c.header_
17563 }
17564
17565 func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
17566 reqHeaders := make(http.Header)
17567 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17568 for k, v := range c.header_ {
17569 reqHeaders[k] = v
17570 }
17571 reqHeaders.Set("User-Agent", c.s.userAgent())
17572 var body io.Reader = nil
17573 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
17574 if err != nil {
17575 return nil, err
17576 }
17577 reqHeaders.Set("Content-Type", "application/json")
17578 c.urlParams_.Set("alt", alt)
17579 c.urlParams_.Set("prettyPrint", "false")
17580 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/ads")
17581 urls += "?" + c.urlParams_.Encode()
17582 req, err := http.NewRequest("PUT", urls, body)
17583 if err != nil {
17584 return nil, err
17585 }
17586 req.Header = reqHeaders
17587 googleapi.Expand(req.URL, map[string]string{
17588 "profileId": strconv.FormatInt(c.profileId, 10),
17589 })
17590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17591 }
17592
17593
17594
17595
17596
17597
17598
17599
17600 func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
17601 gensupport.SetOptions(c.urlParams_, opts...)
17602 res, err := c.doRequest("json")
17603 if res != nil && res.StatusCode == http.StatusNotModified {
17604 if res.Body != nil {
17605 res.Body.Close()
17606 }
17607 return nil, &googleapi.Error{
17608 Code: res.StatusCode,
17609 Header: res.Header,
17610 }
17611 }
17612 if err != nil {
17613 return nil, err
17614 }
17615 defer googleapi.CloseBody(res)
17616 if err := googleapi.CheckResponse(res); err != nil {
17617 return nil, err
17618 }
17619 ret := &Ad{
17620 ServerResponse: googleapi.ServerResponse{
17621 Header: res.Header,
17622 HTTPStatusCode: res.StatusCode,
17623 },
17624 }
17625 target := &ret
17626 if err := gensupport.DecodeResponse(target, res); err != nil {
17627 return nil, err
17628 }
17629 return ret, nil
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659 }
17660
17661
17662
17663 type AdvertiserGroupsDeleteCall struct {
17664 s *Service
17665 profileId int64
17666 id int64
17667 urlParams_ gensupport.URLParams
17668 ctx_ context.Context
17669 header_ http.Header
17670 }
17671
17672
17673
17674
17675
17676 func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
17677 c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17678 c.profileId = profileId
17679 c.id = id
17680 return c
17681 }
17682
17683
17684
17685
17686 func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
17687 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17688 return c
17689 }
17690
17691
17692
17693
17694 func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
17695 c.ctx_ = ctx
17696 return c
17697 }
17698
17699
17700
17701 func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
17702 if c.header_ == nil {
17703 c.header_ = make(http.Header)
17704 }
17705 return c.header_
17706 }
17707
17708 func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
17709 reqHeaders := make(http.Header)
17710 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17711 for k, v := range c.header_ {
17712 reqHeaders[k] = v
17713 }
17714 reqHeaders.Set("User-Agent", c.s.userAgent())
17715 var body io.Reader = nil
17716 c.urlParams_.Set("alt", alt)
17717 c.urlParams_.Set("prettyPrint", "false")
17718 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17719 urls += "?" + c.urlParams_.Encode()
17720 req, err := http.NewRequest("DELETE", urls, body)
17721 if err != nil {
17722 return nil, err
17723 }
17724 req.Header = reqHeaders
17725 googleapi.Expand(req.URL, map[string]string{
17726 "profileId": strconv.FormatInt(c.profileId, 10),
17727 "id": strconv.FormatInt(c.id, 10),
17728 })
17729 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17730 }
17731
17732
17733 func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
17734 gensupport.SetOptions(c.urlParams_, opts...)
17735 res, err := c.doRequest("json")
17736 if err != nil {
17737 return err
17738 }
17739 defer googleapi.CloseBody(res)
17740 if err := googleapi.CheckResponse(res); err != nil {
17741 return err
17742 }
17743 return nil
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775 }
17776
17777
17778
17779 type AdvertiserGroupsGetCall struct {
17780 s *Service
17781 profileId int64
17782 id int64
17783 urlParams_ gensupport.URLParams
17784 ifNoneMatch_ string
17785 ctx_ context.Context
17786 header_ http.Header
17787 }
17788
17789
17790
17791
17792
17793 func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
17794 c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17795 c.profileId = profileId
17796 c.id = id
17797 return c
17798 }
17799
17800
17801
17802
17803 func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
17804 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17805 return c
17806 }
17807
17808
17809
17810
17811
17812
17813 func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
17814 c.ifNoneMatch_ = entityTag
17815 return c
17816 }
17817
17818
17819
17820
17821 func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
17822 c.ctx_ = ctx
17823 return c
17824 }
17825
17826
17827
17828 func (c *AdvertiserGroupsGetCall) Header() http.Header {
17829 if c.header_ == nil {
17830 c.header_ = make(http.Header)
17831 }
17832 return c.header_
17833 }
17834
17835 func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
17836 reqHeaders := make(http.Header)
17837 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17838 for k, v := range c.header_ {
17839 reqHeaders[k] = v
17840 }
17841 reqHeaders.Set("User-Agent", c.s.userAgent())
17842 if c.ifNoneMatch_ != "" {
17843 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17844 }
17845 var body io.Reader = nil
17846 c.urlParams_.Set("alt", alt)
17847 c.urlParams_.Set("prettyPrint", "false")
17848 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups/{id}")
17849 urls += "?" + c.urlParams_.Encode()
17850 req, err := http.NewRequest("GET", urls, body)
17851 if err != nil {
17852 return nil, err
17853 }
17854 req.Header = reqHeaders
17855 googleapi.Expand(req.URL, map[string]string{
17856 "profileId": strconv.FormatInt(c.profileId, 10),
17857 "id": strconv.FormatInt(c.id, 10),
17858 })
17859 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17860 }
17861
17862
17863
17864
17865
17866
17867
17868
17869 func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
17870 gensupport.SetOptions(c.urlParams_, opts...)
17871 res, err := c.doRequest("json")
17872 if res != nil && res.StatusCode == http.StatusNotModified {
17873 if res.Body != nil {
17874 res.Body.Close()
17875 }
17876 return nil, &googleapi.Error{
17877 Code: res.StatusCode,
17878 Header: res.Header,
17879 }
17880 }
17881 if err != nil {
17882 return nil, err
17883 }
17884 defer googleapi.CloseBody(res)
17885 if err := googleapi.CheckResponse(res); err != nil {
17886 return nil, err
17887 }
17888 ret := &AdvertiserGroup{
17889 ServerResponse: googleapi.ServerResponse{
17890 Header: res.Header,
17891 HTTPStatusCode: res.StatusCode,
17892 },
17893 }
17894 target := &ret
17895 if err := gensupport.DecodeResponse(target, res); err != nil {
17896 return nil, err
17897 }
17898 return ret, nil
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933 }
17934
17935
17936
17937 type AdvertiserGroupsInsertCall struct {
17938 s *Service
17939 profileId int64
17940 advertisergroup *AdvertiserGroup
17941 urlParams_ gensupport.URLParams
17942 ctx_ context.Context
17943 header_ http.Header
17944 }
17945
17946
17947
17948
17949 func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
17950 c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17951 c.profileId = profileId
17952 c.advertisergroup = advertisergroup
17953 return c
17954 }
17955
17956
17957
17958
17959 func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
17960 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17961 return c
17962 }
17963
17964
17965
17966
17967 func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
17968 c.ctx_ = ctx
17969 return c
17970 }
17971
17972
17973
17974 func (c *AdvertiserGroupsInsertCall) Header() http.Header {
17975 if c.header_ == nil {
17976 c.header_ = make(http.Header)
17977 }
17978 return c.header_
17979 }
17980
17981 func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
17982 reqHeaders := make(http.Header)
17983 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
17984 for k, v := range c.header_ {
17985 reqHeaders[k] = v
17986 }
17987 reqHeaders.Set("User-Agent", c.s.userAgent())
17988 var body io.Reader = nil
17989 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
17990 if err != nil {
17991 return nil, err
17992 }
17993 reqHeaders.Set("Content-Type", "application/json")
17994 c.urlParams_.Set("alt", alt)
17995 c.urlParams_.Set("prettyPrint", "false")
17996 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
17997 urls += "?" + c.urlParams_.Encode()
17998 req, err := http.NewRequest("POST", urls, body)
17999 if err != nil {
18000 return nil, err
18001 }
18002 req.Header = reqHeaders
18003 googleapi.Expand(req.URL, map[string]string{
18004 "profileId": strconv.FormatInt(c.profileId, 10),
18005 })
18006 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18007 }
18008
18009
18010
18011
18012
18013
18014
18015
18016 func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18017 gensupport.SetOptions(c.urlParams_, opts...)
18018 res, err := c.doRequest("json")
18019 if res != nil && res.StatusCode == http.StatusNotModified {
18020 if res.Body != nil {
18021 res.Body.Close()
18022 }
18023 return nil, &googleapi.Error{
18024 Code: res.StatusCode,
18025 Header: res.Header,
18026 }
18027 }
18028 if err != nil {
18029 return nil, err
18030 }
18031 defer googleapi.CloseBody(res)
18032 if err := googleapi.CheckResponse(res); err != nil {
18033 return nil, err
18034 }
18035 ret := &AdvertiserGroup{
18036 ServerResponse: googleapi.ServerResponse{
18037 Header: res.Header,
18038 HTTPStatusCode: res.StatusCode,
18039 },
18040 }
18041 target := &ret
18042 if err := gensupport.DecodeResponse(target, res); err != nil {
18043 return nil, err
18044 }
18045 return ret, nil
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075 }
18076
18077
18078
18079 type AdvertiserGroupsListCall struct {
18080 s *Service
18081 profileId int64
18082 urlParams_ gensupport.URLParams
18083 ifNoneMatch_ string
18084 ctx_ context.Context
18085 header_ http.Header
18086 }
18087
18088
18089
18090
18091
18092 func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
18093 c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18094 c.profileId = profileId
18095 return c
18096 }
18097
18098
18099
18100 func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
18101 var ids_ []string
18102 for _, v := range ids {
18103 ids_ = append(ids_, fmt.Sprint(v))
18104 }
18105 c.urlParams_.SetMulti("ids", ids_)
18106 return c
18107 }
18108
18109
18110
18111 func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
18112 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18113 return c
18114 }
18115
18116
18117
18118 func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
18119 c.urlParams_.Set("pageToken", pageToken)
18120 return c
18121 }
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132 func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
18133 c.urlParams_.Set("searchString", searchString)
18134 return c
18135 }
18136
18137
18138
18139
18140
18141
18142
18143
18144 func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
18145 c.urlParams_.Set("sortField", sortField)
18146 return c
18147 }
18148
18149
18150
18151
18152
18153
18154
18155
18156 func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
18157 c.urlParams_.Set("sortOrder", sortOrder)
18158 return c
18159 }
18160
18161
18162
18163
18164 func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
18165 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18166 return c
18167 }
18168
18169
18170
18171
18172
18173
18174 func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
18175 c.ifNoneMatch_ = entityTag
18176 return c
18177 }
18178
18179
18180
18181
18182 func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
18183 c.ctx_ = ctx
18184 return c
18185 }
18186
18187
18188
18189 func (c *AdvertiserGroupsListCall) Header() http.Header {
18190 if c.header_ == nil {
18191 c.header_ = make(http.Header)
18192 }
18193 return c.header_
18194 }
18195
18196 func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
18197 reqHeaders := make(http.Header)
18198 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
18199 for k, v := range c.header_ {
18200 reqHeaders[k] = v
18201 }
18202 reqHeaders.Set("User-Agent", c.s.userAgent())
18203 if c.ifNoneMatch_ != "" {
18204 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18205 }
18206 var body io.Reader = nil
18207 c.urlParams_.Set("alt", alt)
18208 c.urlParams_.Set("prettyPrint", "false")
18209 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18210 urls += "?" + c.urlParams_.Encode()
18211 req, err := http.NewRequest("GET", urls, body)
18212 if err != nil {
18213 return nil, err
18214 }
18215 req.Header = reqHeaders
18216 googleapi.Expand(req.URL, map[string]string{
18217 "profileId": strconv.FormatInt(c.profileId, 10),
18218 })
18219 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18220 }
18221
18222
18223
18224
18225
18226
18227
18228
18229 func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
18230 gensupport.SetOptions(c.urlParams_, opts...)
18231 res, err := c.doRequest("json")
18232 if res != nil && res.StatusCode == http.StatusNotModified {
18233 if res.Body != nil {
18234 res.Body.Close()
18235 }
18236 return nil, &googleapi.Error{
18237 Code: res.StatusCode,
18238 Header: res.Header,
18239 }
18240 }
18241 if err != nil {
18242 return nil, err
18243 }
18244 defer googleapi.CloseBody(res)
18245 if err := googleapi.CheckResponse(res); err != nil {
18246 return nil, err
18247 }
18248 ret := &AdvertiserGroupsListResponse{
18249 ServerResponse: googleapi.ServerResponse{
18250 Header: res.Header,
18251 HTTPStatusCode: res.StatusCode,
18252 },
18253 }
18254 target := &ret
18255 if err := gensupport.DecodeResponse(target, res); err != nil {
18256 return nil, err
18257 }
18258 return ret, nil
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339 }
18340
18341
18342
18343
18344 func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
18345 c.ctx_ = ctx
18346 defer c.PageToken(c.urlParams_.Get("pageToken"))
18347 for {
18348 x, err := c.Do()
18349 if err != nil {
18350 return err
18351 }
18352 if err := f(x); err != nil {
18353 return err
18354 }
18355 if x.NextPageToken == "" {
18356 return nil
18357 }
18358 c.PageToken(x.NextPageToken)
18359 }
18360 }
18361
18362
18363
18364 type AdvertiserGroupsPatchCall struct {
18365 s *Service
18366 profileId int64
18367 advertisergroup *AdvertiserGroup
18368 urlParams_ gensupport.URLParams
18369 ctx_ context.Context
18370 header_ http.Header
18371 }
18372
18373
18374
18375
18376
18377
18378 func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
18379 c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18380 c.profileId = profileId
18381 c.urlParams_.Set("id", fmt.Sprint(id))
18382 c.advertisergroup = advertisergroup
18383 return c
18384 }
18385
18386
18387
18388
18389 func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
18390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18391 return c
18392 }
18393
18394
18395
18396
18397 func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
18398 c.ctx_ = ctx
18399 return c
18400 }
18401
18402
18403
18404 func (c *AdvertiserGroupsPatchCall) Header() http.Header {
18405 if c.header_ == nil {
18406 c.header_ = make(http.Header)
18407 }
18408 return c.header_
18409 }
18410
18411 func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
18412 reqHeaders := make(http.Header)
18413 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
18414 for k, v := range c.header_ {
18415 reqHeaders[k] = v
18416 }
18417 reqHeaders.Set("User-Agent", c.s.userAgent())
18418 var body io.Reader = nil
18419 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18420 if err != nil {
18421 return nil, err
18422 }
18423 reqHeaders.Set("Content-Type", "application/json")
18424 c.urlParams_.Set("alt", alt)
18425 c.urlParams_.Set("prettyPrint", "false")
18426 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18427 urls += "?" + c.urlParams_.Encode()
18428 req, err := http.NewRequest("PATCH", urls, body)
18429 if err != nil {
18430 return nil, err
18431 }
18432 req.Header = reqHeaders
18433 googleapi.Expand(req.URL, map[string]string{
18434 "profileId": strconv.FormatInt(c.profileId, 10),
18435 })
18436 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18437 }
18438
18439
18440
18441
18442
18443
18444
18445
18446 func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18447 gensupport.SetOptions(c.urlParams_, opts...)
18448 res, err := c.doRequest("json")
18449 if res != nil && res.StatusCode == http.StatusNotModified {
18450 if res.Body != nil {
18451 res.Body.Close()
18452 }
18453 return nil, &googleapi.Error{
18454 Code: res.StatusCode,
18455 Header: res.Header,
18456 }
18457 }
18458 if err != nil {
18459 return nil, err
18460 }
18461 defer googleapi.CloseBody(res)
18462 if err := googleapi.CheckResponse(res); err != nil {
18463 return nil, err
18464 }
18465 ret := &AdvertiserGroup{
18466 ServerResponse: googleapi.ServerResponse{
18467 Header: res.Header,
18468 HTTPStatusCode: res.StatusCode,
18469 },
18470 }
18471 target := &ret
18472 if err := gensupport.DecodeResponse(target, res); err != nil {
18473 return nil, err
18474 }
18475 return ret, nil
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513 }
18514
18515
18516
18517 type AdvertiserGroupsUpdateCall struct {
18518 s *Service
18519 profileId int64
18520 advertisergroup *AdvertiserGroup
18521 urlParams_ gensupport.URLParams
18522 ctx_ context.Context
18523 header_ http.Header
18524 }
18525
18526
18527
18528
18529 func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
18530 c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18531 c.profileId = profileId
18532 c.advertisergroup = advertisergroup
18533 return c
18534 }
18535
18536
18537
18538
18539 func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
18540 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18541 return c
18542 }
18543
18544
18545
18546
18547 func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
18548 c.ctx_ = ctx
18549 return c
18550 }
18551
18552
18553
18554 func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
18555 if c.header_ == nil {
18556 c.header_ = make(http.Header)
18557 }
18558 return c.header_
18559 }
18560
18561 func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
18562 reqHeaders := make(http.Header)
18563 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
18564 for k, v := range c.header_ {
18565 reqHeaders[k] = v
18566 }
18567 reqHeaders.Set("User-Agent", c.s.userAgent())
18568 var body io.Reader = nil
18569 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
18570 if err != nil {
18571 return nil, err
18572 }
18573 reqHeaders.Set("Content-Type", "application/json")
18574 c.urlParams_.Set("alt", alt)
18575 c.urlParams_.Set("prettyPrint", "false")
18576 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserGroups")
18577 urls += "?" + c.urlParams_.Encode()
18578 req, err := http.NewRequest("PUT", urls, body)
18579 if err != nil {
18580 return nil, err
18581 }
18582 req.Header = reqHeaders
18583 googleapi.Expand(req.URL, map[string]string{
18584 "profileId": strconv.FormatInt(c.profileId, 10),
18585 })
18586 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18587 }
18588
18589
18590
18591
18592
18593
18594
18595
18596 func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
18597 gensupport.SetOptions(c.urlParams_, opts...)
18598 res, err := c.doRequest("json")
18599 if res != nil && res.StatusCode == http.StatusNotModified {
18600 if res.Body != nil {
18601 res.Body.Close()
18602 }
18603 return nil, &googleapi.Error{
18604 Code: res.StatusCode,
18605 Header: res.Header,
18606 }
18607 }
18608 if err != nil {
18609 return nil, err
18610 }
18611 defer googleapi.CloseBody(res)
18612 if err := googleapi.CheckResponse(res); err != nil {
18613 return nil, err
18614 }
18615 ret := &AdvertiserGroup{
18616 ServerResponse: googleapi.ServerResponse{
18617 Header: res.Header,
18618 HTTPStatusCode: res.StatusCode,
18619 },
18620 }
18621 target := &ret
18622 if err := gensupport.DecodeResponse(target, res); err != nil {
18623 return nil, err
18624 }
18625 return ret, nil
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655 }
18656
18657
18658
18659 type AdvertiserLandingPagesGetCall struct {
18660 s *Service
18661 profileId int64
18662 id int64
18663 urlParams_ gensupport.URLParams
18664 ifNoneMatch_ string
18665 ctx_ context.Context
18666 header_ http.Header
18667 }
18668
18669
18670
18671
18672
18673 func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
18674 c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18675 c.profileId = profileId
18676 c.id = id
18677 return c
18678 }
18679
18680
18681
18682
18683 func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
18684 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18685 return c
18686 }
18687
18688
18689
18690
18691
18692
18693 func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
18694 c.ifNoneMatch_ = entityTag
18695 return c
18696 }
18697
18698
18699
18700
18701 func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
18702 c.ctx_ = ctx
18703 return c
18704 }
18705
18706
18707
18708 func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
18709 if c.header_ == nil {
18710 c.header_ = make(http.Header)
18711 }
18712 return c.header_
18713 }
18714
18715 func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
18716 reqHeaders := make(http.Header)
18717 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
18718 for k, v := range c.header_ {
18719 reqHeaders[k] = v
18720 }
18721 reqHeaders.Set("User-Agent", c.s.userAgent())
18722 if c.ifNoneMatch_ != "" {
18723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18724 }
18725 var body io.Reader = nil
18726 c.urlParams_.Set("alt", alt)
18727 c.urlParams_.Set("prettyPrint", "false")
18728 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages/{id}")
18729 urls += "?" + c.urlParams_.Encode()
18730 req, err := http.NewRequest("GET", urls, body)
18731 if err != nil {
18732 return nil, err
18733 }
18734 req.Header = reqHeaders
18735 googleapi.Expand(req.URL, map[string]string{
18736 "profileId": strconv.FormatInt(c.profileId, 10),
18737 "id": strconv.FormatInt(c.id, 10),
18738 })
18739 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18740 }
18741
18742
18743
18744
18745
18746
18747
18748
18749 func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18750 gensupport.SetOptions(c.urlParams_, opts...)
18751 res, err := c.doRequest("json")
18752 if res != nil && res.StatusCode == http.StatusNotModified {
18753 if res.Body != nil {
18754 res.Body.Close()
18755 }
18756 return nil, &googleapi.Error{
18757 Code: res.StatusCode,
18758 Header: res.Header,
18759 }
18760 }
18761 if err != nil {
18762 return nil, err
18763 }
18764 defer googleapi.CloseBody(res)
18765 if err := googleapi.CheckResponse(res); err != nil {
18766 return nil, err
18767 }
18768 ret := &LandingPage{
18769 ServerResponse: googleapi.ServerResponse{
18770 Header: res.Header,
18771 HTTPStatusCode: res.StatusCode,
18772 },
18773 }
18774 target := &ret
18775 if err := gensupport.DecodeResponse(target, res); err != nil {
18776 return nil, err
18777 }
18778 return ret, nil
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813 }
18814
18815
18816
18817 type AdvertiserLandingPagesInsertCall struct {
18818 s *Service
18819 profileId int64
18820 landingpage *LandingPage
18821 urlParams_ gensupport.URLParams
18822 ctx_ context.Context
18823 header_ http.Header
18824 }
18825
18826
18827
18828
18829 func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
18830 c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18831 c.profileId = profileId
18832 c.landingpage = landingpage
18833 return c
18834 }
18835
18836
18837
18838
18839 func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
18840 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18841 return c
18842 }
18843
18844
18845
18846
18847 func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
18848 c.ctx_ = ctx
18849 return c
18850 }
18851
18852
18853
18854 func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
18855 if c.header_ == nil {
18856 c.header_ = make(http.Header)
18857 }
18858 return c.header_
18859 }
18860
18861 func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
18862 reqHeaders := make(http.Header)
18863 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
18864 for k, v := range c.header_ {
18865 reqHeaders[k] = v
18866 }
18867 reqHeaders.Set("User-Agent", c.s.userAgent())
18868 var body io.Reader = nil
18869 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
18870 if err != nil {
18871 return nil, err
18872 }
18873 reqHeaders.Set("Content-Type", "application/json")
18874 c.urlParams_.Set("alt", alt)
18875 c.urlParams_.Set("prettyPrint", "false")
18876 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
18877 urls += "?" + c.urlParams_.Encode()
18878 req, err := http.NewRequest("POST", urls, body)
18879 if err != nil {
18880 return nil, err
18881 }
18882 req.Header = reqHeaders
18883 googleapi.Expand(req.URL, map[string]string{
18884 "profileId": strconv.FormatInt(c.profileId, 10),
18885 })
18886 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18887 }
18888
18889
18890
18891
18892
18893
18894
18895
18896 func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
18897 gensupport.SetOptions(c.urlParams_, opts...)
18898 res, err := c.doRequest("json")
18899 if res != nil && res.StatusCode == http.StatusNotModified {
18900 if res.Body != nil {
18901 res.Body.Close()
18902 }
18903 return nil, &googleapi.Error{
18904 Code: res.StatusCode,
18905 Header: res.Header,
18906 }
18907 }
18908 if err != nil {
18909 return nil, err
18910 }
18911 defer googleapi.CloseBody(res)
18912 if err := googleapi.CheckResponse(res); err != nil {
18913 return nil, err
18914 }
18915 ret := &LandingPage{
18916 ServerResponse: googleapi.ServerResponse{
18917 Header: res.Header,
18918 HTTPStatusCode: res.StatusCode,
18919 },
18920 }
18921 target := &ret
18922 if err := gensupport.DecodeResponse(target, res); err != nil {
18923 return nil, err
18924 }
18925 return ret, nil
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955 }
18956
18957
18958
18959 type AdvertiserLandingPagesListCall struct {
18960 s *Service
18961 profileId int64
18962 urlParams_ gensupport.URLParams
18963 ifNoneMatch_ string
18964 ctx_ context.Context
18965 header_ http.Header
18966 }
18967
18968
18969
18970
18971 func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
18972 c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18973 c.profileId = profileId
18974 return c
18975 }
18976
18977
18978
18979 func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
18980 var advertiserIds_ []string
18981 for _, v := range advertiserIds {
18982 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
18983 }
18984 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
18985 return c
18986 }
18987
18988
18989
18990
18991 func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
18992 c.urlParams_.Set("archived", fmt.Sprint(archived))
18993 return c
18994 }
18995
18996
18997
18998 func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
18999 var campaignIds_ []string
19000 for _, v := range campaignIds {
19001 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
19002 }
19003 c.urlParams_.SetMulti("campaignIds", campaignIds_)
19004 return c
19005 }
19006
19007
19008
19009 func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
19010 var ids_ []string
19011 for _, v := range ids {
19012 ids_ = append(ids_, fmt.Sprint(v))
19013 }
19014 c.urlParams_.SetMulti("ids", ids_)
19015 return c
19016 }
19017
19018
19019
19020 func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
19021 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19022 return c
19023 }
19024
19025
19026
19027 func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
19028 c.urlParams_.Set("pageToken", pageToken)
19029 return c
19030 }
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040 func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
19041 c.urlParams_.Set("searchString", searchString)
19042 return c
19043 }
19044
19045
19046
19047
19048
19049
19050
19051
19052 func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
19053 c.urlParams_.Set("sortField", sortField)
19054 return c
19055 }
19056
19057
19058
19059
19060
19061
19062
19063
19064 func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
19065 c.urlParams_.Set("sortOrder", sortOrder)
19066 return c
19067 }
19068
19069
19070
19071 func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
19072 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
19073 return c
19074 }
19075
19076
19077
19078
19079 func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
19080 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19081 return c
19082 }
19083
19084
19085
19086
19087
19088
19089 func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
19090 c.ifNoneMatch_ = entityTag
19091 return c
19092 }
19093
19094
19095
19096
19097 func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
19098 c.ctx_ = ctx
19099 return c
19100 }
19101
19102
19103
19104 func (c *AdvertiserLandingPagesListCall) Header() http.Header {
19105 if c.header_ == nil {
19106 c.header_ = make(http.Header)
19107 }
19108 return c.header_
19109 }
19110
19111 func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
19112 reqHeaders := make(http.Header)
19113 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
19114 for k, v := range c.header_ {
19115 reqHeaders[k] = v
19116 }
19117 reqHeaders.Set("User-Agent", c.s.userAgent())
19118 if c.ifNoneMatch_ != "" {
19119 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19120 }
19121 var body io.Reader = nil
19122 c.urlParams_.Set("alt", alt)
19123 c.urlParams_.Set("prettyPrint", "false")
19124 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19125 urls += "?" + c.urlParams_.Encode()
19126 req, err := http.NewRequest("GET", urls, body)
19127 if err != nil {
19128 return nil, err
19129 }
19130 req.Header = reqHeaders
19131 googleapi.Expand(req.URL, map[string]string{
19132 "profileId": strconv.FormatInt(c.profileId, 10),
19133 })
19134 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19135 }
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145 func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
19146 gensupport.SetOptions(c.urlParams_, opts...)
19147 res, err := c.doRequest("json")
19148 if res != nil && res.StatusCode == http.StatusNotModified {
19149 if res.Body != nil {
19150 res.Body.Close()
19151 }
19152 return nil, &googleapi.Error{
19153 Code: res.StatusCode,
19154 Header: res.Header,
19155 }
19156 }
19157 if err != nil {
19158 return nil, err
19159 }
19160 defer googleapi.CloseBody(res)
19161 if err := googleapi.CheckResponse(res); err != nil {
19162 return nil, err
19163 }
19164 ret := &AdvertiserLandingPagesListResponse{
19165 ServerResponse: googleapi.ServerResponse{
19166 Header: res.Header,
19167 HTTPStatusCode: res.StatusCode,
19168 },
19169 }
19170 target := &ret
19171 if err := gensupport.DecodeResponse(target, res); err != nil {
19172 return nil, err
19173 }
19174 return ret, nil
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280 }
19281
19282
19283
19284
19285 func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
19286 c.ctx_ = ctx
19287 defer c.PageToken(c.urlParams_.Get("pageToken"))
19288 for {
19289 x, err := c.Do()
19290 if err != nil {
19291 return err
19292 }
19293 if err := f(x); err != nil {
19294 return err
19295 }
19296 if x.NextPageToken == "" {
19297 return nil
19298 }
19299 c.PageToken(x.NextPageToken)
19300 }
19301 }
19302
19303
19304
19305 type AdvertiserLandingPagesPatchCall struct {
19306 s *Service
19307 profileId int64
19308 landingpage *LandingPage
19309 urlParams_ gensupport.URLParams
19310 ctx_ context.Context
19311 header_ http.Header
19312 }
19313
19314
19315
19316
19317
19318
19319 func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
19320 c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19321 c.profileId = profileId
19322 c.urlParams_.Set("id", fmt.Sprint(id))
19323 c.landingpage = landingpage
19324 return c
19325 }
19326
19327
19328
19329
19330 func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
19331 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19332 return c
19333 }
19334
19335
19336
19337
19338 func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
19339 c.ctx_ = ctx
19340 return c
19341 }
19342
19343
19344
19345 func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
19346 if c.header_ == nil {
19347 c.header_ = make(http.Header)
19348 }
19349 return c.header_
19350 }
19351
19352 func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
19353 reqHeaders := make(http.Header)
19354 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
19355 for k, v := range c.header_ {
19356 reqHeaders[k] = v
19357 }
19358 reqHeaders.Set("User-Agent", c.s.userAgent())
19359 var body io.Reader = nil
19360 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19361 if err != nil {
19362 return nil, err
19363 }
19364 reqHeaders.Set("Content-Type", "application/json")
19365 c.urlParams_.Set("alt", alt)
19366 c.urlParams_.Set("prettyPrint", "false")
19367 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19368 urls += "?" + c.urlParams_.Encode()
19369 req, err := http.NewRequest("PATCH", urls, body)
19370 if err != nil {
19371 return nil, err
19372 }
19373 req.Header = reqHeaders
19374 googleapi.Expand(req.URL, map[string]string{
19375 "profileId": strconv.FormatInt(c.profileId, 10),
19376 })
19377 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19378 }
19379
19380
19381
19382
19383
19384
19385
19386
19387 func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19388 gensupport.SetOptions(c.urlParams_, opts...)
19389 res, err := c.doRequest("json")
19390 if res != nil && res.StatusCode == http.StatusNotModified {
19391 if res.Body != nil {
19392 res.Body.Close()
19393 }
19394 return nil, &googleapi.Error{
19395 Code: res.StatusCode,
19396 Header: res.Header,
19397 }
19398 }
19399 if err != nil {
19400 return nil, err
19401 }
19402 defer googleapi.CloseBody(res)
19403 if err := googleapi.CheckResponse(res); err != nil {
19404 return nil, err
19405 }
19406 ret := &LandingPage{
19407 ServerResponse: googleapi.ServerResponse{
19408 Header: res.Header,
19409 HTTPStatusCode: res.StatusCode,
19410 },
19411 }
19412 target := &ret
19413 if err := gensupport.DecodeResponse(target, res); err != nil {
19414 return nil, err
19415 }
19416 return ret, nil
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454 }
19455
19456
19457
19458 type AdvertiserLandingPagesUpdateCall struct {
19459 s *Service
19460 profileId int64
19461 landingpage *LandingPage
19462 urlParams_ gensupport.URLParams
19463 ctx_ context.Context
19464 header_ http.Header
19465 }
19466
19467
19468
19469
19470 func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
19471 c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19472 c.profileId = profileId
19473 c.landingpage = landingpage
19474 return c
19475 }
19476
19477
19478
19479
19480 func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
19481 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19482 return c
19483 }
19484
19485
19486
19487
19488 func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
19489 c.ctx_ = ctx
19490 return c
19491 }
19492
19493
19494
19495 func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
19496 if c.header_ == nil {
19497 c.header_ = make(http.Header)
19498 }
19499 return c.header_
19500 }
19501
19502 func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
19503 reqHeaders := make(http.Header)
19504 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
19505 for k, v := range c.header_ {
19506 reqHeaders[k] = v
19507 }
19508 reqHeaders.Set("User-Agent", c.s.userAgent())
19509 var body io.Reader = nil
19510 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
19511 if err != nil {
19512 return nil, err
19513 }
19514 reqHeaders.Set("Content-Type", "application/json")
19515 c.urlParams_.Set("alt", alt)
19516 c.urlParams_.Set("prettyPrint", "false")
19517 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertiserLandingPages")
19518 urls += "?" + c.urlParams_.Encode()
19519 req, err := http.NewRequest("PUT", urls, body)
19520 if err != nil {
19521 return nil, err
19522 }
19523 req.Header = reqHeaders
19524 googleapi.Expand(req.URL, map[string]string{
19525 "profileId": strconv.FormatInt(c.profileId, 10),
19526 })
19527 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19528 }
19529
19530
19531
19532
19533
19534
19535
19536
19537 func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
19538 gensupport.SetOptions(c.urlParams_, opts...)
19539 res, err := c.doRequest("json")
19540 if res != nil && res.StatusCode == http.StatusNotModified {
19541 if res.Body != nil {
19542 res.Body.Close()
19543 }
19544 return nil, &googleapi.Error{
19545 Code: res.StatusCode,
19546 Header: res.Header,
19547 }
19548 }
19549 if err != nil {
19550 return nil, err
19551 }
19552 defer googleapi.CloseBody(res)
19553 if err := googleapi.CheckResponse(res); err != nil {
19554 return nil, err
19555 }
19556 ret := &LandingPage{
19557 ServerResponse: googleapi.ServerResponse{
19558 Header: res.Header,
19559 HTTPStatusCode: res.StatusCode,
19560 },
19561 }
19562 target := &ret
19563 if err := gensupport.DecodeResponse(target, res); err != nil {
19564 return nil, err
19565 }
19566 return ret, nil
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596 }
19597
19598
19599
19600 type AdvertisersGetCall struct {
19601 s *Service
19602 profileId int64
19603 id int64
19604 urlParams_ gensupport.URLParams
19605 ifNoneMatch_ string
19606 ctx_ context.Context
19607 header_ http.Header
19608 }
19609
19610
19611
19612
19613
19614 func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
19615 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19616 c.profileId = profileId
19617 c.id = id
19618 return c
19619 }
19620
19621
19622
19623
19624 func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
19625 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19626 return c
19627 }
19628
19629
19630
19631
19632
19633
19634 func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
19635 c.ifNoneMatch_ = entityTag
19636 return c
19637 }
19638
19639
19640
19641
19642 func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
19643 c.ctx_ = ctx
19644 return c
19645 }
19646
19647
19648
19649 func (c *AdvertisersGetCall) Header() http.Header {
19650 if c.header_ == nil {
19651 c.header_ = make(http.Header)
19652 }
19653 return c.header_
19654 }
19655
19656 func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
19657 reqHeaders := make(http.Header)
19658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
19659 for k, v := range c.header_ {
19660 reqHeaders[k] = v
19661 }
19662 reqHeaders.Set("User-Agent", c.s.userAgent())
19663 if c.ifNoneMatch_ != "" {
19664 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19665 }
19666 var body io.Reader = nil
19667 c.urlParams_.Set("alt", alt)
19668 c.urlParams_.Set("prettyPrint", "false")
19669 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers/{id}")
19670 urls += "?" + c.urlParams_.Encode()
19671 req, err := http.NewRequest("GET", urls, body)
19672 if err != nil {
19673 return nil, err
19674 }
19675 req.Header = reqHeaders
19676 googleapi.Expand(req.URL, map[string]string{
19677 "profileId": strconv.FormatInt(c.profileId, 10),
19678 "id": strconv.FormatInt(c.id, 10),
19679 })
19680 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19681 }
19682
19683
19684
19685
19686
19687
19688
19689
19690 func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19691 gensupport.SetOptions(c.urlParams_, opts...)
19692 res, err := c.doRequest("json")
19693 if res != nil && res.StatusCode == http.StatusNotModified {
19694 if res.Body != nil {
19695 res.Body.Close()
19696 }
19697 return nil, &googleapi.Error{
19698 Code: res.StatusCode,
19699 Header: res.Header,
19700 }
19701 }
19702 if err != nil {
19703 return nil, err
19704 }
19705 defer googleapi.CloseBody(res)
19706 if err := googleapi.CheckResponse(res); err != nil {
19707 return nil, err
19708 }
19709 ret := &Advertiser{
19710 ServerResponse: googleapi.ServerResponse{
19711 Header: res.Header,
19712 HTTPStatusCode: res.StatusCode,
19713 },
19714 }
19715 target := &ret
19716 if err := gensupport.DecodeResponse(target, res); err != nil {
19717 return nil, err
19718 }
19719 return ret, nil
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754 }
19755
19756
19757
19758 type AdvertisersInsertCall struct {
19759 s *Service
19760 profileId int64
19761 advertiser *Advertiser
19762 urlParams_ gensupport.URLParams
19763 ctx_ context.Context
19764 header_ http.Header
19765 }
19766
19767
19768
19769
19770 func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
19771 c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19772 c.profileId = profileId
19773 c.advertiser = advertiser
19774 return c
19775 }
19776
19777
19778
19779
19780 func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
19781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19782 return c
19783 }
19784
19785
19786
19787
19788 func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
19789 c.ctx_ = ctx
19790 return c
19791 }
19792
19793
19794
19795 func (c *AdvertisersInsertCall) Header() http.Header {
19796 if c.header_ == nil {
19797 c.header_ = make(http.Header)
19798 }
19799 return c.header_
19800 }
19801
19802 func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
19803 reqHeaders := make(http.Header)
19804 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
19805 for k, v := range c.header_ {
19806 reqHeaders[k] = v
19807 }
19808 reqHeaders.Set("User-Agent", c.s.userAgent())
19809 var body io.Reader = nil
19810 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
19811 if err != nil {
19812 return nil, err
19813 }
19814 reqHeaders.Set("Content-Type", "application/json")
19815 c.urlParams_.Set("alt", alt)
19816 c.urlParams_.Set("prettyPrint", "false")
19817 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
19818 urls += "?" + c.urlParams_.Encode()
19819 req, err := http.NewRequest("POST", urls, body)
19820 if err != nil {
19821 return nil, err
19822 }
19823 req.Header = reqHeaders
19824 googleapi.Expand(req.URL, map[string]string{
19825 "profileId": strconv.FormatInt(c.profileId, 10),
19826 })
19827 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19828 }
19829
19830
19831
19832
19833
19834
19835
19836
19837 func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
19838 gensupport.SetOptions(c.urlParams_, opts...)
19839 res, err := c.doRequest("json")
19840 if res != nil && res.StatusCode == http.StatusNotModified {
19841 if res.Body != nil {
19842 res.Body.Close()
19843 }
19844 return nil, &googleapi.Error{
19845 Code: res.StatusCode,
19846 Header: res.Header,
19847 }
19848 }
19849 if err != nil {
19850 return nil, err
19851 }
19852 defer googleapi.CloseBody(res)
19853 if err := googleapi.CheckResponse(res); err != nil {
19854 return nil, err
19855 }
19856 ret := &Advertiser{
19857 ServerResponse: googleapi.ServerResponse{
19858 Header: res.Header,
19859 HTTPStatusCode: res.StatusCode,
19860 },
19861 }
19862 target := &ret
19863 if err := gensupport.DecodeResponse(target, res); err != nil {
19864 return nil, err
19865 }
19866 return ret, nil
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896 }
19897
19898
19899
19900 type AdvertisersListCall struct {
19901 s *Service
19902 profileId int64
19903 urlParams_ gensupport.URLParams
19904 ifNoneMatch_ string
19905 ctx_ context.Context
19906 header_ http.Header
19907 }
19908
19909
19910
19911
19912
19913 func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
19914 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19915 c.profileId = profileId
19916 return c
19917 }
19918
19919
19920
19921 func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
19922 var advertiserGroupIds_ []string
19923 for _, v := range advertiserGroupIds {
19924 advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
19925 }
19926 c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
19927 return c
19928 }
19929
19930
19931
19932
19933 func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
19934 var floodlightConfigurationIds_ []string
19935 for _, v := range floodlightConfigurationIds {
19936 floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
19937 }
19938 c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
19939 return c
19940 }
19941
19942
19943
19944 func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
19945 var ids_ []string
19946 for _, v := range ids {
19947 ids_ = append(ids_, fmt.Sprint(v))
19948 }
19949 c.urlParams_.SetMulti("ids", ids_)
19950 return c
19951 }
19952
19953
19954
19955
19956 func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
19957 c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
19958 return c
19959 }
19960
19961
19962
19963 func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
19964 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19965 return c
19966 }
19967
19968
19969
19970 func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
19971 c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
19972 return c
19973 }
19974
19975
19976
19977 func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
19978 c.urlParams_.Set("pageToken", pageToken)
19979 return c
19980 }
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990 func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
19991 c.urlParams_.Set("searchString", searchString)
19992 return c
19993 }
19994
19995
19996
19997
19998
19999
20000
20001
20002 func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
20003 c.urlParams_.Set("sortField", sortField)
20004 return c
20005 }
20006
20007
20008
20009
20010
20011
20012
20013
20014 func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
20015 c.urlParams_.Set("sortOrder", sortOrder)
20016 return c
20017 }
20018
20019
20020
20021
20022
20023
20024
20025
20026 func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
20027 c.urlParams_.Set("status", status)
20028 return c
20029 }
20030
20031
20032
20033 func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
20034 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
20035 return c
20036 }
20037
20038
20039
20040
20041 func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
20042 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20043 return c
20044 }
20045
20046
20047
20048
20049
20050
20051 func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
20052 c.ifNoneMatch_ = entityTag
20053 return c
20054 }
20055
20056
20057
20058
20059 func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
20060 c.ctx_ = ctx
20061 return c
20062 }
20063
20064
20065
20066 func (c *AdvertisersListCall) Header() http.Header {
20067 if c.header_ == nil {
20068 c.header_ = make(http.Header)
20069 }
20070 return c.header_
20071 }
20072
20073 func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
20074 reqHeaders := make(http.Header)
20075 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20076 for k, v := range c.header_ {
20077 reqHeaders[k] = v
20078 }
20079 reqHeaders.Set("User-Agent", c.s.userAgent())
20080 if c.ifNoneMatch_ != "" {
20081 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20082 }
20083 var body io.Reader = nil
20084 c.urlParams_.Set("alt", alt)
20085 c.urlParams_.Set("prettyPrint", "false")
20086 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20087 urls += "?" + c.urlParams_.Encode()
20088 req, err := http.NewRequest("GET", urls, body)
20089 if err != nil {
20090 return nil, err
20091 }
20092 req.Header = reqHeaders
20093 googleapi.Expand(req.URL, map[string]string{
20094 "profileId": strconv.FormatInt(c.profileId, 10),
20095 })
20096 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20097 }
20098
20099
20100
20101
20102
20103
20104
20105
20106 func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
20107 gensupport.SetOptions(c.urlParams_, opts...)
20108 res, err := c.doRequest("json")
20109 if res != nil && res.StatusCode == http.StatusNotModified {
20110 if res.Body != nil {
20111 res.Body.Close()
20112 }
20113 return nil, &googleapi.Error{
20114 Code: res.StatusCode,
20115 Header: res.Header,
20116 }
20117 }
20118 if err != nil {
20119 return nil, err
20120 }
20121 defer googleapi.CloseBody(res)
20122 if err := googleapi.CheckResponse(res); err != nil {
20123 return nil, err
20124 }
20125 ret := &AdvertisersListResponse{
20126 ServerResponse: googleapi.ServerResponse{
20127 Header: res.Header,
20128 HTTPStatusCode: res.StatusCode,
20129 },
20130 }
20131 target := &ret
20132 if err := gensupport.DecodeResponse(target, res); err != nil {
20133 return nil, err
20134 }
20135 return ret, nil
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259 }
20260
20261
20262
20263
20264 func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
20265 c.ctx_ = ctx
20266 defer c.PageToken(c.urlParams_.Get("pageToken"))
20267 for {
20268 x, err := c.Do()
20269 if err != nil {
20270 return err
20271 }
20272 if err := f(x); err != nil {
20273 return err
20274 }
20275 if x.NextPageToken == "" {
20276 return nil
20277 }
20278 c.PageToken(x.NextPageToken)
20279 }
20280 }
20281
20282
20283
20284 type AdvertisersPatchCall struct {
20285 s *Service
20286 profileId int64
20287 advertiser *Advertiser
20288 urlParams_ gensupport.URLParams
20289 ctx_ context.Context
20290 header_ http.Header
20291 }
20292
20293
20294
20295
20296
20297
20298 func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
20299 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20300 c.profileId = profileId
20301 c.urlParams_.Set("id", fmt.Sprint(id))
20302 c.advertiser = advertiser
20303 return c
20304 }
20305
20306
20307
20308
20309 func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
20310 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20311 return c
20312 }
20313
20314
20315
20316
20317 func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
20318 c.ctx_ = ctx
20319 return c
20320 }
20321
20322
20323
20324 func (c *AdvertisersPatchCall) Header() http.Header {
20325 if c.header_ == nil {
20326 c.header_ = make(http.Header)
20327 }
20328 return c.header_
20329 }
20330
20331 func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
20332 reqHeaders := make(http.Header)
20333 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20334 for k, v := range c.header_ {
20335 reqHeaders[k] = v
20336 }
20337 reqHeaders.Set("User-Agent", c.s.userAgent())
20338 var body io.Reader = nil
20339 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20340 if err != nil {
20341 return nil, err
20342 }
20343 reqHeaders.Set("Content-Type", "application/json")
20344 c.urlParams_.Set("alt", alt)
20345 c.urlParams_.Set("prettyPrint", "false")
20346 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20347 urls += "?" + c.urlParams_.Encode()
20348 req, err := http.NewRequest("PATCH", urls, body)
20349 if err != nil {
20350 return nil, err
20351 }
20352 req.Header = reqHeaders
20353 googleapi.Expand(req.URL, map[string]string{
20354 "profileId": strconv.FormatInt(c.profileId, 10),
20355 })
20356 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20357 }
20358
20359
20360
20361
20362
20363
20364
20365
20366 func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20367 gensupport.SetOptions(c.urlParams_, opts...)
20368 res, err := c.doRequest("json")
20369 if res != nil && res.StatusCode == http.StatusNotModified {
20370 if res.Body != nil {
20371 res.Body.Close()
20372 }
20373 return nil, &googleapi.Error{
20374 Code: res.StatusCode,
20375 Header: res.Header,
20376 }
20377 }
20378 if err != nil {
20379 return nil, err
20380 }
20381 defer googleapi.CloseBody(res)
20382 if err := googleapi.CheckResponse(res); err != nil {
20383 return nil, err
20384 }
20385 ret := &Advertiser{
20386 ServerResponse: googleapi.ServerResponse{
20387 Header: res.Header,
20388 HTTPStatusCode: res.StatusCode,
20389 },
20390 }
20391 target := &ret
20392 if err := gensupport.DecodeResponse(target, res); err != nil {
20393 return nil, err
20394 }
20395 return ret, nil
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433 }
20434
20435
20436
20437 type AdvertisersUpdateCall struct {
20438 s *Service
20439 profileId int64
20440 advertiser *Advertiser
20441 urlParams_ gensupport.URLParams
20442 ctx_ context.Context
20443 header_ http.Header
20444 }
20445
20446
20447
20448
20449 func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
20450 c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20451 c.profileId = profileId
20452 c.advertiser = advertiser
20453 return c
20454 }
20455
20456
20457
20458
20459 func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
20460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20461 return c
20462 }
20463
20464
20465
20466
20467 func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
20468 c.ctx_ = ctx
20469 return c
20470 }
20471
20472
20473
20474 func (c *AdvertisersUpdateCall) Header() http.Header {
20475 if c.header_ == nil {
20476 c.header_ = make(http.Header)
20477 }
20478 return c.header_
20479 }
20480
20481 func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
20482 reqHeaders := make(http.Header)
20483 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20484 for k, v := range c.header_ {
20485 reqHeaders[k] = v
20486 }
20487 reqHeaders.Set("User-Agent", c.s.userAgent())
20488 var body io.Reader = nil
20489 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
20490 if err != nil {
20491 return nil, err
20492 }
20493 reqHeaders.Set("Content-Type", "application/json")
20494 c.urlParams_.Set("alt", alt)
20495 c.urlParams_.Set("prettyPrint", "false")
20496 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/advertisers")
20497 urls += "?" + c.urlParams_.Encode()
20498 req, err := http.NewRequest("PUT", urls, body)
20499 if err != nil {
20500 return nil, err
20501 }
20502 req.Header = reqHeaders
20503 googleapi.Expand(req.URL, map[string]string{
20504 "profileId": strconv.FormatInt(c.profileId, 10),
20505 })
20506 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20507 }
20508
20509
20510
20511
20512
20513
20514
20515
20516 func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
20517 gensupport.SetOptions(c.urlParams_, opts...)
20518 res, err := c.doRequest("json")
20519 if res != nil && res.StatusCode == http.StatusNotModified {
20520 if res.Body != nil {
20521 res.Body.Close()
20522 }
20523 return nil, &googleapi.Error{
20524 Code: res.StatusCode,
20525 Header: res.Header,
20526 }
20527 }
20528 if err != nil {
20529 return nil, err
20530 }
20531 defer googleapi.CloseBody(res)
20532 if err := googleapi.CheckResponse(res); err != nil {
20533 return nil, err
20534 }
20535 ret := &Advertiser{
20536 ServerResponse: googleapi.ServerResponse{
20537 Header: res.Header,
20538 HTTPStatusCode: res.StatusCode,
20539 },
20540 }
20541 target := &ret
20542 if err := gensupport.DecodeResponse(target, res); err != nil {
20543 return nil, err
20544 }
20545 return ret, nil
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575 }
20576
20577
20578
20579 type BrowsersListCall struct {
20580 s *Service
20581 profileId int64
20582 urlParams_ gensupport.URLParams
20583 ifNoneMatch_ string
20584 ctx_ context.Context
20585 header_ http.Header
20586 }
20587
20588
20589
20590
20591 func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
20592 c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20593 c.profileId = profileId
20594 return c
20595 }
20596
20597
20598
20599
20600 func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
20601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20602 return c
20603 }
20604
20605
20606
20607
20608
20609
20610 func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
20611 c.ifNoneMatch_ = entityTag
20612 return c
20613 }
20614
20615
20616
20617
20618 func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
20619 c.ctx_ = ctx
20620 return c
20621 }
20622
20623
20624
20625 func (c *BrowsersListCall) Header() http.Header {
20626 if c.header_ == nil {
20627 c.header_ = make(http.Header)
20628 }
20629 return c.header_
20630 }
20631
20632 func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
20633 reqHeaders := make(http.Header)
20634 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20635 for k, v := range c.header_ {
20636 reqHeaders[k] = v
20637 }
20638 reqHeaders.Set("User-Agent", c.s.userAgent())
20639 if c.ifNoneMatch_ != "" {
20640 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20641 }
20642 var body io.Reader = nil
20643 c.urlParams_.Set("alt", alt)
20644 c.urlParams_.Set("prettyPrint", "false")
20645 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/browsers")
20646 urls += "?" + c.urlParams_.Encode()
20647 req, err := http.NewRequest("GET", urls, body)
20648 if err != nil {
20649 return nil, err
20650 }
20651 req.Header = reqHeaders
20652 googleapi.Expand(req.URL, map[string]string{
20653 "profileId": strconv.FormatInt(c.profileId, 10),
20654 })
20655 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20656 }
20657
20658
20659
20660
20661
20662
20663
20664
20665 func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
20666 gensupport.SetOptions(c.urlParams_, opts...)
20667 res, err := c.doRequest("json")
20668 if res != nil && res.StatusCode == http.StatusNotModified {
20669 if res.Body != nil {
20670 res.Body.Close()
20671 }
20672 return nil, &googleapi.Error{
20673 Code: res.StatusCode,
20674 Header: res.Header,
20675 }
20676 }
20677 if err != nil {
20678 return nil, err
20679 }
20680 defer googleapi.CloseBody(res)
20681 if err := googleapi.CheckResponse(res); err != nil {
20682 return nil, err
20683 }
20684 ret := &BrowsersListResponse{
20685 ServerResponse: googleapi.ServerResponse{
20686 Header: res.Header,
20687 HTTPStatusCode: res.StatusCode,
20688 },
20689 }
20690 target := &ret
20691 if err := gensupport.DecodeResponse(target, res); err != nil {
20692 return nil, err
20693 }
20694 return ret, nil
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721 }
20722
20723
20724
20725 type CampaignCreativeAssociationsInsertCall struct {
20726 s *Service
20727 profileId int64
20728 campaignId int64
20729 campaigncreativeassociation *CampaignCreativeAssociation
20730 urlParams_ gensupport.URLParams
20731 ctx_ context.Context
20732 header_ http.Header
20733 }
20734
20735
20736
20737
20738
20739
20740
20741 func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
20742 c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20743 c.profileId = profileId
20744 c.campaignId = campaignId
20745 c.campaigncreativeassociation = campaigncreativeassociation
20746 return c
20747 }
20748
20749
20750
20751
20752 func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
20753 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20754 return c
20755 }
20756
20757
20758
20759
20760 func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
20761 c.ctx_ = ctx
20762 return c
20763 }
20764
20765
20766
20767 func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
20768 if c.header_ == nil {
20769 c.header_ = make(http.Header)
20770 }
20771 return c.header_
20772 }
20773
20774 func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
20775 reqHeaders := make(http.Header)
20776 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20777 for k, v := range c.header_ {
20778 reqHeaders[k] = v
20779 }
20780 reqHeaders.Set("User-Agent", c.s.userAgent())
20781 var body io.Reader = nil
20782 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
20783 if err != nil {
20784 return nil, err
20785 }
20786 reqHeaders.Set("Content-Type", "application/json")
20787 c.urlParams_.Set("alt", alt)
20788 c.urlParams_.Set("prettyPrint", "false")
20789 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20790 urls += "?" + c.urlParams_.Encode()
20791 req, err := http.NewRequest("POST", urls, body)
20792 if err != nil {
20793 return nil, err
20794 }
20795 req.Header = reqHeaders
20796 googleapi.Expand(req.URL, map[string]string{
20797 "profileId": strconv.FormatInt(c.profileId, 10),
20798 "campaignId": strconv.FormatInt(c.campaignId, 10),
20799 })
20800 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20801 }
20802
20803
20804
20805
20806
20807
20808
20809
20810 func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
20811 gensupport.SetOptions(c.urlParams_, opts...)
20812 res, err := c.doRequest("json")
20813 if res != nil && res.StatusCode == http.StatusNotModified {
20814 if res.Body != nil {
20815 res.Body.Close()
20816 }
20817 return nil, &googleapi.Error{
20818 Code: res.StatusCode,
20819 Header: res.Header,
20820 }
20821 }
20822 if err != nil {
20823 return nil, err
20824 }
20825 defer googleapi.CloseBody(res)
20826 if err := googleapi.CheckResponse(res); err != nil {
20827 return nil, err
20828 }
20829 ret := &CampaignCreativeAssociation{
20830 ServerResponse: googleapi.ServerResponse{
20831 Header: res.Header,
20832 HTTPStatusCode: res.StatusCode,
20833 },
20834 }
20835 target := &ret
20836 if err := gensupport.DecodeResponse(target, res); err != nil {
20837 return nil, err
20838 }
20839 return ret, nil
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877 }
20878
20879
20880
20881 type CampaignCreativeAssociationsListCall struct {
20882 s *Service
20883 profileId int64
20884 campaignId int64
20885 urlParams_ gensupport.URLParams
20886 ifNoneMatch_ string
20887 ctx_ context.Context
20888 header_ http.Header
20889 }
20890
20891
20892
20893
20894
20895
20896 func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
20897 c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20898 c.profileId = profileId
20899 c.campaignId = campaignId
20900 return c
20901 }
20902
20903
20904
20905 func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
20906 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20907 return c
20908 }
20909
20910
20911
20912 func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
20913 c.urlParams_.Set("pageToken", pageToken)
20914 return c
20915 }
20916
20917
20918
20919
20920
20921
20922
20923
20924 func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
20925 c.urlParams_.Set("sortOrder", sortOrder)
20926 return c
20927 }
20928
20929
20930
20931
20932 func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
20933 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20934 return c
20935 }
20936
20937
20938
20939
20940
20941
20942 func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
20943 c.ifNoneMatch_ = entityTag
20944 return c
20945 }
20946
20947
20948
20949
20950 func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
20951 c.ctx_ = ctx
20952 return c
20953 }
20954
20955
20956
20957 func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
20958 if c.header_ == nil {
20959 c.header_ = make(http.Header)
20960 }
20961 return c.header_
20962 }
20963
20964 func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
20965 reqHeaders := make(http.Header)
20966 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
20967 for k, v := range c.header_ {
20968 reqHeaders[k] = v
20969 }
20970 reqHeaders.Set("User-Agent", c.s.userAgent())
20971 if c.ifNoneMatch_ != "" {
20972 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20973 }
20974 var body io.Reader = nil
20975 c.urlParams_.Set("alt", alt)
20976 c.urlParams_.Set("prettyPrint", "false")
20977 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations")
20978 urls += "?" + c.urlParams_.Encode()
20979 req, err := http.NewRequest("GET", urls, body)
20980 if err != nil {
20981 return nil, err
20982 }
20983 req.Header = reqHeaders
20984 googleapi.Expand(req.URL, map[string]string{
20985 "profileId": strconv.FormatInt(c.profileId, 10),
20986 "campaignId": strconv.FormatInt(c.campaignId, 10),
20987 })
20988 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20989 }
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000 func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
21001 gensupport.SetOptions(c.urlParams_, opts...)
21002 res, err := c.doRequest("json")
21003 if res != nil && res.StatusCode == http.StatusNotModified {
21004 if res.Body != nil {
21005 res.Body.Close()
21006 }
21007 return nil, &googleapi.Error{
21008 Code: res.StatusCode,
21009 Header: res.Header,
21010 }
21011 }
21012 if err != nil {
21013 return nil, err
21014 }
21015 defer googleapi.CloseBody(res)
21016 if err := googleapi.CheckResponse(res); err != nil {
21017 return nil, err
21018 }
21019 ret := &CampaignCreativeAssociationsListResponse{
21020 ServerResponse: googleapi.ServerResponse{
21021 Header: res.Header,
21022 HTTPStatusCode: res.StatusCode,
21023 },
21024 }
21025 target := &ret
21026 if err := gensupport.DecodeResponse(target, res); err != nil {
21027 return nil, err
21028 }
21029 return ret, nil
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092 }
21093
21094
21095
21096
21097 func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
21098 c.ctx_ = ctx
21099 defer c.PageToken(c.urlParams_.Get("pageToken"))
21100 for {
21101 x, err := c.Do()
21102 if err != nil {
21103 return err
21104 }
21105 if err := f(x); err != nil {
21106 return err
21107 }
21108 if x.NextPageToken == "" {
21109 return nil
21110 }
21111 c.PageToken(x.NextPageToken)
21112 }
21113 }
21114
21115
21116
21117 type CampaignsGetCall struct {
21118 s *Service
21119 profileId int64
21120 id int64
21121 urlParams_ gensupport.URLParams
21122 ifNoneMatch_ string
21123 ctx_ context.Context
21124 header_ http.Header
21125 }
21126
21127
21128
21129
21130
21131 func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
21132 c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21133 c.profileId = profileId
21134 c.id = id
21135 return c
21136 }
21137
21138
21139
21140
21141 func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
21142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21143 return c
21144 }
21145
21146
21147
21148
21149
21150
21151 func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
21152 c.ifNoneMatch_ = entityTag
21153 return c
21154 }
21155
21156
21157
21158
21159 func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
21160 c.ctx_ = ctx
21161 return c
21162 }
21163
21164
21165
21166 func (c *CampaignsGetCall) Header() http.Header {
21167 if c.header_ == nil {
21168 c.header_ = make(http.Header)
21169 }
21170 return c.header_
21171 }
21172
21173 func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
21174 reqHeaders := make(http.Header)
21175 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
21176 for k, v := range c.header_ {
21177 reqHeaders[k] = v
21178 }
21179 reqHeaders.Set("User-Agent", c.s.userAgent())
21180 if c.ifNoneMatch_ != "" {
21181 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21182 }
21183 var body io.Reader = nil
21184 c.urlParams_.Set("alt", alt)
21185 c.urlParams_.Set("prettyPrint", "false")
21186 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns/{id}")
21187 urls += "?" + c.urlParams_.Encode()
21188 req, err := http.NewRequest("GET", urls, body)
21189 if err != nil {
21190 return nil, err
21191 }
21192 req.Header = reqHeaders
21193 googleapi.Expand(req.URL, map[string]string{
21194 "profileId": strconv.FormatInt(c.profileId, 10),
21195 "id": strconv.FormatInt(c.id, 10),
21196 })
21197 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21198 }
21199
21200
21201
21202
21203
21204
21205
21206
21207 func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21208 gensupport.SetOptions(c.urlParams_, opts...)
21209 res, err := c.doRequest("json")
21210 if res != nil && res.StatusCode == http.StatusNotModified {
21211 if res.Body != nil {
21212 res.Body.Close()
21213 }
21214 return nil, &googleapi.Error{
21215 Code: res.StatusCode,
21216 Header: res.Header,
21217 }
21218 }
21219 if err != nil {
21220 return nil, err
21221 }
21222 defer googleapi.CloseBody(res)
21223 if err := googleapi.CheckResponse(res); err != nil {
21224 return nil, err
21225 }
21226 ret := &Campaign{
21227 ServerResponse: googleapi.ServerResponse{
21228 Header: res.Header,
21229 HTTPStatusCode: res.StatusCode,
21230 },
21231 }
21232 target := &ret
21233 if err := gensupport.DecodeResponse(target, res); err != nil {
21234 return nil, err
21235 }
21236 return ret, nil
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271 }
21272
21273
21274
21275 type CampaignsInsertCall struct {
21276 s *Service
21277 profileId int64
21278 campaign *Campaign
21279 urlParams_ gensupport.URLParams
21280 ctx_ context.Context
21281 header_ http.Header
21282 }
21283
21284
21285
21286
21287 func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
21288 c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21289 c.profileId = profileId
21290 c.campaign = campaign
21291 return c
21292 }
21293
21294
21295
21296
21297 func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
21298 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21299 return c
21300 }
21301
21302
21303
21304
21305 func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
21306 c.ctx_ = ctx
21307 return c
21308 }
21309
21310
21311
21312 func (c *CampaignsInsertCall) Header() http.Header {
21313 if c.header_ == nil {
21314 c.header_ = make(http.Header)
21315 }
21316 return c.header_
21317 }
21318
21319 func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
21320 reqHeaders := make(http.Header)
21321 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
21322 for k, v := range c.header_ {
21323 reqHeaders[k] = v
21324 }
21325 reqHeaders.Set("User-Agent", c.s.userAgent())
21326 var body io.Reader = nil
21327 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21328 if err != nil {
21329 return nil, err
21330 }
21331 reqHeaders.Set("Content-Type", "application/json")
21332 c.urlParams_.Set("alt", alt)
21333 c.urlParams_.Set("prettyPrint", "false")
21334 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21335 urls += "?" + c.urlParams_.Encode()
21336 req, err := http.NewRequest("POST", urls, body)
21337 if err != nil {
21338 return nil, err
21339 }
21340 req.Header = reqHeaders
21341 googleapi.Expand(req.URL, map[string]string{
21342 "profileId": strconv.FormatInt(c.profileId, 10),
21343 })
21344 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21345 }
21346
21347
21348
21349
21350
21351
21352
21353
21354 func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21355 gensupport.SetOptions(c.urlParams_, opts...)
21356 res, err := c.doRequest("json")
21357 if res != nil && res.StatusCode == http.StatusNotModified {
21358 if res.Body != nil {
21359 res.Body.Close()
21360 }
21361 return nil, &googleapi.Error{
21362 Code: res.StatusCode,
21363 Header: res.Header,
21364 }
21365 }
21366 if err != nil {
21367 return nil, err
21368 }
21369 defer googleapi.CloseBody(res)
21370 if err := googleapi.CheckResponse(res); err != nil {
21371 return nil, err
21372 }
21373 ret := &Campaign{
21374 ServerResponse: googleapi.ServerResponse{
21375 Header: res.Header,
21376 HTTPStatusCode: res.StatusCode,
21377 },
21378 }
21379 target := &ret
21380 if err := gensupport.DecodeResponse(target, res); err != nil {
21381 return nil, err
21382 }
21383 return ret, nil
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413 }
21414
21415
21416
21417 type CampaignsListCall struct {
21418 s *Service
21419 profileId int64
21420 urlParams_ gensupport.URLParams
21421 ifNoneMatch_ string
21422 ctx_ context.Context
21423 header_ http.Header
21424 }
21425
21426
21427
21428
21429
21430 func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
21431 c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21432 c.profileId = profileId
21433 return c
21434 }
21435
21436
21437
21438
21439 func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
21440 var advertiserGroupIds_ []string
21441 for _, v := range advertiserGroupIds {
21442 advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
21443 }
21444 c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
21445 return c
21446 }
21447
21448
21449
21450 func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
21451 var advertiserIds_ []string
21452 for _, v := range advertiserIds {
21453 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21454 }
21455 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21456 return c
21457 }
21458
21459
21460
21461
21462 func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
21463 c.urlParams_.Set("archived", fmt.Sprint(archived))
21464 return c
21465 }
21466
21467
21468
21469
21470 func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
21471 c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
21472 return c
21473 }
21474
21475
21476
21477 func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
21478 var excludedIds_ []string
21479 for _, v := range excludedIds {
21480 excludedIds_ = append(excludedIds_, fmt.Sprint(v))
21481 }
21482 c.urlParams_.SetMulti("excludedIds", excludedIds_)
21483 return c
21484 }
21485
21486
21487
21488 func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
21489 var ids_ []string
21490 for _, v := range ids {
21491 ids_ = append(ids_, fmt.Sprint(v))
21492 }
21493 c.urlParams_.SetMulti("ids", ids_)
21494 return c
21495 }
21496
21497
21498
21499 func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
21500 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21501 return c
21502 }
21503
21504
21505
21506
21507 func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
21508 c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
21509 return c
21510 }
21511
21512
21513
21514 func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
21515 c.urlParams_.Set("pageToken", pageToken)
21516 return c
21517 }
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527 func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
21528 c.urlParams_.Set("searchString", searchString)
21529 return c
21530 }
21531
21532
21533
21534
21535
21536
21537
21538
21539 func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
21540 c.urlParams_.Set("sortField", sortField)
21541 return c
21542 }
21543
21544
21545
21546
21547
21548
21549
21550
21551 func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
21552 c.urlParams_.Set("sortOrder", sortOrder)
21553 return c
21554 }
21555
21556
21557
21558 func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
21559 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
21560 return c
21561 }
21562
21563
21564
21565
21566 func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
21567 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21568 return c
21569 }
21570
21571
21572
21573
21574
21575
21576 func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
21577 c.ifNoneMatch_ = entityTag
21578 return c
21579 }
21580
21581
21582
21583
21584 func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
21585 c.ctx_ = ctx
21586 return c
21587 }
21588
21589
21590
21591 func (c *CampaignsListCall) Header() http.Header {
21592 if c.header_ == nil {
21593 c.header_ = make(http.Header)
21594 }
21595 return c.header_
21596 }
21597
21598 func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
21599 reqHeaders := make(http.Header)
21600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
21601 for k, v := range c.header_ {
21602 reqHeaders[k] = v
21603 }
21604 reqHeaders.Set("User-Agent", c.s.userAgent())
21605 if c.ifNoneMatch_ != "" {
21606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21607 }
21608 var body io.Reader = nil
21609 c.urlParams_.Set("alt", alt)
21610 c.urlParams_.Set("prettyPrint", "false")
21611 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21612 urls += "?" + c.urlParams_.Encode()
21613 req, err := http.NewRequest("GET", urls, body)
21614 if err != nil {
21615 return nil, err
21616 }
21617 req.Header = reqHeaders
21618 googleapi.Expand(req.URL, map[string]string{
21619 "profileId": strconv.FormatInt(c.profileId, 10),
21620 })
21621 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21622 }
21623
21624
21625
21626
21627
21628
21629
21630
21631 func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
21632 gensupport.SetOptions(c.urlParams_, opts...)
21633 res, err := c.doRequest("json")
21634 if res != nil && res.StatusCode == http.StatusNotModified {
21635 if res.Body != nil {
21636 res.Body.Close()
21637 }
21638 return nil, &googleapi.Error{
21639 Code: res.StatusCode,
21640 Header: res.Header,
21641 }
21642 }
21643 if err != nil {
21644 return nil, err
21645 }
21646 defer googleapi.CloseBody(res)
21647 if err := googleapi.CheckResponse(res); err != nil {
21648 return nil, err
21649 }
21650 ret := &CampaignsListResponse{
21651 ServerResponse: googleapi.ServerResponse{
21652 Header: res.Header,
21653 HTTPStatusCode: res.StatusCode,
21654 },
21655 }
21656 target := &ret
21657 if err := gensupport.DecodeResponse(target, res); err != nil {
21658 return nil, err
21659 }
21660 return ret, nil
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784 }
21785
21786
21787
21788
21789 func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
21790 c.ctx_ = ctx
21791 defer c.PageToken(c.urlParams_.Get("pageToken"))
21792 for {
21793 x, err := c.Do()
21794 if err != nil {
21795 return err
21796 }
21797 if err := f(x); err != nil {
21798 return err
21799 }
21800 if x.NextPageToken == "" {
21801 return nil
21802 }
21803 c.PageToken(x.NextPageToken)
21804 }
21805 }
21806
21807
21808
21809 type CampaignsPatchCall struct {
21810 s *Service
21811 profileId int64
21812 campaign *Campaign
21813 urlParams_ gensupport.URLParams
21814 ctx_ context.Context
21815 header_ http.Header
21816 }
21817
21818
21819
21820
21821
21822
21823 func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
21824 c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21825 c.profileId = profileId
21826 c.urlParams_.Set("id", fmt.Sprint(id))
21827 c.campaign = campaign
21828 return c
21829 }
21830
21831
21832
21833
21834 func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
21835 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21836 return c
21837 }
21838
21839
21840
21841
21842 func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
21843 c.ctx_ = ctx
21844 return c
21845 }
21846
21847
21848
21849 func (c *CampaignsPatchCall) Header() http.Header {
21850 if c.header_ == nil {
21851 c.header_ = make(http.Header)
21852 }
21853 return c.header_
21854 }
21855
21856 func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
21857 reqHeaders := make(http.Header)
21858 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
21859 for k, v := range c.header_ {
21860 reqHeaders[k] = v
21861 }
21862 reqHeaders.Set("User-Agent", c.s.userAgent())
21863 var body io.Reader = nil
21864 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
21865 if err != nil {
21866 return nil, err
21867 }
21868 reqHeaders.Set("Content-Type", "application/json")
21869 c.urlParams_.Set("alt", alt)
21870 c.urlParams_.Set("prettyPrint", "false")
21871 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
21872 urls += "?" + c.urlParams_.Encode()
21873 req, err := http.NewRequest("PATCH", urls, body)
21874 if err != nil {
21875 return nil, err
21876 }
21877 req.Header = reqHeaders
21878 googleapi.Expand(req.URL, map[string]string{
21879 "profileId": strconv.FormatInt(c.profileId, 10),
21880 })
21881 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21882 }
21883
21884
21885
21886
21887
21888
21889
21890
21891 func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
21892 gensupport.SetOptions(c.urlParams_, opts...)
21893 res, err := c.doRequest("json")
21894 if res != nil && res.StatusCode == http.StatusNotModified {
21895 if res.Body != nil {
21896 res.Body.Close()
21897 }
21898 return nil, &googleapi.Error{
21899 Code: res.StatusCode,
21900 Header: res.Header,
21901 }
21902 }
21903 if err != nil {
21904 return nil, err
21905 }
21906 defer googleapi.CloseBody(res)
21907 if err := googleapi.CheckResponse(res); err != nil {
21908 return nil, err
21909 }
21910 ret := &Campaign{
21911 ServerResponse: googleapi.ServerResponse{
21912 Header: res.Header,
21913 HTTPStatusCode: res.StatusCode,
21914 },
21915 }
21916 target := &ret
21917 if err := gensupport.DecodeResponse(target, res); err != nil {
21918 return nil, err
21919 }
21920 return ret, nil
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958 }
21959
21960
21961
21962 type CampaignsUpdateCall struct {
21963 s *Service
21964 profileId int64
21965 campaign *Campaign
21966 urlParams_ gensupport.URLParams
21967 ctx_ context.Context
21968 header_ http.Header
21969 }
21970
21971
21972
21973
21974 func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
21975 c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21976 c.profileId = profileId
21977 c.campaign = campaign
21978 return c
21979 }
21980
21981
21982
21983
21984 func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
21985 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21986 return c
21987 }
21988
21989
21990
21991
21992 func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
21993 c.ctx_ = ctx
21994 return c
21995 }
21996
21997
21998
21999 func (c *CampaignsUpdateCall) Header() http.Header {
22000 if c.header_ == nil {
22001 c.header_ = make(http.Header)
22002 }
22003 return c.header_
22004 }
22005
22006 func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
22007 reqHeaders := make(http.Header)
22008 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
22009 for k, v := range c.header_ {
22010 reqHeaders[k] = v
22011 }
22012 reqHeaders.Set("User-Agent", c.s.userAgent())
22013 var body io.Reader = nil
22014 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
22015 if err != nil {
22016 return nil, err
22017 }
22018 reqHeaders.Set("Content-Type", "application/json")
22019 c.urlParams_.Set("alt", alt)
22020 c.urlParams_.Set("prettyPrint", "false")
22021 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/campaigns")
22022 urls += "?" + c.urlParams_.Encode()
22023 req, err := http.NewRequest("PUT", urls, body)
22024 if err != nil {
22025 return nil, err
22026 }
22027 req.Header = reqHeaders
22028 googleapi.Expand(req.URL, map[string]string{
22029 "profileId": strconv.FormatInt(c.profileId, 10),
22030 })
22031 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22032 }
22033
22034
22035
22036
22037
22038
22039
22040
22041 func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
22042 gensupport.SetOptions(c.urlParams_, opts...)
22043 res, err := c.doRequest("json")
22044 if res != nil && res.StatusCode == http.StatusNotModified {
22045 if res.Body != nil {
22046 res.Body.Close()
22047 }
22048 return nil, &googleapi.Error{
22049 Code: res.StatusCode,
22050 Header: res.Header,
22051 }
22052 }
22053 if err != nil {
22054 return nil, err
22055 }
22056 defer googleapi.CloseBody(res)
22057 if err := googleapi.CheckResponse(res); err != nil {
22058 return nil, err
22059 }
22060 ret := &Campaign{
22061 ServerResponse: googleapi.ServerResponse{
22062 Header: res.Header,
22063 HTTPStatusCode: res.StatusCode,
22064 },
22065 }
22066 target := &ret
22067 if err := gensupport.DecodeResponse(target, res); err != nil {
22068 return nil, err
22069 }
22070 return ret, nil
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100 }
22101
22102
22103
22104 type ChangeLogsGetCall struct {
22105 s *Service
22106 profileId int64
22107 id int64
22108 urlParams_ gensupport.URLParams
22109 ifNoneMatch_ string
22110 ctx_ context.Context
22111 header_ http.Header
22112 }
22113
22114
22115
22116
22117
22118 func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
22119 c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22120 c.profileId = profileId
22121 c.id = id
22122 return c
22123 }
22124
22125
22126
22127
22128 func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
22129 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22130 return c
22131 }
22132
22133
22134
22135
22136
22137
22138 func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
22139 c.ifNoneMatch_ = entityTag
22140 return c
22141 }
22142
22143
22144
22145
22146 func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
22147 c.ctx_ = ctx
22148 return c
22149 }
22150
22151
22152
22153 func (c *ChangeLogsGetCall) Header() http.Header {
22154 if c.header_ == nil {
22155 c.header_ = make(http.Header)
22156 }
22157 return c.header_
22158 }
22159
22160 func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
22161 reqHeaders := make(http.Header)
22162 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
22163 for k, v := range c.header_ {
22164 reqHeaders[k] = v
22165 }
22166 reqHeaders.Set("User-Agent", c.s.userAgent())
22167 if c.ifNoneMatch_ != "" {
22168 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22169 }
22170 var body io.Reader = nil
22171 c.urlParams_.Set("alt", alt)
22172 c.urlParams_.Set("prettyPrint", "false")
22173 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs/{id}")
22174 urls += "?" + c.urlParams_.Encode()
22175 req, err := http.NewRequest("GET", urls, body)
22176 if err != nil {
22177 return nil, err
22178 }
22179 req.Header = reqHeaders
22180 googleapi.Expand(req.URL, map[string]string{
22181 "profileId": strconv.FormatInt(c.profileId, 10),
22182 "id": strconv.FormatInt(c.id, 10),
22183 })
22184 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22185 }
22186
22187
22188
22189
22190
22191
22192
22193
22194 func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
22195 gensupport.SetOptions(c.urlParams_, opts...)
22196 res, err := c.doRequest("json")
22197 if res != nil && res.StatusCode == http.StatusNotModified {
22198 if res.Body != nil {
22199 res.Body.Close()
22200 }
22201 return nil, &googleapi.Error{
22202 Code: res.StatusCode,
22203 Header: res.Header,
22204 }
22205 }
22206 if err != nil {
22207 return nil, err
22208 }
22209 defer googleapi.CloseBody(res)
22210 if err := googleapi.CheckResponse(res); err != nil {
22211 return nil, err
22212 }
22213 ret := &ChangeLog{
22214 ServerResponse: googleapi.ServerResponse{
22215 Header: res.Header,
22216 HTTPStatusCode: res.StatusCode,
22217 },
22218 }
22219 target := &ret
22220 if err := gensupport.DecodeResponse(target, res); err != nil {
22221 return nil, err
22222 }
22223 return ret, nil
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258 }
22259
22260
22261
22262 type ChangeLogsListCall struct {
22263 s *Service
22264 profileId int64
22265 urlParams_ gensupport.URLParams
22266 ifNoneMatch_ string
22267 ctx_ context.Context
22268 header_ http.Header
22269 }
22270
22271
22272
22273
22274 func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
22275 c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22276 c.profileId = profileId
22277 return c
22278 }
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302 func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
22303 c.urlParams_.Set("action", action)
22304 return c
22305 }
22306
22307
22308
22309 func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
22310 var ids_ []string
22311 for _, v := range ids {
22312 ids_ = append(ids_, fmt.Sprint(v))
22313 }
22314 c.urlParams_.SetMulti("ids", ids_)
22315 return c
22316 }
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326 func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
22327 c.urlParams_.Set("maxChangeTime", maxChangeTime)
22328 return c
22329 }
22330
22331
22332
22333 func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
22334 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22335 return c
22336 }
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346 func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
22347 c.urlParams_.Set("minChangeTime", minChangeTime)
22348 return c
22349 }
22350
22351
22352
22353 func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
22354 var objectIds_ []string
22355 for _, v := range objectIds {
22356 objectIds_ = append(objectIds_, fmt.Sprint(v))
22357 }
22358 c.urlParams_.SetMulti("objectIds", objectIds_)
22359 return c
22360 }
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407 func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
22408 c.urlParams_.Set("objectType", objectType)
22409 return c
22410 }
22411
22412
22413
22414 func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
22415 c.urlParams_.Set("pageToken", pageToken)
22416 return c
22417 }
22418
22419
22420
22421
22422 func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
22423 c.urlParams_.Set("searchString", searchString)
22424 return c
22425 }
22426
22427
22428
22429 func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
22430 var userProfileIds_ []string
22431 for _, v := range userProfileIds {
22432 userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
22433 }
22434 c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
22435 return c
22436 }
22437
22438
22439
22440
22441 func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
22442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22443 return c
22444 }
22445
22446
22447
22448
22449
22450
22451 func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
22452 c.ifNoneMatch_ = entityTag
22453 return c
22454 }
22455
22456
22457
22458
22459 func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
22460 c.ctx_ = ctx
22461 return c
22462 }
22463
22464
22465
22466 func (c *ChangeLogsListCall) Header() http.Header {
22467 if c.header_ == nil {
22468 c.header_ = make(http.Header)
22469 }
22470 return c.header_
22471 }
22472
22473 func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
22474 reqHeaders := make(http.Header)
22475 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
22476 for k, v := range c.header_ {
22477 reqHeaders[k] = v
22478 }
22479 reqHeaders.Set("User-Agent", c.s.userAgent())
22480 if c.ifNoneMatch_ != "" {
22481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22482 }
22483 var body io.Reader = nil
22484 c.urlParams_.Set("alt", alt)
22485 c.urlParams_.Set("prettyPrint", "false")
22486 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/changeLogs")
22487 urls += "?" + c.urlParams_.Encode()
22488 req, err := http.NewRequest("GET", urls, body)
22489 if err != nil {
22490 return nil, err
22491 }
22492 req.Header = reqHeaders
22493 googleapi.Expand(req.URL, map[string]string{
22494 "profileId": strconv.FormatInt(c.profileId, 10),
22495 })
22496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22497 }
22498
22499
22500
22501
22502
22503
22504
22505
22506 func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
22507 gensupport.SetOptions(c.urlParams_, opts...)
22508 res, err := c.doRequest("json")
22509 if res != nil && res.StatusCode == http.StatusNotModified {
22510 if res.Body != nil {
22511 res.Body.Close()
22512 }
22513 return nil, &googleapi.Error{
22514 Code: res.StatusCode,
22515 Header: res.Header,
22516 }
22517 }
22518 if err != nil {
22519 return nil, err
22520 }
22521 defer googleapi.CloseBody(res)
22522 if err := googleapi.CheckResponse(res); err != nil {
22523 return nil, err
22524 }
22525 ret := &ChangeLogsListResponse{
22526 ServerResponse: googleapi.ServerResponse{
22527 Header: res.Header,
22528 HTTPStatusCode: res.StatusCode,
22529 },
22530 }
22531 target := &ret
22532 if err := gensupport.DecodeResponse(target, res); err != nil {
22533 return nil, err
22534 }
22535 return ret, nil
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744 }
22745
22746
22747
22748
22749 func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
22750 c.ctx_ = ctx
22751 defer c.PageToken(c.urlParams_.Get("pageToken"))
22752 for {
22753 x, err := c.Do()
22754 if err != nil {
22755 return err
22756 }
22757 if err := f(x); err != nil {
22758 return err
22759 }
22760 if x.NextPageToken == "" {
22761 return nil
22762 }
22763 c.PageToken(x.NextPageToken)
22764 }
22765 }
22766
22767
22768
22769 type CitiesListCall struct {
22770 s *Service
22771 profileId int64
22772 urlParams_ gensupport.URLParams
22773 ifNoneMatch_ string
22774 ctx_ context.Context
22775 header_ http.Header
22776 }
22777
22778
22779
22780
22781 func (r *CitiesService) List(profileId int64) *CitiesListCall {
22782 c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22783 c.profileId = profileId
22784 return c
22785 }
22786
22787
22788
22789 func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
22790 var countryDartIds_ []string
22791 for _, v := range countryDartIds {
22792 countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
22793 }
22794 c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
22795 return c
22796 }
22797
22798
22799
22800 func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
22801 var dartIds_ []string
22802 for _, v := range dartIds {
22803 dartIds_ = append(dartIds_, fmt.Sprint(v))
22804 }
22805 c.urlParams_.SetMulti("dartIds", dartIds_)
22806 return c
22807 }
22808
22809
22810
22811 func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
22812 c.urlParams_.Set("namePrefix", namePrefix)
22813 return c
22814 }
22815
22816
22817
22818 func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
22819 var regionDartIds_ []string
22820 for _, v := range regionDartIds {
22821 regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
22822 }
22823 c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
22824 return c
22825 }
22826
22827
22828
22829
22830 func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
22831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22832 return c
22833 }
22834
22835
22836
22837
22838
22839
22840 func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
22841 c.ifNoneMatch_ = entityTag
22842 return c
22843 }
22844
22845
22846
22847
22848 func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
22849 c.ctx_ = ctx
22850 return c
22851 }
22852
22853
22854
22855 func (c *CitiesListCall) Header() http.Header {
22856 if c.header_ == nil {
22857 c.header_ = make(http.Header)
22858 }
22859 return c.header_
22860 }
22861
22862 func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
22863 reqHeaders := make(http.Header)
22864 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
22865 for k, v := range c.header_ {
22866 reqHeaders[k] = v
22867 }
22868 reqHeaders.Set("User-Agent", c.s.userAgent())
22869 if c.ifNoneMatch_ != "" {
22870 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22871 }
22872 var body io.Reader = nil
22873 c.urlParams_.Set("alt", alt)
22874 c.urlParams_.Set("prettyPrint", "false")
22875 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/cities")
22876 urls += "?" + c.urlParams_.Encode()
22877 req, err := http.NewRequest("GET", urls, body)
22878 if err != nil {
22879 return nil, err
22880 }
22881 req.Header = reqHeaders
22882 googleapi.Expand(req.URL, map[string]string{
22883 "profileId": strconv.FormatInt(c.profileId, 10),
22884 })
22885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22886 }
22887
22888
22889
22890
22891
22892
22893
22894
22895 func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
22896 gensupport.SetOptions(c.urlParams_, opts...)
22897 res, err := c.doRequest("json")
22898 if res != nil && res.StatusCode == http.StatusNotModified {
22899 if res.Body != nil {
22900 res.Body.Close()
22901 }
22902 return nil, &googleapi.Error{
22903 Code: res.StatusCode,
22904 Header: res.Header,
22905 }
22906 }
22907 if err != nil {
22908 return nil, err
22909 }
22910 defer googleapi.CloseBody(res)
22911 if err := googleapi.CheckResponse(res); err != nil {
22912 return nil, err
22913 }
22914 ret := &CitiesListResponse{
22915 ServerResponse: googleapi.ServerResponse{
22916 Header: res.Header,
22917 HTTPStatusCode: res.StatusCode,
22918 },
22919 }
22920 target := &ret
22921 if err := gensupport.DecodeResponse(target, res); err != nil {
22922 return nil, err
22923 }
22924 return ret, nil
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977 }
22978
22979
22980
22981 type ConnectionTypesGetCall struct {
22982 s *Service
22983 profileId int64
22984 id int64
22985 urlParams_ gensupport.URLParams
22986 ifNoneMatch_ string
22987 ctx_ context.Context
22988 header_ http.Header
22989 }
22990
22991
22992
22993
22994
22995 func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
22996 c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22997 c.profileId = profileId
22998 c.id = id
22999 return c
23000 }
23001
23002
23003
23004
23005 func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
23006 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23007 return c
23008 }
23009
23010
23011
23012
23013
23014
23015 func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
23016 c.ifNoneMatch_ = entityTag
23017 return c
23018 }
23019
23020
23021
23022
23023 func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
23024 c.ctx_ = ctx
23025 return c
23026 }
23027
23028
23029
23030 func (c *ConnectionTypesGetCall) Header() http.Header {
23031 if c.header_ == nil {
23032 c.header_ = make(http.Header)
23033 }
23034 return c.header_
23035 }
23036
23037 func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
23038 reqHeaders := make(http.Header)
23039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23040 for k, v := range c.header_ {
23041 reqHeaders[k] = v
23042 }
23043 reqHeaders.Set("User-Agent", c.s.userAgent())
23044 if c.ifNoneMatch_ != "" {
23045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23046 }
23047 var body io.Reader = nil
23048 c.urlParams_.Set("alt", alt)
23049 c.urlParams_.Set("prettyPrint", "false")
23050 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes/{id}")
23051 urls += "?" + c.urlParams_.Encode()
23052 req, err := http.NewRequest("GET", urls, body)
23053 if err != nil {
23054 return nil, err
23055 }
23056 req.Header = reqHeaders
23057 googleapi.Expand(req.URL, map[string]string{
23058 "profileId": strconv.FormatInt(c.profileId, 10),
23059 "id": strconv.FormatInt(c.id, 10),
23060 })
23061 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23062 }
23063
23064
23065
23066
23067
23068
23069
23070
23071 func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
23072 gensupport.SetOptions(c.urlParams_, opts...)
23073 res, err := c.doRequest("json")
23074 if res != nil && res.StatusCode == http.StatusNotModified {
23075 if res.Body != nil {
23076 res.Body.Close()
23077 }
23078 return nil, &googleapi.Error{
23079 Code: res.StatusCode,
23080 Header: res.Header,
23081 }
23082 }
23083 if err != nil {
23084 return nil, err
23085 }
23086 defer googleapi.CloseBody(res)
23087 if err := googleapi.CheckResponse(res); err != nil {
23088 return nil, err
23089 }
23090 ret := &ConnectionType{
23091 ServerResponse: googleapi.ServerResponse{
23092 Header: res.Header,
23093 HTTPStatusCode: res.StatusCode,
23094 },
23095 }
23096 target := &ret
23097 if err := gensupport.DecodeResponse(target, res); err != nil {
23098 return nil, err
23099 }
23100 return ret, nil
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135 }
23136
23137
23138
23139 type ConnectionTypesListCall struct {
23140 s *Service
23141 profileId int64
23142 urlParams_ gensupport.URLParams
23143 ifNoneMatch_ string
23144 ctx_ context.Context
23145 header_ http.Header
23146 }
23147
23148
23149
23150
23151 func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
23152 c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23153 c.profileId = profileId
23154 return c
23155 }
23156
23157
23158
23159
23160 func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
23161 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23162 return c
23163 }
23164
23165
23166
23167
23168
23169
23170 func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
23171 c.ifNoneMatch_ = entityTag
23172 return c
23173 }
23174
23175
23176
23177
23178 func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
23179 c.ctx_ = ctx
23180 return c
23181 }
23182
23183
23184
23185 func (c *ConnectionTypesListCall) Header() http.Header {
23186 if c.header_ == nil {
23187 c.header_ = make(http.Header)
23188 }
23189 return c.header_
23190 }
23191
23192 func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
23193 reqHeaders := make(http.Header)
23194 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23195 for k, v := range c.header_ {
23196 reqHeaders[k] = v
23197 }
23198 reqHeaders.Set("User-Agent", c.s.userAgent())
23199 if c.ifNoneMatch_ != "" {
23200 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23201 }
23202 var body io.Reader = nil
23203 c.urlParams_.Set("alt", alt)
23204 c.urlParams_.Set("prettyPrint", "false")
23205 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/connectionTypes")
23206 urls += "?" + c.urlParams_.Encode()
23207 req, err := http.NewRequest("GET", urls, body)
23208 if err != nil {
23209 return nil, err
23210 }
23211 req.Header = reqHeaders
23212 googleapi.Expand(req.URL, map[string]string{
23213 "profileId": strconv.FormatInt(c.profileId, 10),
23214 })
23215 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23216 }
23217
23218
23219
23220
23221
23222
23223
23224
23225 func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
23226 gensupport.SetOptions(c.urlParams_, opts...)
23227 res, err := c.doRequest("json")
23228 if res != nil && res.StatusCode == http.StatusNotModified {
23229 if res.Body != nil {
23230 res.Body.Close()
23231 }
23232 return nil, &googleapi.Error{
23233 Code: res.StatusCode,
23234 Header: res.Header,
23235 }
23236 }
23237 if err != nil {
23238 return nil, err
23239 }
23240 defer googleapi.CloseBody(res)
23241 if err := googleapi.CheckResponse(res); err != nil {
23242 return nil, err
23243 }
23244 ret := &ConnectionTypesListResponse{
23245 ServerResponse: googleapi.ServerResponse{
23246 Header: res.Header,
23247 HTTPStatusCode: res.StatusCode,
23248 },
23249 }
23250 target := &ret
23251 if err := gensupport.DecodeResponse(target, res); err != nil {
23252 return nil, err
23253 }
23254 return ret, nil
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281 }
23282
23283
23284
23285 type ContentCategoriesDeleteCall struct {
23286 s *Service
23287 profileId int64
23288 id int64
23289 urlParams_ gensupport.URLParams
23290 ctx_ context.Context
23291 header_ http.Header
23292 }
23293
23294
23295
23296
23297
23298 func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
23299 c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23300 c.profileId = profileId
23301 c.id = id
23302 return c
23303 }
23304
23305
23306
23307
23308 func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
23309 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23310 return c
23311 }
23312
23313
23314
23315
23316 func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
23317 c.ctx_ = ctx
23318 return c
23319 }
23320
23321
23322
23323 func (c *ContentCategoriesDeleteCall) Header() http.Header {
23324 if c.header_ == nil {
23325 c.header_ = make(http.Header)
23326 }
23327 return c.header_
23328 }
23329
23330 func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
23331 reqHeaders := make(http.Header)
23332 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23333 for k, v := range c.header_ {
23334 reqHeaders[k] = v
23335 }
23336 reqHeaders.Set("User-Agent", c.s.userAgent())
23337 var body io.Reader = nil
23338 c.urlParams_.Set("alt", alt)
23339 c.urlParams_.Set("prettyPrint", "false")
23340 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23341 urls += "?" + c.urlParams_.Encode()
23342 req, err := http.NewRequest("DELETE", urls, body)
23343 if err != nil {
23344 return nil, err
23345 }
23346 req.Header = reqHeaders
23347 googleapi.Expand(req.URL, map[string]string{
23348 "profileId": strconv.FormatInt(c.profileId, 10),
23349 "id": strconv.FormatInt(c.id, 10),
23350 })
23351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23352 }
23353
23354
23355 func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
23356 gensupport.SetOptions(c.urlParams_, opts...)
23357 res, err := c.doRequest("json")
23358 if err != nil {
23359 return err
23360 }
23361 defer googleapi.CloseBody(res)
23362 if err := googleapi.CheckResponse(res); err != nil {
23363 return err
23364 }
23365 return nil
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397 }
23398
23399
23400
23401 type ContentCategoriesGetCall struct {
23402 s *Service
23403 profileId int64
23404 id int64
23405 urlParams_ gensupport.URLParams
23406 ifNoneMatch_ string
23407 ctx_ context.Context
23408 header_ http.Header
23409 }
23410
23411
23412
23413
23414
23415 func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
23416 c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23417 c.profileId = profileId
23418 c.id = id
23419 return c
23420 }
23421
23422
23423
23424
23425 func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
23426 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23427 return c
23428 }
23429
23430
23431
23432
23433
23434
23435 func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
23436 c.ifNoneMatch_ = entityTag
23437 return c
23438 }
23439
23440
23441
23442
23443 func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
23444 c.ctx_ = ctx
23445 return c
23446 }
23447
23448
23449
23450 func (c *ContentCategoriesGetCall) Header() http.Header {
23451 if c.header_ == nil {
23452 c.header_ = make(http.Header)
23453 }
23454 return c.header_
23455 }
23456
23457 func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
23458 reqHeaders := make(http.Header)
23459 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23460 for k, v := range c.header_ {
23461 reqHeaders[k] = v
23462 }
23463 reqHeaders.Set("User-Agent", c.s.userAgent())
23464 if c.ifNoneMatch_ != "" {
23465 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23466 }
23467 var body io.Reader = nil
23468 c.urlParams_.Set("alt", alt)
23469 c.urlParams_.Set("prettyPrint", "false")
23470 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories/{id}")
23471 urls += "?" + c.urlParams_.Encode()
23472 req, err := http.NewRequest("GET", urls, body)
23473 if err != nil {
23474 return nil, err
23475 }
23476 req.Header = reqHeaders
23477 googleapi.Expand(req.URL, map[string]string{
23478 "profileId": strconv.FormatInt(c.profileId, 10),
23479 "id": strconv.FormatInt(c.id, 10),
23480 })
23481 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23482 }
23483
23484
23485
23486
23487
23488
23489
23490
23491 func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23492 gensupport.SetOptions(c.urlParams_, opts...)
23493 res, err := c.doRequest("json")
23494 if res != nil && res.StatusCode == http.StatusNotModified {
23495 if res.Body != nil {
23496 res.Body.Close()
23497 }
23498 return nil, &googleapi.Error{
23499 Code: res.StatusCode,
23500 Header: res.Header,
23501 }
23502 }
23503 if err != nil {
23504 return nil, err
23505 }
23506 defer googleapi.CloseBody(res)
23507 if err := googleapi.CheckResponse(res); err != nil {
23508 return nil, err
23509 }
23510 ret := &ContentCategory{
23511 ServerResponse: googleapi.ServerResponse{
23512 Header: res.Header,
23513 HTTPStatusCode: res.StatusCode,
23514 },
23515 }
23516 target := &ret
23517 if err := gensupport.DecodeResponse(target, res); err != nil {
23518 return nil, err
23519 }
23520 return ret, nil
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555 }
23556
23557
23558
23559 type ContentCategoriesInsertCall struct {
23560 s *Service
23561 profileId int64
23562 contentcategory *ContentCategory
23563 urlParams_ gensupport.URLParams
23564 ctx_ context.Context
23565 header_ http.Header
23566 }
23567
23568
23569
23570
23571 func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
23572 c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23573 c.profileId = profileId
23574 c.contentcategory = contentcategory
23575 return c
23576 }
23577
23578
23579
23580
23581 func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
23582 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23583 return c
23584 }
23585
23586
23587
23588
23589 func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
23590 c.ctx_ = ctx
23591 return c
23592 }
23593
23594
23595
23596 func (c *ContentCategoriesInsertCall) Header() http.Header {
23597 if c.header_ == nil {
23598 c.header_ = make(http.Header)
23599 }
23600 return c.header_
23601 }
23602
23603 func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
23604 reqHeaders := make(http.Header)
23605 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23606 for k, v := range c.header_ {
23607 reqHeaders[k] = v
23608 }
23609 reqHeaders.Set("User-Agent", c.s.userAgent())
23610 var body io.Reader = nil
23611 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
23612 if err != nil {
23613 return nil, err
23614 }
23615 reqHeaders.Set("Content-Type", "application/json")
23616 c.urlParams_.Set("alt", alt)
23617 c.urlParams_.Set("prettyPrint", "false")
23618 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23619 urls += "?" + c.urlParams_.Encode()
23620 req, err := http.NewRequest("POST", urls, body)
23621 if err != nil {
23622 return nil, err
23623 }
23624 req.Header = reqHeaders
23625 googleapi.Expand(req.URL, map[string]string{
23626 "profileId": strconv.FormatInt(c.profileId, 10),
23627 })
23628 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23629 }
23630
23631
23632
23633
23634
23635
23636
23637
23638 func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
23639 gensupport.SetOptions(c.urlParams_, opts...)
23640 res, err := c.doRequest("json")
23641 if res != nil && res.StatusCode == http.StatusNotModified {
23642 if res.Body != nil {
23643 res.Body.Close()
23644 }
23645 return nil, &googleapi.Error{
23646 Code: res.StatusCode,
23647 Header: res.Header,
23648 }
23649 }
23650 if err != nil {
23651 return nil, err
23652 }
23653 defer googleapi.CloseBody(res)
23654 if err := googleapi.CheckResponse(res); err != nil {
23655 return nil, err
23656 }
23657 ret := &ContentCategory{
23658 ServerResponse: googleapi.ServerResponse{
23659 Header: res.Header,
23660 HTTPStatusCode: res.StatusCode,
23661 },
23662 }
23663 target := &ret
23664 if err := gensupport.DecodeResponse(target, res); err != nil {
23665 return nil, err
23666 }
23667 return ret, nil
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697 }
23698
23699
23700
23701 type ContentCategoriesListCall struct {
23702 s *Service
23703 profileId int64
23704 urlParams_ gensupport.URLParams
23705 ifNoneMatch_ string
23706 ctx_ context.Context
23707 header_ http.Header
23708 }
23709
23710
23711
23712
23713
23714 func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
23715 c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23716 c.profileId = profileId
23717 return c
23718 }
23719
23720
23721
23722 func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
23723 var ids_ []string
23724 for _, v := range ids {
23725 ids_ = append(ids_, fmt.Sprint(v))
23726 }
23727 c.urlParams_.SetMulti("ids", ids_)
23728 return c
23729 }
23730
23731
23732
23733 func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
23734 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23735 return c
23736 }
23737
23738
23739
23740 func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
23741 c.urlParams_.Set("pageToken", pageToken)
23742 return c
23743 }
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754 func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
23755 c.urlParams_.Set("searchString", searchString)
23756 return c
23757 }
23758
23759
23760
23761
23762
23763
23764
23765
23766 func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
23767 c.urlParams_.Set("sortField", sortField)
23768 return c
23769 }
23770
23771
23772
23773
23774
23775
23776
23777
23778 func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
23779 c.urlParams_.Set("sortOrder", sortOrder)
23780 return c
23781 }
23782
23783
23784
23785
23786 func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
23787 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23788 return c
23789 }
23790
23791
23792
23793
23794
23795
23796 func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
23797 c.ifNoneMatch_ = entityTag
23798 return c
23799 }
23800
23801
23802
23803
23804 func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
23805 c.ctx_ = ctx
23806 return c
23807 }
23808
23809
23810
23811 func (c *ContentCategoriesListCall) Header() http.Header {
23812 if c.header_ == nil {
23813 c.header_ = make(http.Header)
23814 }
23815 return c.header_
23816 }
23817
23818 func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
23819 reqHeaders := make(http.Header)
23820 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
23821 for k, v := range c.header_ {
23822 reqHeaders[k] = v
23823 }
23824 reqHeaders.Set("User-Agent", c.s.userAgent())
23825 if c.ifNoneMatch_ != "" {
23826 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23827 }
23828 var body io.Reader = nil
23829 c.urlParams_.Set("alt", alt)
23830 c.urlParams_.Set("prettyPrint", "false")
23831 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
23832 urls += "?" + c.urlParams_.Encode()
23833 req, err := http.NewRequest("GET", urls, body)
23834 if err != nil {
23835 return nil, err
23836 }
23837 req.Header = reqHeaders
23838 googleapi.Expand(req.URL, map[string]string{
23839 "profileId": strconv.FormatInt(c.profileId, 10),
23840 })
23841 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23842 }
23843
23844
23845
23846
23847
23848
23849
23850
23851 func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
23852 gensupport.SetOptions(c.urlParams_, opts...)
23853 res, err := c.doRequest("json")
23854 if res != nil && res.StatusCode == http.StatusNotModified {
23855 if res.Body != nil {
23856 res.Body.Close()
23857 }
23858 return nil, &googleapi.Error{
23859 Code: res.StatusCode,
23860 Header: res.Header,
23861 }
23862 }
23863 if err != nil {
23864 return nil, err
23865 }
23866 defer googleapi.CloseBody(res)
23867 if err := googleapi.CheckResponse(res); err != nil {
23868 return nil, err
23869 }
23870 ret := &ContentCategoriesListResponse{
23871 ServerResponse: googleapi.ServerResponse{
23872 Header: res.Header,
23873 HTTPStatusCode: res.StatusCode,
23874 },
23875 }
23876 target := &ret
23877 if err := gensupport.DecodeResponse(target, res); err != nil {
23878 return nil, err
23879 }
23880 return ret, nil
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961 }
23962
23963
23964
23965
23966 func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
23967 c.ctx_ = ctx
23968 defer c.PageToken(c.urlParams_.Get("pageToken"))
23969 for {
23970 x, err := c.Do()
23971 if err != nil {
23972 return err
23973 }
23974 if err := f(x); err != nil {
23975 return err
23976 }
23977 if x.NextPageToken == "" {
23978 return nil
23979 }
23980 c.PageToken(x.NextPageToken)
23981 }
23982 }
23983
23984
23985
23986 type ContentCategoriesPatchCall struct {
23987 s *Service
23988 profileId int64
23989 contentcategory *ContentCategory
23990 urlParams_ gensupport.URLParams
23991 ctx_ context.Context
23992 header_ http.Header
23993 }
23994
23995
23996
23997
23998
23999
24000 func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
24001 c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24002 c.profileId = profileId
24003 c.urlParams_.Set("id", fmt.Sprint(id))
24004 c.contentcategory = contentcategory
24005 return c
24006 }
24007
24008
24009
24010
24011 func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
24012 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24013 return c
24014 }
24015
24016
24017
24018
24019 func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
24020 c.ctx_ = ctx
24021 return c
24022 }
24023
24024
24025
24026 func (c *ContentCategoriesPatchCall) Header() http.Header {
24027 if c.header_ == nil {
24028 c.header_ = make(http.Header)
24029 }
24030 return c.header_
24031 }
24032
24033 func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
24034 reqHeaders := make(http.Header)
24035 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24036 for k, v := range c.header_ {
24037 reqHeaders[k] = v
24038 }
24039 reqHeaders.Set("User-Agent", c.s.userAgent())
24040 var body io.Reader = nil
24041 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24042 if err != nil {
24043 return nil, err
24044 }
24045 reqHeaders.Set("Content-Type", "application/json")
24046 c.urlParams_.Set("alt", alt)
24047 c.urlParams_.Set("prettyPrint", "false")
24048 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24049 urls += "?" + c.urlParams_.Encode()
24050 req, err := http.NewRequest("PATCH", urls, body)
24051 if err != nil {
24052 return nil, err
24053 }
24054 req.Header = reqHeaders
24055 googleapi.Expand(req.URL, map[string]string{
24056 "profileId": strconv.FormatInt(c.profileId, 10),
24057 })
24058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24059 }
24060
24061
24062
24063
24064
24065
24066
24067
24068 func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24069 gensupport.SetOptions(c.urlParams_, opts...)
24070 res, err := c.doRequest("json")
24071 if res != nil && res.StatusCode == http.StatusNotModified {
24072 if res.Body != nil {
24073 res.Body.Close()
24074 }
24075 return nil, &googleapi.Error{
24076 Code: res.StatusCode,
24077 Header: res.Header,
24078 }
24079 }
24080 if err != nil {
24081 return nil, err
24082 }
24083 defer googleapi.CloseBody(res)
24084 if err := googleapi.CheckResponse(res); err != nil {
24085 return nil, err
24086 }
24087 ret := &ContentCategory{
24088 ServerResponse: googleapi.ServerResponse{
24089 Header: res.Header,
24090 HTTPStatusCode: res.StatusCode,
24091 },
24092 }
24093 target := &ret
24094 if err := gensupport.DecodeResponse(target, res); err != nil {
24095 return nil, err
24096 }
24097 return ret, nil
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135 }
24136
24137
24138
24139 type ContentCategoriesUpdateCall struct {
24140 s *Service
24141 profileId int64
24142 contentcategory *ContentCategory
24143 urlParams_ gensupport.URLParams
24144 ctx_ context.Context
24145 header_ http.Header
24146 }
24147
24148
24149
24150
24151 func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
24152 c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24153 c.profileId = profileId
24154 c.contentcategory = contentcategory
24155 return c
24156 }
24157
24158
24159
24160
24161 func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
24162 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24163 return c
24164 }
24165
24166
24167
24168
24169 func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
24170 c.ctx_ = ctx
24171 return c
24172 }
24173
24174
24175
24176 func (c *ContentCategoriesUpdateCall) Header() http.Header {
24177 if c.header_ == nil {
24178 c.header_ = make(http.Header)
24179 }
24180 return c.header_
24181 }
24182
24183 func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
24184 reqHeaders := make(http.Header)
24185 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24186 for k, v := range c.header_ {
24187 reqHeaders[k] = v
24188 }
24189 reqHeaders.Set("User-Agent", c.s.userAgent())
24190 var body io.Reader = nil
24191 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
24192 if err != nil {
24193 return nil, err
24194 }
24195 reqHeaders.Set("Content-Type", "application/json")
24196 c.urlParams_.Set("alt", alt)
24197 c.urlParams_.Set("prettyPrint", "false")
24198 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/contentCategories")
24199 urls += "?" + c.urlParams_.Encode()
24200 req, err := http.NewRequest("PUT", urls, body)
24201 if err != nil {
24202 return nil, err
24203 }
24204 req.Header = reqHeaders
24205 googleapi.Expand(req.URL, map[string]string{
24206 "profileId": strconv.FormatInt(c.profileId, 10),
24207 })
24208 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24209 }
24210
24211
24212
24213
24214
24215
24216
24217
24218 func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
24219 gensupport.SetOptions(c.urlParams_, opts...)
24220 res, err := c.doRequest("json")
24221 if res != nil && res.StatusCode == http.StatusNotModified {
24222 if res.Body != nil {
24223 res.Body.Close()
24224 }
24225 return nil, &googleapi.Error{
24226 Code: res.StatusCode,
24227 Header: res.Header,
24228 }
24229 }
24230 if err != nil {
24231 return nil, err
24232 }
24233 defer googleapi.CloseBody(res)
24234 if err := googleapi.CheckResponse(res); err != nil {
24235 return nil, err
24236 }
24237 ret := &ContentCategory{
24238 ServerResponse: googleapi.ServerResponse{
24239 Header: res.Header,
24240 HTTPStatusCode: res.StatusCode,
24241 },
24242 }
24243 target := &ret
24244 if err := gensupport.DecodeResponse(target, res); err != nil {
24245 return nil, err
24246 }
24247 return ret, nil
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277 }
24278
24279
24280
24281 type ConversionsBatchinsertCall struct {
24282 s *Service
24283 profileId int64
24284 conversionsbatchinsertrequest *ConversionsBatchInsertRequest
24285 urlParams_ gensupport.URLParams
24286 ctx_ context.Context
24287 header_ http.Header
24288 }
24289
24290
24291
24292
24293 func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
24294 c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24295 c.profileId = profileId
24296 c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
24297 return c
24298 }
24299
24300
24301
24302
24303 func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
24304 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24305 return c
24306 }
24307
24308
24309
24310
24311 func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
24312 c.ctx_ = ctx
24313 return c
24314 }
24315
24316
24317
24318 func (c *ConversionsBatchinsertCall) Header() http.Header {
24319 if c.header_ == nil {
24320 c.header_ = make(http.Header)
24321 }
24322 return c.header_
24323 }
24324
24325 func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
24326 reqHeaders := make(http.Header)
24327 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24328 for k, v := range c.header_ {
24329 reqHeaders[k] = v
24330 }
24331 reqHeaders.Set("User-Agent", c.s.userAgent())
24332 var body io.Reader = nil
24333 body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
24334 if err != nil {
24335 return nil, err
24336 }
24337 reqHeaders.Set("Content-Type", "application/json")
24338 c.urlParams_.Set("alt", alt)
24339 c.urlParams_.Set("prettyPrint", "false")
24340 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
24341 urls += "?" + c.urlParams_.Encode()
24342 req, err := http.NewRequest("POST", urls, body)
24343 if err != nil {
24344 return nil, err
24345 }
24346 req.Header = reqHeaders
24347 googleapi.Expand(req.URL, map[string]string{
24348 "profileId": strconv.FormatInt(c.profileId, 10),
24349 })
24350 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24351 }
24352
24353
24354
24355
24356
24357
24358
24359
24360 func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
24361 gensupport.SetOptions(c.urlParams_, opts...)
24362 res, err := c.doRequest("json")
24363 if res != nil && res.StatusCode == http.StatusNotModified {
24364 if res.Body != nil {
24365 res.Body.Close()
24366 }
24367 return nil, &googleapi.Error{
24368 Code: res.StatusCode,
24369 Header: res.Header,
24370 }
24371 }
24372 if err != nil {
24373 return nil, err
24374 }
24375 defer googleapi.CloseBody(res)
24376 if err := googleapi.CheckResponse(res); err != nil {
24377 return nil, err
24378 }
24379 ret := &ConversionsBatchInsertResponse{
24380 ServerResponse: googleapi.ServerResponse{
24381 Header: res.Header,
24382 HTTPStatusCode: res.StatusCode,
24383 },
24384 }
24385 target := &ret
24386 if err := gensupport.DecodeResponse(target, res); err != nil {
24387 return nil, err
24388 }
24389 return ret, nil
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419 }
24420
24421
24422
24423 type ConversionsBatchupdateCall struct {
24424 s *Service
24425 profileId int64
24426 conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
24427 urlParams_ gensupport.URLParams
24428 ctx_ context.Context
24429 header_ http.Header
24430 }
24431
24432
24433
24434
24435 func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
24436 c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24437 c.profileId = profileId
24438 c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
24439 return c
24440 }
24441
24442
24443
24444
24445 func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
24446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24447 return c
24448 }
24449
24450
24451
24452
24453 func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
24454 c.ctx_ = ctx
24455 return c
24456 }
24457
24458
24459
24460 func (c *ConversionsBatchupdateCall) Header() http.Header {
24461 if c.header_ == nil {
24462 c.header_ = make(http.Header)
24463 }
24464 return c.header_
24465 }
24466
24467 func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
24468 reqHeaders := make(http.Header)
24469 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24470 for k, v := range c.header_ {
24471 reqHeaders[k] = v
24472 }
24473 reqHeaders.Set("User-Agent", c.s.userAgent())
24474 var body io.Reader = nil
24475 body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
24476 if err != nil {
24477 return nil, err
24478 }
24479 reqHeaders.Set("Content-Type", "application/json")
24480 c.urlParams_.Set("alt", alt)
24481 c.urlParams_.Set("prettyPrint", "false")
24482 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
24483 urls += "?" + c.urlParams_.Encode()
24484 req, err := http.NewRequest("POST", urls, body)
24485 if err != nil {
24486 return nil, err
24487 }
24488 req.Header = reqHeaders
24489 googleapi.Expand(req.URL, map[string]string{
24490 "profileId": strconv.FormatInt(c.profileId, 10),
24491 })
24492 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24493 }
24494
24495
24496
24497
24498
24499
24500
24501
24502 func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
24503 gensupport.SetOptions(c.urlParams_, opts...)
24504 res, err := c.doRequest("json")
24505 if res != nil && res.StatusCode == http.StatusNotModified {
24506 if res.Body != nil {
24507 res.Body.Close()
24508 }
24509 return nil, &googleapi.Error{
24510 Code: res.StatusCode,
24511 Header: res.Header,
24512 }
24513 }
24514 if err != nil {
24515 return nil, err
24516 }
24517 defer googleapi.CloseBody(res)
24518 if err := googleapi.CheckResponse(res); err != nil {
24519 return nil, err
24520 }
24521 ret := &ConversionsBatchUpdateResponse{
24522 ServerResponse: googleapi.ServerResponse{
24523 Header: res.Header,
24524 HTTPStatusCode: res.StatusCode,
24525 },
24526 }
24527 target := &ret
24528 if err := gensupport.DecodeResponse(target, res); err != nil {
24529 return nil, err
24530 }
24531 return ret, nil
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561 }
24562
24563
24564
24565 type CountriesGetCall struct {
24566 s *Service
24567 profileId int64
24568 dartId int64
24569 urlParams_ gensupport.URLParams
24570 ifNoneMatch_ string
24571 ctx_ context.Context
24572 header_ http.Header
24573 }
24574
24575
24576
24577
24578
24579 func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
24580 c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24581 c.profileId = profileId
24582 c.dartId = dartId
24583 return c
24584 }
24585
24586
24587
24588
24589 func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
24590 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24591 return c
24592 }
24593
24594
24595
24596
24597
24598
24599 func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
24600 c.ifNoneMatch_ = entityTag
24601 return c
24602 }
24603
24604
24605
24606
24607 func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
24608 c.ctx_ = ctx
24609 return c
24610 }
24611
24612
24613
24614 func (c *CountriesGetCall) Header() http.Header {
24615 if c.header_ == nil {
24616 c.header_ = make(http.Header)
24617 }
24618 return c.header_
24619 }
24620
24621 func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
24622 reqHeaders := make(http.Header)
24623 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24624 for k, v := range c.header_ {
24625 reqHeaders[k] = v
24626 }
24627 reqHeaders.Set("User-Agent", c.s.userAgent())
24628 if c.ifNoneMatch_ != "" {
24629 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24630 }
24631 var body io.Reader = nil
24632 c.urlParams_.Set("alt", alt)
24633 c.urlParams_.Set("prettyPrint", "false")
24634 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries/{dartId}")
24635 urls += "?" + c.urlParams_.Encode()
24636 req, err := http.NewRequest("GET", urls, body)
24637 if err != nil {
24638 return nil, err
24639 }
24640 req.Header = reqHeaders
24641 googleapi.Expand(req.URL, map[string]string{
24642 "profileId": strconv.FormatInt(c.profileId, 10),
24643 "dartId": strconv.FormatInt(c.dartId, 10),
24644 })
24645 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24646 }
24647
24648
24649
24650
24651
24652
24653
24654
24655 func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
24656 gensupport.SetOptions(c.urlParams_, opts...)
24657 res, err := c.doRequest("json")
24658 if res != nil && res.StatusCode == http.StatusNotModified {
24659 if res.Body != nil {
24660 res.Body.Close()
24661 }
24662 return nil, &googleapi.Error{
24663 Code: res.StatusCode,
24664 Header: res.Header,
24665 }
24666 }
24667 if err != nil {
24668 return nil, err
24669 }
24670 defer googleapi.CloseBody(res)
24671 if err := googleapi.CheckResponse(res); err != nil {
24672 return nil, err
24673 }
24674 ret := &Country{
24675 ServerResponse: googleapi.ServerResponse{
24676 Header: res.Header,
24677 HTTPStatusCode: res.StatusCode,
24678 },
24679 }
24680 target := &ret
24681 if err := gensupport.DecodeResponse(target, res); err != nil {
24682 return nil, err
24683 }
24684 return ret, nil
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719 }
24720
24721
24722
24723 type CountriesListCall struct {
24724 s *Service
24725 profileId int64
24726 urlParams_ gensupport.URLParams
24727 ifNoneMatch_ string
24728 ctx_ context.Context
24729 header_ http.Header
24730 }
24731
24732
24733
24734
24735 func (r *CountriesService) List(profileId int64) *CountriesListCall {
24736 c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24737 c.profileId = profileId
24738 return c
24739 }
24740
24741
24742
24743
24744 func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
24745 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24746 return c
24747 }
24748
24749
24750
24751
24752
24753
24754 func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
24755 c.ifNoneMatch_ = entityTag
24756 return c
24757 }
24758
24759
24760
24761
24762 func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
24763 c.ctx_ = ctx
24764 return c
24765 }
24766
24767
24768
24769 func (c *CountriesListCall) Header() http.Header {
24770 if c.header_ == nil {
24771 c.header_ = make(http.Header)
24772 }
24773 return c.header_
24774 }
24775
24776 func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
24777 reqHeaders := make(http.Header)
24778 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24779 for k, v := range c.header_ {
24780 reqHeaders[k] = v
24781 }
24782 reqHeaders.Set("User-Agent", c.s.userAgent())
24783 if c.ifNoneMatch_ != "" {
24784 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24785 }
24786 var body io.Reader = nil
24787 c.urlParams_.Set("alt", alt)
24788 c.urlParams_.Set("prettyPrint", "false")
24789 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/countries")
24790 urls += "?" + c.urlParams_.Encode()
24791 req, err := http.NewRequest("GET", urls, body)
24792 if err != nil {
24793 return nil, err
24794 }
24795 req.Header = reqHeaders
24796 googleapi.Expand(req.URL, map[string]string{
24797 "profileId": strconv.FormatInt(c.profileId, 10),
24798 })
24799 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24800 }
24801
24802
24803
24804
24805
24806
24807
24808
24809 func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
24810 gensupport.SetOptions(c.urlParams_, opts...)
24811 res, err := c.doRequest("json")
24812 if res != nil && res.StatusCode == http.StatusNotModified {
24813 if res.Body != nil {
24814 res.Body.Close()
24815 }
24816 return nil, &googleapi.Error{
24817 Code: res.StatusCode,
24818 Header: res.Header,
24819 }
24820 }
24821 if err != nil {
24822 return nil, err
24823 }
24824 defer googleapi.CloseBody(res)
24825 if err := googleapi.CheckResponse(res); err != nil {
24826 return nil, err
24827 }
24828 ret := &CountriesListResponse{
24829 ServerResponse: googleapi.ServerResponse{
24830 Header: res.Header,
24831 HTTPStatusCode: res.StatusCode,
24832 },
24833 }
24834 target := &ret
24835 if err := gensupport.DecodeResponse(target, res); err != nil {
24836 return nil, err
24837 }
24838 return ret, nil
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865 }
24866
24867
24868
24869 type CreativeAssetsInsertCall struct {
24870 s *Service
24871 profileId int64
24872 advertiserId int64
24873 creativeassetmetadata *CreativeAssetMetadata
24874 urlParams_ gensupport.URLParams
24875 mediaInfo_ *gensupport.MediaInfo
24876 ctx_ context.Context
24877 header_ http.Header
24878 }
24879
24880
24881
24882
24883
24884
24885 func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
24886 c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24887 c.profileId = profileId
24888 c.advertiserId = advertiserId
24889 c.creativeassetmetadata = creativeassetmetadata
24890 return c
24891 }
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901 func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
24902 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
24903 return c
24904 }
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915 func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
24916 c.ctx_ = ctx
24917 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
24918 return c
24919 }
24920
24921
24922
24923
24924
24925 func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
24926 c.mediaInfo_.SetProgressUpdater(pu)
24927 return c
24928 }
24929
24930
24931
24932
24933 func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
24934 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24935 return c
24936 }
24937
24938
24939
24940
24941
24942
24943 func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
24944 c.ctx_ = ctx
24945 return c
24946 }
24947
24948
24949
24950 func (c *CreativeAssetsInsertCall) Header() http.Header {
24951 if c.header_ == nil {
24952 c.header_ = make(http.Header)
24953 }
24954 return c.header_
24955 }
24956
24957 func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
24958 reqHeaders := make(http.Header)
24959 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
24960 for k, v := range c.header_ {
24961 reqHeaders[k] = v
24962 }
24963 reqHeaders.Set("User-Agent", c.s.userAgent())
24964 var body io.Reader = nil
24965 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
24966 if err != nil {
24967 return nil, err
24968 }
24969 reqHeaders.Set("Content-Type", "application/json")
24970 c.urlParams_.Set("alt", alt)
24971 c.urlParams_.Set("prettyPrint", "false")
24972 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24973 if c.mediaInfo_ != nil {
24974 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v3.3/userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets")
24975 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
24976 }
24977 if body == nil {
24978 body = new(bytes.Buffer)
24979 reqHeaders.Set("Content-Type", "application/json")
24980 }
24981 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
24982 defer cleanup()
24983 urls += "?" + c.urlParams_.Encode()
24984 req, err := http.NewRequest("POST", urls, body)
24985 if err != nil {
24986 return nil, err
24987 }
24988 req.Header = reqHeaders
24989 req.GetBody = getBody
24990 googleapi.Expand(req.URL, map[string]string{
24991 "profileId": strconv.FormatInt(c.profileId, 10),
24992 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
24993 })
24994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24995 }
24996
24997
24998
24999
25000
25001
25002
25003
25004 func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
25005 gensupport.SetOptions(c.urlParams_, opts...)
25006 res, err := c.doRequest("json")
25007 if res != nil && res.StatusCode == http.StatusNotModified {
25008 if res.Body != nil {
25009 res.Body.Close()
25010 }
25011 return nil, &googleapi.Error{
25012 Code: res.StatusCode,
25013 Header: res.Header,
25014 }
25015 }
25016 if err != nil {
25017 return nil, err
25018 }
25019 defer googleapi.CloseBody(res)
25020 if err := googleapi.CheckResponse(res); err != nil {
25021 return nil, err
25022 }
25023 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
25024 if rx != nil {
25025 rx.Client = c.s.client
25026 rx.UserAgent = c.s.userAgent()
25027 ctx := c.ctx_
25028 if ctx == nil {
25029 ctx = context.TODO()
25030 }
25031 res, err = rx.Upload(ctx)
25032 if err != nil {
25033 return nil, err
25034 }
25035 defer res.Body.Close()
25036 if err := googleapi.CheckResponse(res); err != nil {
25037 return nil, err
25038 }
25039 }
25040 ret := &CreativeAssetMetadata{
25041 ServerResponse: googleapi.ServerResponse{
25042 Header: res.Header,
25043 HTTPStatusCode: res.StatusCode,
25044 },
25045 }
25046 target := &ret
25047 if err := gensupport.DecodeResponse(target, res); err != nil {
25048 return nil, err
25049 }
25050 return ret, nil
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101 }
25102
25103
25104
25105 type CreativeFieldValuesDeleteCall struct {
25106 s *Service
25107 profileId int64
25108 creativeFieldId int64
25109 id int64
25110 urlParams_ gensupport.URLParams
25111 ctx_ context.Context
25112 header_ http.Header
25113 }
25114
25115
25116
25117
25118
25119
25120 func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
25121 c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25122 c.profileId = profileId
25123 c.creativeFieldId = creativeFieldId
25124 c.id = id
25125 return c
25126 }
25127
25128
25129
25130
25131 func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
25132 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25133 return c
25134 }
25135
25136
25137
25138
25139 func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
25140 c.ctx_ = ctx
25141 return c
25142 }
25143
25144
25145
25146 func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
25147 if c.header_ == nil {
25148 c.header_ = make(http.Header)
25149 }
25150 return c.header_
25151 }
25152
25153 func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
25154 reqHeaders := make(http.Header)
25155 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
25156 for k, v := range c.header_ {
25157 reqHeaders[k] = v
25158 }
25159 reqHeaders.Set("User-Agent", c.s.userAgent())
25160 var body io.Reader = nil
25161 c.urlParams_.Set("alt", alt)
25162 c.urlParams_.Set("prettyPrint", "false")
25163 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25164 urls += "?" + c.urlParams_.Encode()
25165 req, err := http.NewRequest("DELETE", urls, body)
25166 if err != nil {
25167 return nil, err
25168 }
25169 req.Header = reqHeaders
25170 googleapi.Expand(req.URL, map[string]string{
25171 "profileId": strconv.FormatInt(c.profileId, 10),
25172 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25173 "id": strconv.FormatInt(c.id, 10),
25174 })
25175 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25176 }
25177
25178
25179 func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
25180 gensupport.SetOptions(c.urlParams_, opts...)
25181 res, err := c.doRequest("json")
25182 if err != nil {
25183 return err
25184 }
25185 defer googleapi.CloseBody(res)
25186 if err := googleapi.CheckResponse(res); err != nil {
25187 return err
25188 }
25189 return nil
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229 }
25230
25231
25232
25233 type CreativeFieldValuesGetCall struct {
25234 s *Service
25235 profileId int64
25236 creativeFieldId int64
25237 id int64
25238 urlParams_ gensupport.URLParams
25239 ifNoneMatch_ string
25240 ctx_ context.Context
25241 header_ http.Header
25242 }
25243
25244
25245
25246
25247
25248
25249 func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
25250 c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25251 c.profileId = profileId
25252 c.creativeFieldId = creativeFieldId
25253 c.id = id
25254 return c
25255 }
25256
25257
25258
25259
25260 func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
25261 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25262 return c
25263 }
25264
25265
25266
25267
25268
25269
25270 func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
25271 c.ifNoneMatch_ = entityTag
25272 return c
25273 }
25274
25275
25276
25277
25278 func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
25279 c.ctx_ = ctx
25280 return c
25281 }
25282
25283
25284
25285 func (c *CreativeFieldValuesGetCall) Header() http.Header {
25286 if c.header_ == nil {
25287 c.header_ = make(http.Header)
25288 }
25289 return c.header_
25290 }
25291
25292 func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
25293 reqHeaders := make(http.Header)
25294 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
25295 for k, v := range c.header_ {
25296 reqHeaders[k] = v
25297 }
25298 reqHeaders.Set("User-Agent", c.s.userAgent())
25299 if c.ifNoneMatch_ != "" {
25300 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25301 }
25302 var body io.Reader = nil
25303 c.urlParams_.Set("alt", alt)
25304 c.urlParams_.Set("prettyPrint", "false")
25305 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}")
25306 urls += "?" + c.urlParams_.Encode()
25307 req, err := http.NewRequest("GET", urls, body)
25308 if err != nil {
25309 return nil, err
25310 }
25311 req.Header = reqHeaders
25312 googleapi.Expand(req.URL, map[string]string{
25313 "profileId": strconv.FormatInt(c.profileId, 10),
25314 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25315 "id": strconv.FormatInt(c.id, 10),
25316 })
25317 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25318 }
25319
25320
25321
25322
25323
25324
25325
25326
25327 func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25328 gensupport.SetOptions(c.urlParams_, opts...)
25329 res, err := c.doRequest("json")
25330 if res != nil && res.StatusCode == http.StatusNotModified {
25331 if res.Body != nil {
25332 res.Body.Close()
25333 }
25334 return nil, &googleapi.Error{
25335 Code: res.StatusCode,
25336 Header: res.Header,
25337 }
25338 }
25339 if err != nil {
25340 return nil, err
25341 }
25342 defer googleapi.CloseBody(res)
25343 if err := googleapi.CheckResponse(res); err != nil {
25344 return nil, err
25345 }
25346 ret := &CreativeFieldValue{
25347 ServerResponse: googleapi.ServerResponse{
25348 Header: res.Header,
25349 HTTPStatusCode: res.StatusCode,
25350 },
25351 }
25352 target := &ret
25353 if err := gensupport.DecodeResponse(target, res); err != nil {
25354 return nil, err
25355 }
25356 return ret, nil
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399 }
25400
25401
25402
25403 type CreativeFieldValuesInsertCall struct {
25404 s *Service
25405 profileId int64
25406 creativeFieldId int64
25407 creativefieldvalue *CreativeFieldValue
25408 urlParams_ gensupport.URLParams
25409 ctx_ context.Context
25410 header_ http.Header
25411 }
25412
25413
25414
25415
25416
25417 func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
25418 c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25419 c.profileId = profileId
25420 c.creativeFieldId = creativeFieldId
25421 c.creativefieldvalue = creativefieldvalue
25422 return c
25423 }
25424
25425
25426
25427
25428 func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
25429 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25430 return c
25431 }
25432
25433
25434
25435
25436 func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
25437 c.ctx_ = ctx
25438 return c
25439 }
25440
25441
25442
25443 func (c *CreativeFieldValuesInsertCall) Header() http.Header {
25444 if c.header_ == nil {
25445 c.header_ = make(http.Header)
25446 }
25447 return c.header_
25448 }
25449
25450 func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
25451 reqHeaders := make(http.Header)
25452 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
25453 for k, v := range c.header_ {
25454 reqHeaders[k] = v
25455 }
25456 reqHeaders.Set("User-Agent", c.s.userAgent())
25457 var body io.Reader = nil
25458 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25459 if err != nil {
25460 return nil, err
25461 }
25462 reqHeaders.Set("Content-Type", "application/json")
25463 c.urlParams_.Set("alt", alt)
25464 c.urlParams_.Set("prettyPrint", "false")
25465 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25466 urls += "?" + c.urlParams_.Encode()
25467 req, err := http.NewRequest("POST", urls, body)
25468 if err != nil {
25469 return nil, err
25470 }
25471 req.Header = reqHeaders
25472 googleapi.Expand(req.URL, map[string]string{
25473 "profileId": strconv.FormatInt(c.profileId, 10),
25474 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25475 })
25476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25477 }
25478
25479
25480
25481
25482
25483
25484
25485
25486 func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25487 gensupport.SetOptions(c.urlParams_, opts...)
25488 res, err := c.doRequest("json")
25489 if res != nil && res.StatusCode == http.StatusNotModified {
25490 if res.Body != nil {
25491 res.Body.Close()
25492 }
25493 return nil, &googleapi.Error{
25494 Code: res.StatusCode,
25495 Header: res.Header,
25496 }
25497 }
25498 if err != nil {
25499 return nil, err
25500 }
25501 defer googleapi.CloseBody(res)
25502 if err := googleapi.CheckResponse(res); err != nil {
25503 return nil, err
25504 }
25505 ret := &CreativeFieldValue{
25506 ServerResponse: googleapi.ServerResponse{
25507 Header: res.Header,
25508 HTTPStatusCode: res.StatusCode,
25509 },
25510 }
25511 target := &ret
25512 if err := gensupport.DecodeResponse(target, res); err != nil {
25513 return nil, err
25514 }
25515 return ret, nil
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553 }
25554
25555
25556
25557 type CreativeFieldValuesListCall struct {
25558 s *Service
25559 profileId int64
25560 creativeFieldId int64
25561 urlParams_ gensupport.URLParams
25562 ifNoneMatch_ string
25563 ctx_ context.Context
25564 header_ http.Header
25565 }
25566
25567
25568
25569
25570
25571
25572 func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
25573 c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25574 c.profileId = profileId
25575 c.creativeFieldId = creativeFieldId
25576 return c
25577 }
25578
25579
25580
25581 func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
25582 var ids_ []string
25583 for _, v := range ids {
25584 ids_ = append(ids_, fmt.Sprint(v))
25585 }
25586 c.urlParams_.SetMulti("ids", ids_)
25587 return c
25588 }
25589
25590
25591
25592 func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
25593 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25594 return c
25595 }
25596
25597
25598
25599 func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
25600 c.urlParams_.Set("pageToken", pageToken)
25601 return c
25602 }
25603
25604
25605
25606
25607 func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
25608 c.urlParams_.Set("searchString", searchString)
25609 return c
25610 }
25611
25612
25613
25614
25615
25616
25617
25618
25619 func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
25620 c.urlParams_.Set("sortField", sortField)
25621 return c
25622 }
25623
25624
25625
25626
25627
25628
25629
25630
25631 func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
25632 c.urlParams_.Set("sortOrder", sortOrder)
25633 return c
25634 }
25635
25636
25637
25638
25639 func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
25640 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25641 return c
25642 }
25643
25644
25645
25646
25647
25648
25649 func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
25650 c.ifNoneMatch_ = entityTag
25651 return c
25652 }
25653
25654
25655
25656
25657 func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
25658 c.ctx_ = ctx
25659 return c
25660 }
25661
25662
25663
25664 func (c *CreativeFieldValuesListCall) Header() http.Header {
25665 if c.header_ == nil {
25666 c.header_ = make(http.Header)
25667 }
25668 return c.header_
25669 }
25670
25671 func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
25672 reqHeaders := make(http.Header)
25673 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
25674 for k, v := range c.header_ {
25675 reqHeaders[k] = v
25676 }
25677 reqHeaders.Set("User-Agent", c.s.userAgent())
25678 if c.ifNoneMatch_ != "" {
25679 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25680 }
25681 var body io.Reader = nil
25682 c.urlParams_.Set("alt", alt)
25683 c.urlParams_.Set("prettyPrint", "false")
25684 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25685 urls += "?" + c.urlParams_.Encode()
25686 req, err := http.NewRequest("GET", urls, body)
25687 if err != nil {
25688 return nil, err
25689 }
25690 req.Header = reqHeaders
25691 googleapi.Expand(req.URL, map[string]string{
25692 "profileId": strconv.FormatInt(c.profileId, 10),
25693 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25694 })
25695 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25696 }
25697
25698
25699
25700
25701
25702
25703
25704
25705 func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
25706 gensupport.SetOptions(c.urlParams_, opts...)
25707 res, err := c.doRequest("json")
25708 if res != nil && res.StatusCode == http.StatusNotModified {
25709 if res.Body != nil {
25710 res.Body.Close()
25711 }
25712 return nil, &googleapi.Error{
25713 Code: res.StatusCode,
25714 Header: res.Header,
25715 }
25716 }
25717 if err != nil {
25718 return nil, err
25719 }
25720 defer googleapi.CloseBody(res)
25721 if err := googleapi.CheckResponse(res); err != nil {
25722 return nil, err
25723 }
25724 ret := &CreativeFieldValuesListResponse{
25725 ServerResponse: googleapi.ServerResponse{
25726 Header: res.Header,
25727 HTTPStatusCode: res.StatusCode,
25728 },
25729 }
25730 target := &ret
25731 if err := gensupport.DecodeResponse(target, res); err != nil {
25732 return nil, err
25733 }
25734 return ret, nil
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823 }
25824
25825
25826
25827
25828 func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
25829 c.ctx_ = ctx
25830 defer c.PageToken(c.urlParams_.Get("pageToken"))
25831 for {
25832 x, err := c.Do()
25833 if err != nil {
25834 return err
25835 }
25836 if err := f(x); err != nil {
25837 return err
25838 }
25839 if x.NextPageToken == "" {
25840 return nil
25841 }
25842 c.PageToken(x.NextPageToken)
25843 }
25844 }
25845
25846
25847
25848 type CreativeFieldValuesPatchCall struct {
25849 s *Service
25850 profileId int64
25851 creativeFieldId int64
25852 creativefieldvalue *CreativeFieldValue
25853 urlParams_ gensupport.URLParams
25854 ctx_ context.Context
25855 header_ http.Header
25856 }
25857
25858
25859
25860
25861
25862
25863
25864 func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
25865 c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25866 c.profileId = profileId
25867 c.creativeFieldId = creativeFieldId
25868 c.urlParams_.Set("id", fmt.Sprint(id))
25869 c.creativefieldvalue = creativefieldvalue
25870 return c
25871 }
25872
25873
25874
25875
25876 func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
25877 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25878 return c
25879 }
25880
25881
25882
25883
25884 func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
25885 c.ctx_ = ctx
25886 return c
25887 }
25888
25889
25890
25891 func (c *CreativeFieldValuesPatchCall) Header() http.Header {
25892 if c.header_ == nil {
25893 c.header_ = make(http.Header)
25894 }
25895 return c.header_
25896 }
25897
25898 func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
25899 reqHeaders := make(http.Header)
25900 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
25901 for k, v := range c.header_ {
25902 reqHeaders[k] = v
25903 }
25904 reqHeaders.Set("User-Agent", c.s.userAgent())
25905 var body io.Reader = nil
25906 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
25907 if err != nil {
25908 return nil, err
25909 }
25910 reqHeaders.Set("Content-Type", "application/json")
25911 c.urlParams_.Set("alt", alt)
25912 c.urlParams_.Set("prettyPrint", "false")
25913 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
25914 urls += "?" + c.urlParams_.Encode()
25915 req, err := http.NewRequest("PATCH", urls, body)
25916 if err != nil {
25917 return nil, err
25918 }
25919 req.Header = reqHeaders
25920 googleapi.Expand(req.URL, map[string]string{
25921 "profileId": strconv.FormatInt(c.profileId, 10),
25922 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
25923 })
25924 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25925 }
25926
25927
25928
25929
25930
25931
25932
25933
25934 func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
25935 gensupport.SetOptions(c.urlParams_, opts...)
25936 res, err := c.doRequest("json")
25937 if res != nil && res.StatusCode == http.StatusNotModified {
25938 if res.Body != nil {
25939 res.Body.Close()
25940 }
25941 return nil, &googleapi.Error{
25942 Code: res.StatusCode,
25943 Header: res.Header,
25944 }
25945 }
25946 if err != nil {
25947 return nil, err
25948 }
25949 defer googleapi.CloseBody(res)
25950 if err := googleapi.CheckResponse(res); err != nil {
25951 return nil, err
25952 }
25953 ret := &CreativeFieldValue{
25954 ServerResponse: googleapi.ServerResponse{
25955 Header: res.Header,
25956 HTTPStatusCode: res.StatusCode,
25957 },
25958 }
25959 target := &ret
25960 if err := gensupport.DecodeResponse(target, res); err != nil {
25961 return nil, err
25962 }
25963 return ret, nil
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009 }
26010
26011
26012
26013 type CreativeFieldValuesUpdateCall struct {
26014 s *Service
26015 profileId int64
26016 creativeFieldId int64
26017 creativefieldvalue *CreativeFieldValue
26018 urlParams_ gensupport.URLParams
26019 ctx_ context.Context
26020 header_ http.Header
26021 }
26022
26023
26024
26025
26026
26027 func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
26028 c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26029 c.profileId = profileId
26030 c.creativeFieldId = creativeFieldId
26031 c.creativefieldvalue = creativefieldvalue
26032 return c
26033 }
26034
26035
26036
26037
26038 func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
26039 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26040 return c
26041 }
26042
26043
26044
26045
26046 func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
26047 c.ctx_ = ctx
26048 return c
26049 }
26050
26051
26052
26053 func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
26054 if c.header_ == nil {
26055 c.header_ = make(http.Header)
26056 }
26057 return c.header_
26058 }
26059
26060 func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
26061 reqHeaders := make(http.Header)
26062 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26063 for k, v := range c.header_ {
26064 reqHeaders[k] = v
26065 }
26066 reqHeaders.Set("User-Agent", c.s.userAgent())
26067 var body io.Reader = nil
26068 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
26069 if err != nil {
26070 return nil, err
26071 }
26072 reqHeaders.Set("Content-Type", "application/json")
26073 c.urlParams_.Set("alt", alt)
26074 c.urlParams_.Set("prettyPrint", "false")
26075 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues")
26076 urls += "?" + c.urlParams_.Encode()
26077 req, err := http.NewRequest("PUT", urls, body)
26078 if err != nil {
26079 return nil, err
26080 }
26081 req.Header = reqHeaders
26082 googleapi.Expand(req.URL, map[string]string{
26083 "profileId": strconv.FormatInt(c.profileId, 10),
26084 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
26085 })
26086 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26087 }
26088
26089
26090
26091
26092
26093
26094
26095
26096 func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
26097 gensupport.SetOptions(c.urlParams_, opts...)
26098 res, err := c.doRequest("json")
26099 if res != nil && res.StatusCode == http.StatusNotModified {
26100 if res.Body != nil {
26101 res.Body.Close()
26102 }
26103 return nil, &googleapi.Error{
26104 Code: res.StatusCode,
26105 Header: res.Header,
26106 }
26107 }
26108 if err != nil {
26109 return nil, err
26110 }
26111 defer googleapi.CloseBody(res)
26112 if err := googleapi.CheckResponse(res); err != nil {
26113 return nil, err
26114 }
26115 ret := &CreativeFieldValue{
26116 ServerResponse: googleapi.ServerResponse{
26117 Header: res.Header,
26118 HTTPStatusCode: res.StatusCode,
26119 },
26120 }
26121 target := &ret
26122 if err := gensupport.DecodeResponse(target, res); err != nil {
26123 return nil, err
26124 }
26125 return ret, nil
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163 }
26164
26165
26166
26167 type CreativeFieldsDeleteCall struct {
26168 s *Service
26169 profileId int64
26170 id int64
26171 urlParams_ gensupport.URLParams
26172 ctx_ context.Context
26173 header_ http.Header
26174 }
26175
26176
26177
26178
26179
26180 func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
26181 c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26182 c.profileId = profileId
26183 c.id = id
26184 return c
26185 }
26186
26187
26188
26189
26190 func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
26191 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26192 return c
26193 }
26194
26195
26196
26197
26198 func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
26199 c.ctx_ = ctx
26200 return c
26201 }
26202
26203
26204
26205 func (c *CreativeFieldsDeleteCall) Header() http.Header {
26206 if c.header_ == nil {
26207 c.header_ = make(http.Header)
26208 }
26209 return c.header_
26210 }
26211
26212 func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
26213 reqHeaders := make(http.Header)
26214 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26215 for k, v := range c.header_ {
26216 reqHeaders[k] = v
26217 }
26218 reqHeaders.Set("User-Agent", c.s.userAgent())
26219 var body io.Reader = nil
26220 c.urlParams_.Set("alt", alt)
26221 c.urlParams_.Set("prettyPrint", "false")
26222 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26223 urls += "?" + c.urlParams_.Encode()
26224 req, err := http.NewRequest("DELETE", urls, body)
26225 if err != nil {
26226 return nil, err
26227 }
26228 req.Header = reqHeaders
26229 googleapi.Expand(req.URL, map[string]string{
26230 "profileId": strconv.FormatInt(c.profileId, 10),
26231 "id": strconv.FormatInt(c.id, 10),
26232 })
26233 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26234 }
26235
26236
26237 func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
26238 gensupport.SetOptions(c.urlParams_, opts...)
26239 res, err := c.doRequest("json")
26240 if err != nil {
26241 return err
26242 }
26243 defer googleapi.CloseBody(res)
26244 if err := googleapi.CheckResponse(res); err != nil {
26245 return err
26246 }
26247 return nil
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279 }
26280
26281
26282
26283 type CreativeFieldsGetCall struct {
26284 s *Service
26285 profileId int64
26286 id int64
26287 urlParams_ gensupport.URLParams
26288 ifNoneMatch_ string
26289 ctx_ context.Context
26290 header_ http.Header
26291 }
26292
26293
26294
26295
26296
26297 func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
26298 c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26299 c.profileId = profileId
26300 c.id = id
26301 return c
26302 }
26303
26304
26305
26306
26307 func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
26308 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26309 return c
26310 }
26311
26312
26313
26314
26315
26316
26317 func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
26318 c.ifNoneMatch_ = entityTag
26319 return c
26320 }
26321
26322
26323
26324
26325 func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
26326 c.ctx_ = ctx
26327 return c
26328 }
26329
26330
26331
26332 func (c *CreativeFieldsGetCall) Header() http.Header {
26333 if c.header_ == nil {
26334 c.header_ = make(http.Header)
26335 }
26336 return c.header_
26337 }
26338
26339 func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
26340 reqHeaders := make(http.Header)
26341 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26342 for k, v := range c.header_ {
26343 reqHeaders[k] = v
26344 }
26345 reqHeaders.Set("User-Agent", c.s.userAgent())
26346 if c.ifNoneMatch_ != "" {
26347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26348 }
26349 var body io.Reader = nil
26350 c.urlParams_.Set("alt", alt)
26351 c.urlParams_.Set("prettyPrint", "false")
26352 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields/{id}")
26353 urls += "?" + c.urlParams_.Encode()
26354 req, err := http.NewRequest("GET", urls, body)
26355 if err != nil {
26356 return nil, err
26357 }
26358 req.Header = reqHeaders
26359 googleapi.Expand(req.URL, map[string]string{
26360 "profileId": strconv.FormatInt(c.profileId, 10),
26361 "id": strconv.FormatInt(c.id, 10),
26362 })
26363 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26364 }
26365
26366
26367
26368
26369
26370
26371
26372
26373 func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26374 gensupport.SetOptions(c.urlParams_, opts...)
26375 res, err := c.doRequest("json")
26376 if res != nil && res.StatusCode == http.StatusNotModified {
26377 if res.Body != nil {
26378 res.Body.Close()
26379 }
26380 return nil, &googleapi.Error{
26381 Code: res.StatusCode,
26382 Header: res.Header,
26383 }
26384 }
26385 if err != nil {
26386 return nil, err
26387 }
26388 defer googleapi.CloseBody(res)
26389 if err := googleapi.CheckResponse(res); err != nil {
26390 return nil, err
26391 }
26392 ret := &CreativeField{
26393 ServerResponse: googleapi.ServerResponse{
26394 Header: res.Header,
26395 HTTPStatusCode: res.StatusCode,
26396 },
26397 }
26398 target := &ret
26399 if err := gensupport.DecodeResponse(target, res); err != nil {
26400 return nil, err
26401 }
26402 return ret, nil
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437 }
26438
26439
26440
26441 type CreativeFieldsInsertCall struct {
26442 s *Service
26443 profileId int64
26444 creativefield *CreativeField
26445 urlParams_ gensupport.URLParams
26446 ctx_ context.Context
26447 header_ http.Header
26448 }
26449
26450
26451
26452
26453 func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
26454 c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26455 c.profileId = profileId
26456 c.creativefield = creativefield
26457 return c
26458 }
26459
26460
26461
26462
26463 func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
26464 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26465 return c
26466 }
26467
26468
26469
26470
26471 func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
26472 c.ctx_ = ctx
26473 return c
26474 }
26475
26476
26477
26478 func (c *CreativeFieldsInsertCall) Header() http.Header {
26479 if c.header_ == nil {
26480 c.header_ = make(http.Header)
26481 }
26482 return c.header_
26483 }
26484
26485 func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
26486 reqHeaders := make(http.Header)
26487 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26488 for k, v := range c.header_ {
26489 reqHeaders[k] = v
26490 }
26491 reqHeaders.Set("User-Agent", c.s.userAgent())
26492 var body io.Reader = nil
26493 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26494 if err != nil {
26495 return nil, err
26496 }
26497 reqHeaders.Set("Content-Type", "application/json")
26498 c.urlParams_.Set("alt", alt)
26499 c.urlParams_.Set("prettyPrint", "false")
26500 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26501 urls += "?" + c.urlParams_.Encode()
26502 req, err := http.NewRequest("POST", urls, body)
26503 if err != nil {
26504 return nil, err
26505 }
26506 req.Header = reqHeaders
26507 googleapi.Expand(req.URL, map[string]string{
26508 "profileId": strconv.FormatInt(c.profileId, 10),
26509 })
26510 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26511 }
26512
26513
26514
26515
26516
26517
26518
26519
26520 func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26521 gensupport.SetOptions(c.urlParams_, opts...)
26522 res, err := c.doRequest("json")
26523 if res != nil && res.StatusCode == http.StatusNotModified {
26524 if res.Body != nil {
26525 res.Body.Close()
26526 }
26527 return nil, &googleapi.Error{
26528 Code: res.StatusCode,
26529 Header: res.Header,
26530 }
26531 }
26532 if err != nil {
26533 return nil, err
26534 }
26535 defer googleapi.CloseBody(res)
26536 if err := googleapi.CheckResponse(res); err != nil {
26537 return nil, err
26538 }
26539 ret := &CreativeField{
26540 ServerResponse: googleapi.ServerResponse{
26541 Header: res.Header,
26542 HTTPStatusCode: res.StatusCode,
26543 },
26544 }
26545 target := &ret
26546 if err := gensupport.DecodeResponse(target, res); err != nil {
26547 return nil, err
26548 }
26549 return ret, nil
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579 }
26580
26581
26582
26583 type CreativeFieldsListCall struct {
26584 s *Service
26585 profileId int64
26586 urlParams_ gensupport.URLParams
26587 ifNoneMatch_ string
26588 ctx_ context.Context
26589 header_ http.Header
26590 }
26591
26592
26593
26594
26595
26596 func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
26597 c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26598 c.profileId = profileId
26599 return c
26600 }
26601
26602
26603
26604 func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
26605 var advertiserIds_ []string
26606 for _, v := range advertiserIds {
26607 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
26608 }
26609 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
26610 return c
26611 }
26612
26613
26614
26615 func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
26616 var ids_ []string
26617 for _, v := range ids {
26618 ids_ = append(ids_, fmt.Sprint(v))
26619 }
26620 c.urlParams_.SetMulti("ids", ids_)
26621 return c
26622 }
26623
26624
26625
26626 func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
26627 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26628 return c
26629 }
26630
26631
26632
26633 func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
26634 c.urlParams_.Set("pageToken", pageToken)
26635 return c
26636 }
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647 func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
26648 c.urlParams_.Set("searchString", searchString)
26649 return c
26650 }
26651
26652
26653
26654
26655
26656
26657
26658
26659 func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
26660 c.urlParams_.Set("sortField", sortField)
26661 return c
26662 }
26663
26664
26665
26666
26667
26668
26669
26670
26671 func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
26672 c.urlParams_.Set("sortOrder", sortOrder)
26673 return c
26674 }
26675
26676
26677
26678
26679 func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
26680 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26681 return c
26682 }
26683
26684
26685
26686
26687
26688
26689 func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
26690 c.ifNoneMatch_ = entityTag
26691 return c
26692 }
26693
26694
26695
26696
26697 func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
26698 c.ctx_ = ctx
26699 return c
26700 }
26701
26702
26703
26704 func (c *CreativeFieldsListCall) Header() http.Header {
26705 if c.header_ == nil {
26706 c.header_ = make(http.Header)
26707 }
26708 return c.header_
26709 }
26710
26711 func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
26712 reqHeaders := make(http.Header)
26713 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26714 for k, v := range c.header_ {
26715 reqHeaders[k] = v
26716 }
26717 reqHeaders.Set("User-Agent", c.s.userAgent())
26718 if c.ifNoneMatch_ != "" {
26719 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26720 }
26721 var body io.Reader = nil
26722 c.urlParams_.Set("alt", alt)
26723 c.urlParams_.Set("prettyPrint", "false")
26724 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26725 urls += "?" + c.urlParams_.Encode()
26726 req, err := http.NewRequest("GET", urls, body)
26727 if err != nil {
26728 return nil, err
26729 }
26730 req.Header = reqHeaders
26731 googleapi.Expand(req.URL, map[string]string{
26732 "profileId": strconv.FormatInt(c.profileId, 10),
26733 })
26734 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26735 }
26736
26737
26738
26739
26740
26741
26742
26743
26744 func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
26745 gensupport.SetOptions(c.urlParams_, opts...)
26746 res, err := c.doRequest("json")
26747 if res != nil && res.StatusCode == http.StatusNotModified {
26748 if res.Body != nil {
26749 res.Body.Close()
26750 }
26751 return nil, &googleapi.Error{
26752 Code: res.StatusCode,
26753 Header: res.Header,
26754 }
26755 }
26756 if err != nil {
26757 return nil, err
26758 }
26759 defer googleapi.CloseBody(res)
26760 if err := googleapi.CheckResponse(res); err != nil {
26761 return nil, err
26762 }
26763 ret := &CreativeFieldsListResponse{
26764 ServerResponse: googleapi.ServerResponse{
26765 Header: res.Header,
26766 HTTPStatusCode: res.StatusCode,
26767 },
26768 }
26769 target := &ret
26770 if err := gensupport.DecodeResponse(target, res); err != nil {
26771 return nil, err
26772 }
26773 return ret, nil
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861 }
26862
26863
26864
26865
26866 func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
26867 c.ctx_ = ctx
26868 defer c.PageToken(c.urlParams_.Get("pageToken"))
26869 for {
26870 x, err := c.Do()
26871 if err != nil {
26872 return err
26873 }
26874 if err := f(x); err != nil {
26875 return err
26876 }
26877 if x.NextPageToken == "" {
26878 return nil
26879 }
26880 c.PageToken(x.NextPageToken)
26881 }
26882 }
26883
26884
26885
26886 type CreativeFieldsPatchCall struct {
26887 s *Service
26888 profileId int64
26889 creativefield *CreativeField
26890 urlParams_ gensupport.URLParams
26891 ctx_ context.Context
26892 header_ http.Header
26893 }
26894
26895
26896
26897
26898
26899
26900 func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
26901 c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26902 c.profileId = profileId
26903 c.urlParams_.Set("id", fmt.Sprint(id))
26904 c.creativefield = creativefield
26905 return c
26906 }
26907
26908
26909
26910
26911 func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
26912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26913 return c
26914 }
26915
26916
26917
26918
26919 func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
26920 c.ctx_ = ctx
26921 return c
26922 }
26923
26924
26925
26926 func (c *CreativeFieldsPatchCall) Header() http.Header {
26927 if c.header_ == nil {
26928 c.header_ = make(http.Header)
26929 }
26930 return c.header_
26931 }
26932
26933 func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
26934 reqHeaders := make(http.Header)
26935 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
26936 for k, v := range c.header_ {
26937 reqHeaders[k] = v
26938 }
26939 reqHeaders.Set("User-Agent", c.s.userAgent())
26940 var body io.Reader = nil
26941 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
26942 if err != nil {
26943 return nil, err
26944 }
26945 reqHeaders.Set("Content-Type", "application/json")
26946 c.urlParams_.Set("alt", alt)
26947 c.urlParams_.Set("prettyPrint", "false")
26948 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
26949 urls += "?" + c.urlParams_.Encode()
26950 req, err := http.NewRequest("PATCH", urls, body)
26951 if err != nil {
26952 return nil, err
26953 }
26954 req.Header = reqHeaders
26955 googleapi.Expand(req.URL, map[string]string{
26956 "profileId": strconv.FormatInt(c.profileId, 10),
26957 })
26958 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26959 }
26960
26961
26962
26963
26964
26965
26966
26967
26968 func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
26969 gensupport.SetOptions(c.urlParams_, opts...)
26970 res, err := c.doRequest("json")
26971 if res != nil && res.StatusCode == http.StatusNotModified {
26972 if res.Body != nil {
26973 res.Body.Close()
26974 }
26975 return nil, &googleapi.Error{
26976 Code: res.StatusCode,
26977 Header: res.Header,
26978 }
26979 }
26980 if err != nil {
26981 return nil, err
26982 }
26983 defer googleapi.CloseBody(res)
26984 if err := googleapi.CheckResponse(res); err != nil {
26985 return nil, err
26986 }
26987 ret := &CreativeField{
26988 ServerResponse: googleapi.ServerResponse{
26989 Header: res.Header,
26990 HTTPStatusCode: res.StatusCode,
26991 },
26992 }
26993 target := &ret
26994 if err := gensupport.DecodeResponse(target, res); err != nil {
26995 return nil, err
26996 }
26997 return ret, nil
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035 }
27036
27037
27038
27039 type CreativeFieldsUpdateCall struct {
27040 s *Service
27041 profileId int64
27042 creativefield *CreativeField
27043 urlParams_ gensupport.URLParams
27044 ctx_ context.Context
27045 header_ http.Header
27046 }
27047
27048
27049
27050
27051 func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
27052 c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27053 c.profileId = profileId
27054 c.creativefield = creativefield
27055 return c
27056 }
27057
27058
27059
27060
27061 func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
27062 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27063 return c
27064 }
27065
27066
27067
27068
27069 func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
27070 c.ctx_ = ctx
27071 return c
27072 }
27073
27074
27075
27076 func (c *CreativeFieldsUpdateCall) Header() http.Header {
27077 if c.header_ == nil {
27078 c.header_ = make(http.Header)
27079 }
27080 return c.header_
27081 }
27082
27083 func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
27084 reqHeaders := make(http.Header)
27085 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27086 for k, v := range c.header_ {
27087 reqHeaders[k] = v
27088 }
27089 reqHeaders.Set("User-Agent", c.s.userAgent())
27090 var body io.Reader = nil
27091 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
27092 if err != nil {
27093 return nil, err
27094 }
27095 reqHeaders.Set("Content-Type", "application/json")
27096 c.urlParams_.Set("alt", alt)
27097 c.urlParams_.Set("prettyPrint", "false")
27098 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeFields")
27099 urls += "?" + c.urlParams_.Encode()
27100 req, err := http.NewRequest("PUT", urls, body)
27101 if err != nil {
27102 return nil, err
27103 }
27104 req.Header = reqHeaders
27105 googleapi.Expand(req.URL, map[string]string{
27106 "profileId": strconv.FormatInt(c.profileId, 10),
27107 })
27108 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27109 }
27110
27111
27112
27113
27114
27115
27116
27117
27118 func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
27119 gensupport.SetOptions(c.urlParams_, opts...)
27120 res, err := c.doRequest("json")
27121 if res != nil && res.StatusCode == http.StatusNotModified {
27122 if res.Body != nil {
27123 res.Body.Close()
27124 }
27125 return nil, &googleapi.Error{
27126 Code: res.StatusCode,
27127 Header: res.Header,
27128 }
27129 }
27130 if err != nil {
27131 return nil, err
27132 }
27133 defer googleapi.CloseBody(res)
27134 if err := googleapi.CheckResponse(res); err != nil {
27135 return nil, err
27136 }
27137 ret := &CreativeField{
27138 ServerResponse: googleapi.ServerResponse{
27139 Header: res.Header,
27140 HTTPStatusCode: res.StatusCode,
27141 },
27142 }
27143 target := &ret
27144 if err := gensupport.DecodeResponse(target, res); err != nil {
27145 return nil, err
27146 }
27147 return ret, nil
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177 }
27178
27179
27180
27181 type CreativeGroupsGetCall struct {
27182 s *Service
27183 profileId int64
27184 id int64
27185 urlParams_ gensupport.URLParams
27186 ifNoneMatch_ string
27187 ctx_ context.Context
27188 header_ http.Header
27189 }
27190
27191
27192
27193
27194
27195 func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
27196 c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27197 c.profileId = profileId
27198 c.id = id
27199 return c
27200 }
27201
27202
27203
27204
27205 func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
27206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27207 return c
27208 }
27209
27210
27211
27212
27213
27214
27215 func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
27216 c.ifNoneMatch_ = entityTag
27217 return c
27218 }
27219
27220
27221
27222
27223 func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
27224 c.ctx_ = ctx
27225 return c
27226 }
27227
27228
27229
27230 func (c *CreativeGroupsGetCall) Header() http.Header {
27231 if c.header_ == nil {
27232 c.header_ = make(http.Header)
27233 }
27234 return c.header_
27235 }
27236
27237 func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
27238 reqHeaders := make(http.Header)
27239 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27240 for k, v := range c.header_ {
27241 reqHeaders[k] = v
27242 }
27243 reqHeaders.Set("User-Agent", c.s.userAgent())
27244 if c.ifNoneMatch_ != "" {
27245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27246 }
27247 var body io.Reader = nil
27248 c.urlParams_.Set("alt", alt)
27249 c.urlParams_.Set("prettyPrint", "false")
27250 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups/{id}")
27251 urls += "?" + c.urlParams_.Encode()
27252 req, err := http.NewRequest("GET", urls, body)
27253 if err != nil {
27254 return nil, err
27255 }
27256 req.Header = reqHeaders
27257 googleapi.Expand(req.URL, map[string]string{
27258 "profileId": strconv.FormatInt(c.profileId, 10),
27259 "id": strconv.FormatInt(c.id, 10),
27260 })
27261 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27262 }
27263
27264
27265
27266
27267
27268
27269
27270
27271 func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27272 gensupport.SetOptions(c.urlParams_, opts...)
27273 res, err := c.doRequest("json")
27274 if res != nil && res.StatusCode == http.StatusNotModified {
27275 if res.Body != nil {
27276 res.Body.Close()
27277 }
27278 return nil, &googleapi.Error{
27279 Code: res.StatusCode,
27280 Header: res.Header,
27281 }
27282 }
27283 if err != nil {
27284 return nil, err
27285 }
27286 defer googleapi.CloseBody(res)
27287 if err := googleapi.CheckResponse(res); err != nil {
27288 return nil, err
27289 }
27290 ret := &CreativeGroup{
27291 ServerResponse: googleapi.ServerResponse{
27292 Header: res.Header,
27293 HTTPStatusCode: res.StatusCode,
27294 },
27295 }
27296 target := &ret
27297 if err := gensupport.DecodeResponse(target, res); err != nil {
27298 return nil, err
27299 }
27300 return ret, nil
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335 }
27336
27337
27338
27339 type CreativeGroupsInsertCall struct {
27340 s *Service
27341 profileId int64
27342 creativegroup *CreativeGroup
27343 urlParams_ gensupport.URLParams
27344 ctx_ context.Context
27345 header_ http.Header
27346 }
27347
27348
27349
27350
27351 func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
27352 c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27353 c.profileId = profileId
27354 c.creativegroup = creativegroup
27355 return c
27356 }
27357
27358
27359
27360
27361 func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
27362 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27363 return c
27364 }
27365
27366
27367
27368
27369 func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
27370 c.ctx_ = ctx
27371 return c
27372 }
27373
27374
27375
27376 func (c *CreativeGroupsInsertCall) Header() http.Header {
27377 if c.header_ == nil {
27378 c.header_ = make(http.Header)
27379 }
27380 return c.header_
27381 }
27382
27383 func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
27384 reqHeaders := make(http.Header)
27385 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27386 for k, v := range c.header_ {
27387 reqHeaders[k] = v
27388 }
27389 reqHeaders.Set("User-Agent", c.s.userAgent())
27390 var body io.Reader = nil
27391 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27392 if err != nil {
27393 return nil, err
27394 }
27395 reqHeaders.Set("Content-Type", "application/json")
27396 c.urlParams_.Set("alt", alt)
27397 c.urlParams_.Set("prettyPrint", "false")
27398 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27399 urls += "?" + c.urlParams_.Encode()
27400 req, err := http.NewRequest("POST", urls, body)
27401 if err != nil {
27402 return nil, err
27403 }
27404 req.Header = reqHeaders
27405 googleapi.Expand(req.URL, map[string]string{
27406 "profileId": strconv.FormatInt(c.profileId, 10),
27407 })
27408 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27409 }
27410
27411
27412
27413
27414
27415
27416
27417
27418 func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27419 gensupport.SetOptions(c.urlParams_, opts...)
27420 res, err := c.doRequest("json")
27421 if res != nil && res.StatusCode == http.StatusNotModified {
27422 if res.Body != nil {
27423 res.Body.Close()
27424 }
27425 return nil, &googleapi.Error{
27426 Code: res.StatusCode,
27427 Header: res.Header,
27428 }
27429 }
27430 if err != nil {
27431 return nil, err
27432 }
27433 defer googleapi.CloseBody(res)
27434 if err := googleapi.CheckResponse(res); err != nil {
27435 return nil, err
27436 }
27437 ret := &CreativeGroup{
27438 ServerResponse: googleapi.ServerResponse{
27439 Header: res.Header,
27440 HTTPStatusCode: res.StatusCode,
27441 },
27442 }
27443 target := &ret
27444 if err := gensupport.DecodeResponse(target, res); err != nil {
27445 return nil, err
27446 }
27447 return ret, nil
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477 }
27478
27479
27480
27481 type CreativeGroupsListCall struct {
27482 s *Service
27483 profileId int64
27484 urlParams_ gensupport.URLParams
27485 ifNoneMatch_ string
27486 ctx_ context.Context
27487 header_ http.Header
27488 }
27489
27490
27491
27492
27493
27494 func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
27495 c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27496 c.profileId = profileId
27497 return c
27498 }
27499
27500
27501
27502 func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
27503 var advertiserIds_ []string
27504 for _, v := range advertiserIds {
27505 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
27506 }
27507 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
27508 return c
27509 }
27510
27511
27512
27513 func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
27514 c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
27515 return c
27516 }
27517
27518
27519
27520 func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
27521 var ids_ []string
27522 for _, v := range ids {
27523 ids_ = append(ids_, fmt.Sprint(v))
27524 }
27525 c.urlParams_.SetMulti("ids", ids_)
27526 return c
27527 }
27528
27529
27530
27531 func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
27532 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27533 return c
27534 }
27535
27536
27537
27538 func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
27539 c.urlParams_.Set("pageToken", pageToken)
27540 return c
27541 }
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552 func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
27553 c.urlParams_.Set("searchString", searchString)
27554 return c
27555 }
27556
27557
27558
27559
27560
27561
27562
27563
27564 func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
27565 c.urlParams_.Set("sortField", sortField)
27566 return c
27567 }
27568
27569
27570
27571
27572
27573
27574
27575
27576 func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
27577 c.urlParams_.Set("sortOrder", sortOrder)
27578 return c
27579 }
27580
27581
27582
27583
27584 func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
27585 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27586 return c
27587 }
27588
27589
27590
27591
27592
27593
27594 func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
27595 c.ifNoneMatch_ = entityTag
27596 return c
27597 }
27598
27599
27600
27601
27602 func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
27603 c.ctx_ = ctx
27604 return c
27605 }
27606
27607
27608
27609 func (c *CreativeGroupsListCall) Header() http.Header {
27610 if c.header_ == nil {
27611 c.header_ = make(http.Header)
27612 }
27613 return c.header_
27614 }
27615
27616 func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
27617 reqHeaders := make(http.Header)
27618 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27619 for k, v := range c.header_ {
27620 reqHeaders[k] = v
27621 }
27622 reqHeaders.Set("User-Agent", c.s.userAgent())
27623 if c.ifNoneMatch_ != "" {
27624 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27625 }
27626 var body io.Reader = nil
27627 c.urlParams_.Set("alt", alt)
27628 c.urlParams_.Set("prettyPrint", "false")
27629 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27630 urls += "?" + c.urlParams_.Encode()
27631 req, err := http.NewRequest("GET", urls, body)
27632 if err != nil {
27633 return nil, err
27634 }
27635 req.Header = reqHeaders
27636 googleapi.Expand(req.URL, map[string]string{
27637 "profileId": strconv.FormatInt(c.profileId, 10),
27638 })
27639 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27640 }
27641
27642
27643
27644
27645
27646
27647
27648
27649 func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
27650 gensupport.SetOptions(c.urlParams_, opts...)
27651 res, err := c.doRequest("json")
27652 if res != nil && res.StatusCode == http.StatusNotModified {
27653 if res.Body != nil {
27654 res.Body.Close()
27655 }
27656 return nil, &googleapi.Error{
27657 Code: res.StatusCode,
27658 Header: res.Header,
27659 }
27660 }
27661 if err != nil {
27662 return nil, err
27663 }
27664 defer googleapi.CloseBody(res)
27665 if err := googleapi.CheckResponse(res); err != nil {
27666 return nil, err
27667 }
27668 ret := &CreativeGroupsListResponse{
27669 ServerResponse: googleapi.ServerResponse{
27670 Header: res.Header,
27671 HTTPStatusCode: res.StatusCode,
27672 },
27673 }
27674 target := &ret
27675 if err := gensupport.DecodeResponse(target, res); err != nil {
27676 return nil, err
27677 }
27678 return ret, nil
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774 }
27775
27776
27777
27778
27779 func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
27780 c.ctx_ = ctx
27781 defer c.PageToken(c.urlParams_.Get("pageToken"))
27782 for {
27783 x, err := c.Do()
27784 if err != nil {
27785 return err
27786 }
27787 if err := f(x); err != nil {
27788 return err
27789 }
27790 if x.NextPageToken == "" {
27791 return nil
27792 }
27793 c.PageToken(x.NextPageToken)
27794 }
27795 }
27796
27797
27798
27799 type CreativeGroupsPatchCall struct {
27800 s *Service
27801 profileId int64
27802 creativegroup *CreativeGroup
27803 urlParams_ gensupport.URLParams
27804 ctx_ context.Context
27805 header_ http.Header
27806 }
27807
27808
27809
27810
27811
27812
27813 func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
27814 c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27815 c.profileId = profileId
27816 c.urlParams_.Set("id", fmt.Sprint(id))
27817 c.creativegroup = creativegroup
27818 return c
27819 }
27820
27821
27822
27823
27824 func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
27825 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27826 return c
27827 }
27828
27829
27830
27831
27832 func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
27833 c.ctx_ = ctx
27834 return c
27835 }
27836
27837
27838
27839 func (c *CreativeGroupsPatchCall) Header() http.Header {
27840 if c.header_ == nil {
27841 c.header_ = make(http.Header)
27842 }
27843 return c.header_
27844 }
27845
27846 func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
27847 reqHeaders := make(http.Header)
27848 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27849 for k, v := range c.header_ {
27850 reqHeaders[k] = v
27851 }
27852 reqHeaders.Set("User-Agent", c.s.userAgent())
27853 var body io.Reader = nil
27854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
27855 if err != nil {
27856 return nil, err
27857 }
27858 reqHeaders.Set("Content-Type", "application/json")
27859 c.urlParams_.Set("alt", alt)
27860 c.urlParams_.Set("prettyPrint", "false")
27861 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
27862 urls += "?" + c.urlParams_.Encode()
27863 req, err := http.NewRequest("PATCH", urls, body)
27864 if err != nil {
27865 return nil, err
27866 }
27867 req.Header = reqHeaders
27868 googleapi.Expand(req.URL, map[string]string{
27869 "profileId": strconv.FormatInt(c.profileId, 10),
27870 })
27871 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27872 }
27873
27874
27875
27876
27877
27878
27879
27880
27881 func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
27882 gensupport.SetOptions(c.urlParams_, opts...)
27883 res, err := c.doRequest("json")
27884 if res != nil && res.StatusCode == http.StatusNotModified {
27885 if res.Body != nil {
27886 res.Body.Close()
27887 }
27888 return nil, &googleapi.Error{
27889 Code: res.StatusCode,
27890 Header: res.Header,
27891 }
27892 }
27893 if err != nil {
27894 return nil, err
27895 }
27896 defer googleapi.CloseBody(res)
27897 if err := googleapi.CheckResponse(res); err != nil {
27898 return nil, err
27899 }
27900 ret := &CreativeGroup{
27901 ServerResponse: googleapi.ServerResponse{
27902 Header: res.Header,
27903 HTTPStatusCode: res.StatusCode,
27904 },
27905 }
27906 target := &ret
27907 if err := gensupport.DecodeResponse(target, res); err != nil {
27908 return nil, err
27909 }
27910 return ret, nil
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948 }
27949
27950
27951
27952 type CreativeGroupsUpdateCall struct {
27953 s *Service
27954 profileId int64
27955 creativegroup *CreativeGroup
27956 urlParams_ gensupport.URLParams
27957 ctx_ context.Context
27958 header_ http.Header
27959 }
27960
27961
27962
27963
27964 func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
27965 c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27966 c.profileId = profileId
27967 c.creativegroup = creativegroup
27968 return c
27969 }
27970
27971
27972
27973
27974 func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
27975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27976 return c
27977 }
27978
27979
27980
27981
27982 func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
27983 c.ctx_ = ctx
27984 return c
27985 }
27986
27987
27988
27989 func (c *CreativeGroupsUpdateCall) Header() http.Header {
27990 if c.header_ == nil {
27991 c.header_ = make(http.Header)
27992 }
27993 return c.header_
27994 }
27995
27996 func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
27997 reqHeaders := make(http.Header)
27998 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
27999 for k, v := range c.header_ {
28000 reqHeaders[k] = v
28001 }
28002 reqHeaders.Set("User-Agent", c.s.userAgent())
28003 var body io.Reader = nil
28004 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
28005 if err != nil {
28006 return nil, err
28007 }
28008 reqHeaders.Set("Content-Type", "application/json")
28009 c.urlParams_.Set("alt", alt)
28010 c.urlParams_.Set("prettyPrint", "false")
28011 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creativeGroups")
28012 urls += "?" + c.urlParams_.Encode()
28013 req, err := http.NewRequest("PUT", urls, body)
28014 if err != nil {
28015 return nil, err
28016 }
28017 req.Header = reqHeaders
28018 googleapi.Expand(req.URL, map[string]string{
28019 "profileId": strconv.FormatInt(c.profileId, 10),
28020 })
28021 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28022 }
28023
28024
28025
28026
28027
28028
28029
28030
28031 func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
28032 gensupport.SetOptions(c.urlParams_, opts...)
28033 res, err := c.doRequest("json")
28034 if res != nil && res.StatusCode == http.StatusNotModified {
28035 if res.Body != nil {
28036 res.Body.Close()
28037 }
28038 return nil, &googleapi.Error{
28039 Code: res.StatusCode,
28040 Header: res.Header,
28041 }
28042 }
28043 if err != nil {
28044 return nil, err
28045 }
28046 defer googleapi.CloseBody(res)
28047 if err := googleapi.CheckResponse(res); err != nil {
28048 return nil, err
28049 }
28050 ret := &CreativeGroup{
28051 ServerResponse: googleapi.ServerResponse{
28052 Header: res.Header,
28053 HTTPStatusCode: res.StatusCode,
28054 },
28055 }
28056 target := &ret
28057 if err := gensupport.DecodeResponse(target, res); err != nil {
28058 return nil, err
28059 }
28060 return ret, nil
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090 }
28091
28092
28093
28094 type CreativesGetCall struct {
28095 s *Service
28096 profileId int64
28097 id int64
28098 urlParams_ gensupport.URLParams
28099 ifNoneMatch_ string
28100 ctx_ context.Context
28101 header_ http.Header
28102 }
28103
28104
28105
28106
28107
28108 func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
28109 c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28110 c.profileId = profileId
28111 c.id = id
28112 return c
28113 }
28114
28115
28116
28117
28118 func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
28119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28120 return c
28121 }
28122
28123
28124
28125
28126
28127
28128 func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
28129 c.ifNoneMatch_ = entityTag
28130 return c
28131 }
28132
28133
28134
28135
28136 func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
28137 c.ctx_ = ctx
28138 return c
28139 }
28140
28141
28142
28143 func (c *CreativesGetCall) Header() http.Header {
28144 if c.header_ == nil {
28145 c.header_ = make(http.Header)
28146 }
28147 return c.header_
28148 }
28149
28150 func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
28151 reqHeaders := make(http.Header)
28152 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
28153 for k, v := range c.header_ {
28154 reqHeaders[k] = v
28155 }
28156 reqHeaders.Set("User-Agent", c.s.userAgent())
28157 if c.ifNoneMatch_ != "" {
28158 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28159 }
28160 var body io.Reader = nil
28161 c.urlParams_.Set("alt", alt)
28162 c.urlParams_.Set("prettyPrint", "false")
28163 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives/{id}")
28164 urls += "?" + c.urlParams_.Encode()
28165 req, err := http.NewRequest("GET", urls, body)
28166 if err != nil {
28167 return nil, err
28168 }
28169 req.Header = reqHeaders
28170 googleapi.Expand(req.URL, map[string]string{
28171 "profileId": strconv.FormatInt(c.profileId, 10),
28172 "id": strconv.FormatInt(c.id, 10),
28173 })
28174 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28175 }
28176
28177
28178
28179
28180
28181
28182
28183
28184 func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28185 gensupport.SetOptions(c.urlParams_, opts...)
28186 res, err := c.doRequest("json")
28187 if res != nil && res.StatusCode == http.StatusNotModified {
28188 if res.Body != nil {
28189 res.Body.Close()
28190 }
28191 return nil, &googleapi.Error{
28192 Code: res.StatusCode,
28193 Header: res.Header,
28194 }
28195 }
28196 if err != nil {
28197 return nil, err
28198 }
28199 defer googleapi.CloseBody(res)
28200 if err := googleapi.CheckResponse(res); err != nil {
28201 return nil, err
28202 }
28203 ret := &Creative{
28204 ServerResponse: googleapi.ServerResponse{
28205 Header: res.Header,
28206 HTTPStatusCode: res.StatusCode,
28207 },
28208 }
28209 target := &ret
28210 if err := gensupport.DecodeResponse(target, res); err != nil {
28211 return nil, err
28212 }
28213 return ret, nil
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248 }
28249
28250
28251
28252 type CreativesInsertCall struct {
28253 s *Service
28254 profileId int64
28255 creative *Creative
28256 urlParams_ gensupport.URLParams
28257 ctx_ context.Context
28258 header_ http.Header
28259 }
28260
28261
28262
28263
28264 func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
28265 c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28266 c.profileId = profileId
28267 c.creative = creative
28268 return c
28269 }
28270
28271
28272
28273
28274 func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
28275 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28276 return c
28277 }
28278
28279
28280
28281
28282 func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
28283 c.ctx_ = ctx
28284 return c
28285 }
28286
28287
28288
28289 func (c *CreativesInsertCall) Header() http.Header {
28290 if c.header_ == nil {
28291 c.header_ = make(http.Header)
28292 }
28293 return c.header_
28294 }
28295
28296 func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
28297 reqHeaders := make(http.Header)
28298 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
28299 for k, v := range c.header_ {
28300 reqHeaders[k] = v
28301 }
28302 reqHeaders.Set("User-Agent", c.s.userAgent())
28303 var body io.Reader = nil
28304 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28305 if err != nil {
28306 return nil, err
28307 }
28308 reqHeaders.Set("Content-Type", "application/json")
28309 c.urlParams_.Set("alt", alt)
28310 c.urlParams_.Set("prettyPrint", "false")
28311 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28312 urls += "?" + c.urlParams_.Encode()
28313 req, err := http.NewRequest("POST", urls, body)
28314 if err != nil {
28315 return nil, err
28316 }
28317 req.Header = reqHeaders
28318 googleapi.Expand(req.URL, map[string]string{
28319 "profileId": strconv.FormatInt(c.profileId, 10),
28320 })
28321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28322 }
28323
28324
28325
28326
28327
28328
28329
28330
28331 func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28332 gensupport.SetOptions(c.urlParams_, opts...)
28333 res, err := c.doRequest("json")
28334 if res != nil && res.StatusCode == http.StatusNotModified {
28335 if res.Body != nil {
28336 res.Body.Close()
28337 }
28338 return nil, &googleapi.Error{
28339 Code: res.StatusCode,
28340 Header: res.Header,
28341 }
28342 }
28343 if err != nil {
28344 return nil, err
28345 }
28346 defer googleapi.CloseBody(res)
28347 if err := googleapi.CheckResponse(res); err != nil {
28348 return nil, err
28349 }
28350 ret := &Creative{
28351 ServerResponse: googleapi.ServerResponse{
28352 Header: res.Header,
28353 HTTPStatusCode: res.StatusCode,
28354 },
28355 }
28356 target := &ret
28357 if err := gensupport.DecodeResponse(target, res); err != nil {
28358 return nil, err
28359 }
28360 return ret, nil
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390 }
28391
28392
28393
28394 type CreativesListCall struct {
28395 s *Service
28396 profileId int64
28397 urlParams_ gensupport.URLParams
28398 ifNoneMatch_ string
28399 ctx_ context.Context
28400 header_ http.Header
28401 }
28402
28403
28404
28405
28406
28407 func (r *CreativesService) List(profileId int64) *CreativesListCall {
28408 c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28409 c.profileId = profileId
28410 return c
28411 }
28412
28413
28414
28415 func (c *CreativesListCall) Active(active bool) *CreativesListCall {
28416 c.urlParams_.Set("active", fmt.Sprint(active))
28417 return c
28418 }
28419
28420
28421
28422 func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
28423 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
28424 return c
28425 }
28426
28427
28428
28429 func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
28430 c.urlParams_.Set("archived", fmt.Sprint(archived))
28431 return c
28432 }
28433
28434
28435
28436 func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
28437 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
28438 return c
28439 }
28440
28441
28442
28443
28444 func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
28445 var companionCreativeIds_ []string
28446 for _, v := range companionCreativeIds {
28447 companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
28448 }
28449 c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
28450 return c
28451 }
28452
28453
28454
28455 func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
28456 var creativeFieldIds_ []string
28457 for _, v := range creativeFieldIds {
28458 creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
28459 }
28460 c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
28461 return c
28462 }
28463
28464
28465
28466 func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
28467 var ids_ []string
28468 for _, v := range ids {
28469 ids_ = append(ids_, fmt.Sprint(v))
28470 }
28471 c.urlParams_.SetMulti("ids", ids_)
28472 return c
28473 }
28474
28475
28476
28477 func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
28478 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28479 return c
28480 }
28481
28482
28483
28484 func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
28485 c.urlParams_.Set("pageToken", pageToken)
28486 return c
28487 }
28488
28489
28490
28491 func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
28492 var renderingIds_ []string
28493 for _, v := range renderingIds {
28494 renderingIds_ = append(renderingIds_, fmt.Sprint(v))
28495 }
28496 c.urlParams_.SetMulti("renderingIds", renderingIds_)
28497 return c
28498 }
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508 func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
28509 c.urlParams_.Set("searchString", searchString)
28510 return c
28511 }
28512
28513
28514
28515 func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
28516 var sizeIds_ []string
28517 for _, v := range sizeIds {
28518 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
28519 }
28520 c.urlParams_.SetMulti("sizeIds", sizeIds_)
28521 return c
28522 }
28523
28524
28525
28526
28527
28528
28529
28530
28531 func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
28532 c.urlParams_.Set("sortField", sortField)
28533 return c
28534 }
28535
28536
28537
28538
28539
28540
28541
28542
28543 func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
28544 c.urlParams_.Set("sortOrder", sortOrder)
28545 return c
28546 }
28547
28548
28549
28550 func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
28551 c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
28552 return c
28553 }
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585 func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
28586 c.urlParams_.SetMulti("types", append([]string{}, types...))
28587 return c
28588 }
28589
28590
28591
28592
28593 func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
28594 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28595 return c
28596 }
28597
28598
28599
28600
28601
28602
28603 func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
28604 c.ifNoneMatch_ = entityTag
28605 return c
28606 }
28607
28608
28609
28610
28611 func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
28612 c.ctx_ = ctx
28613 return c
28614 }
28615
28616
28617
28618 func (c *CreativesListCall) Header() http.Header {
28619 if c.header_ == nil {
28620 c.header_ = make(http.Header)
28621 }
28622 return c.header_
28623 }
28624
28625 func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
28626 reqHeaders := make(http.Header)
28627 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
28628 for k, v := range c.header_ {
28629 reqHeaders[k] = v
28630 }
28631 reqHeaders.Set("User-Agent", c.s.userAgent())
28632 if c.ifNoneMatch_ != "" {
28633 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28634 }
28635 var body io.Reader = nil
28636 c.urlParams_.Set("alt", alt)
28637 c.urlParams_.Set("prettyPrint", "false")
28638 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28639 urls += "?" + c.urlParams_.Encode()
28640 req, err := http.NewRequest("GET", urls, body)
28641 if err != nil {
28642 return nil, err
28643 }
28644 req.Header = reqHeaders
28645 googleapi.Expand(req.URL, map[string]string{
28646 "profileId": strconv.FormatInt(c.profileId, 10),
28647 })
28648 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28649 }
28650
28651
28652
28653
28654
28655
28656
28657
28658 func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
28659 gensupport.SetOptions(c.urlParams_, opts...)
28660 res, err := c.doRequest("json")
28661 if res != nil && res.StatusCode == http.StatusNotModified {
28662 if res.Body != nil {
28663 res.Body.Close()
28664 }
28665 return nil, &googleapi.Error{
28666 Code: res.StatusCode,
28667 Header: res.Header,
28668 }
28669 }
28670 if err != nil {
28671 return nil, err
28672 }
28673 defer googleapi.CloseBody(res)
28674 if err := googleapi.CheckResponse(res); err != nil {
28675 return nil, err
28676 }
28677 ret := &CreativesListResponse{
28678 ServerResponse: googleapi.ServerResponse{
28679 Header: res.Header,
28680 HTTPStatusCode: res.StatusCode,
28681 },
28682 }
28683 target := &ret
28684 if err := gensupport.DecodeResponse(target, res); err != nil {
28685 return nil, err
28686 }
28687 return ret, nil
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884 }
28885
28886
28887
28888
28889 func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
28890 c.ctx_ = ctx
28891 defer c.PageToken(c.urlParams_.Get("pageToken"))
28892 for {
28893 x, err := c.Do()
28894 if err != nil {
28895 return err
28896 }
28897 if err := f(x); err != nil {
28898 return err
28899 }
28900 if x.NextPageToken == "" {
28901 return nil
28902 }
28903 c.PageToken(x.NextPageToken)
28904 }
28905 }
28906
28907
28908
28909 type CreativesPatchCall struct {
28910 s *Service
28911 profileId int64
28912 creative *Creative
28913 urlParams_ gensupport.URLParams
28914 ctx_ context.Context
28915 header_ http.Header
28916 }
28917
28918
28919
28920
28921
28922
28923 func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
28924 c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28925 c.profileId = profileId
28926 c.urlParams_.Set("id", fmt.Sprint(id))
28927 c.creative = creative
28928 return c
28929 }
28930
28931
28932
28933
28934 func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
28935 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28936 return c
28937 }
28938
28939
28940
28941
28942 func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
28943 c.ctx_ = ctx
28944 return c
28945 }
28946
28947
28948
28949 func (c *CreativesPatchCall) Header() http.Header {
28950 if c.header_ == nil {
28951 c.header_ = make(http.Header)
28952 }
28953 return c.header_
28954 }
28955
28956 func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
28957 reqHeaders := make(http.Header)
28958 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
28959 for k, v := range c.header_ {
28960 reqHeaders[k] = v
28961 }
28962 reqHeaders.Set("User-Agent", c.s.userAgent())
28963 var body io.Reader = nil
28964 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
28965 if err != nil {
28966 return nil, err
28967 }
28968 reqHeaders.Set("Content-Type", "application/json")
28969 c.urlParams_.Set("alt", alt)
28970 c.urlParams_.Set("prettyPrint", "false")
28971 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
28972 urls += "?" + c.urlParams_.Encode()
28973 req, err := http.NewRequest("PATCH", urls, body)
28974 if err != nil {
28975 return nil, err
28976 }
28977 req.Header = reqHeaders
28978 googleapi.Expand(req.URL, map[string]string{
28979 "profileId": strconv.FormatInt(c.profileId, 10),
28980 })
28981 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28982 }
28983
28984
28985
28986
28987
28988
28989
28990
28991 func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
28992 gensupport.SetOptions(c.urlParams_, opts...)
28993 res, err := c.doRequest("json")
28994 if res != nil && res.StatusCode == http.StatusNotModified {
28995 if res.Body != nil {
28996 res.Body.Close()
28997 }
28998 return nil, &googleapi.Error{
28999 Code: res.StatusCode,
29000 Header: res.Header,
29001 }
29002 }
29003 if err != nil {
29004 return nil, err
29005 }
29006 defer googleapi.CloseBody(res)
29007 if err := googleapi.CheckResponse(res); err != nil {
29008 return nil, err
29009 }
29010 ret := &Creative{
29011 ServerResponse: googleapi.ServerResponse{
29012 Header: res.Header,
29013 HTTPStatusCode: res.StatusCode,
29014 },
29015 }
29016 target := &ret
29017 if err := gensupport.DecodeResponse(target, res); err != nil {
29018 return nil, err
29019 }
29020 return ret, nil
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058 }
29059
29060
29061
29062 type CreativesUpdateCall struct {
29063 s *Service
29064 profileId int64
29065 creative *Creative
29066 urlParams_ gensupport.URLParams
29067 ctx_ context.Context
29068 header_ http.Header
29069 }
29070
29071
29072
29073
29074 func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
29075 c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29076 c.profileId = profileId
29077 c.creative = creative
29078 return c
29079 }
29080
29081
29082
29083
29084 func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
29085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29086 return c
29087 }
29088
29089
29090
29091
29092 func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
29093 c.ctx_ = ctx
29094 return c
29095 }
29096
29097
29098
29099 func (c *CreativesUpdateCall) Header() http.Header {
29100 if c.header_ == nil {
29101 c.header_ = make(http.Header)
29102 }
29103 return c.header_
29104 }
29105
29106 func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
29107 reqHeaders := make(http.Header)
29108 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
29109 for k, v := range c.header_ {
29110 reqHeaders[k] = v
29111 }
29112 reqHeaders.Set("User-Agent", c.s.userAgent())
29113 var body io.Reader = nil
29114 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
29115 if err != nil {
29116 return nil, err
29117 }
29118 reqHeaders.Set("Content-Type", "application/json")
29119 c.urlParams_.Set("alt", alt)
29120 c.urlParams_.Set("prettyPrint", "false")
29121 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/creatives")
29122 urls += "?" + c.urlParams_.Encode()
29123 req, err := http.NewRequest("PUT", urls, body)
29124 if err != nil {
29125 return nil, err
29126 }
29127 req.Header = reqHeaders
29128 googleapi.Expand(req.URL, map[string]string{
29129 "profileId": strconv.FormatInt(c.profileId, 10),
29130 })
29131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29132 }
29133
29134
29135
29136
29137
29138
29139
29140
29141 func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
29142 gensupport.SetOptions(c.urlParams_, opts...)
29143 res, err := c.doRequest("json")
29144 if res != nil && res.StatusCode == http.StatusNotModified {
29145 if res.Body != nil {
29146 res.Body.Close()
29147 }
29148 return nil, &googleapi.Error{
29149 Code: res.StatusCode,
29150 Header: res.Header,
29151 }
29152 }
29153 if err != nil {
29154 return nil, err
29155 }
29156 defer googleapi.CloseBody(res)
29157 if err := googleapi.CheckResponse(res); err != nil {
29158 return nil, err
29159 }
29160 ret := &Creative{
29161 ServerResponse: googleapi.ServerResponse{
29162 Header: res.Header,
29163 HTTPStatusCode: res.StatusCode,
29164 },
29165 }
29166 target := &ret
29167 if err := gensupport.DecodeResponse(target, res); err != nil {
29168 return nil, err
29169 }
29170 return ret, nil
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200 }
29201
29202
29203
29204 type DimensionValuesQueryCall struct {
29205 s *Service
29206 profileId int64
29207 dimensionvaluerequest *DimensionValueRequest
29208 urlParams_ gensupport.URLParams
29209 ctx_ context.Context
29210 header_ http.Header
29211 }
29212
29213
29214
29215
29216
29217 func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
29218 c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29219 c.profileId = profileId
29220 c.dimensionvaluerequest = dimensionvaluerequest
29221 return c
29222 }
29223
29224
29225
29226 func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
29227 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29228 return c
29229 }
29230
29231
29232
29233 func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
29234 c.urlParams_.Set("pageToken", pageToken)
29235 return c
29236 }
29237
29238
29239
29240
29241 func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
29242 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29243 return c
29244 }
29245
29246
29247
29248
29249 func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
29250 c.ctx_ = ctx
29251 return c
29252 }
29253
29254
29255
29256 func (c *DimensionValuesQueryCall) Header() http.Header {
29257 if c.header_ == nil {
29258 c.header_ = make(http.Header)
29259 }
29260 return c.header_
29261 }
29262
29263 func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
29264 reqHeaders := make(http.Header)
29265 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
29266 for k, v := range c.header_ {
29267 reqHeaders[k] = v
29268 }
29269 reqHeaders.Set("User-Agent", c.s.userAgent())
29270 var body io.Reader = nil
29271 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
29272 if err != nil {
29273 return nil, err
29274 }
29275 reqHeaders.Set("Content-Type", "application/json")
29276 c.urlParams_.Set("alt", alt)
29277 c.urlParams_.Set("prettyPrint", "false")
29278 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
29279 urls += "?" + c.urlParams_.Encode()
29280 req, err := http.NewRequest("POST", urls, body)
29281 if err != nil {
29282 return nil, err
29283 }
29284 req.Header = reqHeaders
29285 googleapi.Expand(req.URL, map[string]string{
29286 "profileId": strconv.FormatInt(c.profileId, 10),
29287 })
29288 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29289 }
29290
29291
29292
29293
29294
29295
29296
29297
29298 func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
29299 gensupport.SetOptions(c.urlParams_, opts...)
29300 res, err := c.doRequest("json")
29301 if res != nil && res.StatusCode == http.StatusNotModified {
29302 if res.Body != nil {
29303 res.Body.Close()
29304 }
29305 return nil, &googleapi.Error{
29306 Code: res.StatusCode,
29307 Header: res.Header,
29308 }
29309 }
29310 if err != nil {
29311 return nil, err
29312 }
29313 defer googleapi.CloseBody(res)
29314 if err := googleapi.CheckResponse(res); err != nil {
29315 return nil, err
29316 }
29317 ret := &DimensionValueList{
29318 ServerResponse: googleapi.ServerResponse{
29319 Header: res.Header,
29320 HTTPStatusCode: res.StatusCode,
29321 },
29322 }
29323 target := &ret
29324 if err := gensupport.DecodeResponse(target, res); err != nil {
29325 return nil, err
29326 }
29327 return ret, nil
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371 }
29372
29373
29374
29375
29376 func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
29377 c.ctx_ = ctx
29378 defer c.PageToken(c.urlParams_.Get("pageToken"))
29379 for {
29380 x, err := c.Do()
29381 if err != nil {
29382 return err
29383 }
29384 if err := f(x); err != nil {
29385 return err
29386 }
29387 if x.NextPageToken == "" {
29388 return nil
29389 }
29390 c.PageToken(x.NextPageToken)
29391 }
29392 }
29393
29394
29395
29396 type DirectorySitesGetCall struct {
29397 s *Service
29398 profileId int64
29399 id int64
29400 urlParams_ gensupport.URLParams
29401 ifNoneMatch_ string
29402 ctx_ context.Context
29403 header_ http.Header
29404 }
29405
29406
29407
29408
29409
29410 func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
29411 c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29412 c.profileId = profileId
29413 c.id = id
29414 return c
29415 }
29416
29417
29418
29419
29420 func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
29421 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29422 return c
29423 }
29424
29425
29426
29427
29428
29429
29430 func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
29431 c.ifNoneMatch_ = entityTag
29432 return c
29433 }
29434
29435
29436
29437
29438 func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
29439 c.ctx_ = ctx
29440 return c
29441 }
29442
29443
29444
29445 func (c *DirectorySitesGetCall) Header() http.Header {
29446 if c.header_ == nil {
29447 c.header_ = make(http.Header)
29448 }
29449 return c.header_
29450 }
29451
29452 func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
29453 reqHeaders := make(http.Header)
29454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
29455 for k, v := range c.header_ {
29456 reqHeaders[k] = v
29457 }
29458 reqHeaders.Set("User-Agent", c.s.userAgent())
29459 if c.ifNoneMatch_ != "" {
29460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29461 }
29462 var body io.Reader = nil
29463 c.urlParams_.Set("alt", alt)
29464 c.urlParams_.Set("prettyPrint", "false")
29465 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites/{id}")
29466 urls += "?" + c.urlParams_.Encode()
29467 req, err := http.NewRequest("GET", urls, body)
29468 if err != nil {
29469 return nil, err
29470 }
29471 req.Header = reqHeaders
29472 googleapi.Expand(req.URL, map[string]string{
29473 "profileId": strconv.FormatInt(c.profileId, 10),
29474 "id": strconv.FormatInt(c.id, 10),
29475 })
29476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29477 }
29478
29479
29480
29481
29482
29483
29484
29485
29486 func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29487 gensupport.SetOptions(c.urlParams_, opts...)
29488 res, err := c.doRequest("json")
29489 if res != nil && res.StatusCode == http.StatusNotModified {
29490 if res.Body != nil {
29491 res.Body.Close()
29492 }
29493 return nil, &googleapi.Error{
29494 Code: res.StatusCode,
29495 Header: res.Header,
29496 }
29497 }
29498 if err != nil {
29499 return nil, err
29500 }
29501 defer googleapi.CloseBody(res)
29502 if err := googleapi.CheckResponse(res); err != nil {
29503 return nil, err
29504 }
29505 ret := &DirectorySite{
29506 ServerResponse: googleapi.ServerResponse{
29507 Header: res.Header,
29508 HTTPStatusCode: res.StatusCode,
29509 },
29510 }
29511 target := &ret
29512 if err := gensupport.DecodeResponse(target, res); err != nil {
29513 return nil, err
29514 }
29515 return ret, nil
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550 }
29551
29552
29553
29554 type DirectorySitesInsertCall struct {
29555 s *Service
29556 profileId int64
29557 directorysite *DirectorySite
29558 urlParams_ gensupport.URLParams
29559 ctx_ context.Context
29560 header_ http.Header
29561 }
29562
29563
29564
29565
29566 func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
29567 c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29568 c.profileId = profileId
29569 c.directorysite = directorysite
29570 return c
29571 }
29572
29573
29574
29575
29576 func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
29577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29578 return c
29579 }
29580
29581
29582
29583
29584 func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
29585 c.ctx_ = ctx
29586 return c
29587 }
29588
29589
29590
29591 func (c *DirectorySitesInsertCall) Header() http.Header {
29592 if c.header_ == nil {
29593 c.header_ = make(http.Header)
29594 }
29595 return c.header_
29596 }
29597
29598 func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
29599 reqHeaders := make(http.Header)
29600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
29601 for k, v := range c.header_ {
29602 reqHeaders[k] = v
29603 }
29604 reqHeaders.Set("User-Agent", c.s.userAgent())
29605 var body io.Reader = nil
29606 body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
29607 if err != nil {
29608 return nil, err
29609 }
29610 reqHeaders.Set("Content-Type", "application/json")
29611 c.urlParams_.Set("alt", alt)
29612 c.urlParams_.Set("prettyPrint", "false")
29613 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29614 urls += "?" + c.urlParams_.Encode()
29615 req, err := http.NewRequest("POST", urls, body)
29616 if err != nil {
29617 return nil, err
29618 }
29619 req.Header = reqHeaders
29620 googleapi.Expand(req.URL, map[string]string{
29621 "profileId": strconv.FormatInt(c.profileId, 10),
29622 })
29623 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29624 }
29625
29626
29627
29628
29629
29630
29631
29632
29633 func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
29634 gensupport.SetOptions(c.urlParams_, opts...)
29635 res, err := c.doRequest("json")
29636 if res != nil && res.StatusCode == http.StatusNotModified {
29637 if res.Body != nil {
29638 res.Body.Close()
29639 }
29640 return nil, &googleapi.Error{
29641 Code: res.StatusCode,
29642 Header: res.Header,
29643 }
29644 }
29645 if err != nil {
29646 return nil, err
29647 }
29648 defer googleapi.CloseBody(res)
29649 if err := googleapi.CheckResponse(res); err != nil {
29650 return nil, err
29651 }
29652 ret := &DirectorySite{
29653 ServerResponse: googleapi.ServerResponse{
29654 Header: res.Header,
29655 HTTPStatusCode: res.StatusCode,
29656 },
29657 }
29658 target := &ret
29659 if err := gensupport.DecodeResponse(target, res); err != nil {
29660 return nil, err
29661 }
29662 return ret, nil
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692 }
29693
29694
29695
29696 type DirectorySitesListCall struct {
29697 s *Service
29698 profileId int64
29699 urlParams_ gensupport.URLParams
29700 ifNoneMatch_ string
29701 ctx_ context.Context
29702 header_ http.Header
29703 }
29704
29705
29706
29707
29708
29709 func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
29710 c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29711 c.profileId = profileId
29712 return c
29713 }
29714
29715
29716
29717
29718 func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
29719 c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
29720 return c
29721 }
29722
29723
29724
29725
29726 func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
29727 c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
29728 return c
29729 }
29730
29731
29732
29733
29734 func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
29735 c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
29736 return c
29737 }
29738
29739
29740
29741
29742 func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
29743 c.urlParams_.Set("active", fmt.Sprint(active))
29744 return c
29745 }
29746
29747
29748
29749 func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
29750 c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
29751 return c
29752 }
29753
29754
29755
29756 func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
29757 var ids_ []string
29758 for _, v := range ids {
29759 ids_ = append(ids_, fmt.Sprint(v))
29760 }
29761 c.urlParams_.SetMulti("ids", ids_)
29762 return c
29763 }
29764
29765
29766
29767 func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
29768 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29769 return c
29770 }
29771
29772
29773
29774 func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
29775 c.urlParams_.Set("pageToken", pageToken)
29776 return c
29777 }
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788 func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
29789 c.urlParams_.Set("searchString", searchString)
29790 return c
29791 }
29792
29793
29794
29795
29796
29797
29798
29799
29800 func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
29801 c.urlParams_.Set("sortField", sortField)
29802 return c
29803 }
29804
29805
29806
29807
29808
29809
29810
29811
29812 func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
29813 c.urlParams_.Set("sortOrder", sortOrder)
29814 return c
29815 }
29816
29817
29818
29819
29820 func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
29821 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29822 return c
29823 }
29824
29825
29826
29827
29828
29829
29830 func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
29831 c.ifNoneMatch_ = entityTag
29832 return c
29833 }
29834
29835
29836
29837
29838 func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
29839 c.ctx_ = ctx
29840 return c
29841 }
29842
29843
29844
29845 func (c *DirectorySitesListCall) Header() http.Header {
29846 if c.header_ == nil {
29847 c.header_ = make(http.Header)
29848 }
29849 return c.header_
29850 }
29851
29852 func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
29853 reqHeaders := make(http.Header)
29854 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
29855 for k, v := range c.header_ {
29856 reqHeaders[k] = v
29857 }
29858 reqHeaders.Set("User-Agent", c.s.userAgent())
29859 if c.ifNoneMatch_ != "" {
29860 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29861 }
29862 var body io.Reader = nil
29863 c.urlParams_.Set("alt", alt)
29864 c.urlParams_.Set("prettyPrint", "false")
29865 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/directorySites")
29866 urls += "?" + c.urlParams_.Encode()
29867 req, err := http.NewRequest("GET", urls, body)
29868 if err != nil {
29869 return nil, err
29870 }
29871 req.Header = reqHeaders
29872 googleapi.Expand(req.URL, map[string]string{
29873 "profileId": strconv.FormatInt(c.profileId, 10),
29874 })
29875 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29876 }
29877
29878
29879
29880
29881
29882
29883
29884
29885 func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
29886 gensupport.SetOptions(c.urlParams_, opts...)
29887 res, err := c.doRequest("json")
29888 if res != nil && res.StatusCode == http.StatusNotModified {
29889 if res.Body != nil {
29890 res.Body.Close()
29891 }
29892 return nil, &googleapi.Error{
29893 Code: res.StatusCode,
29894 Header: res.Header,
29895 }
29896 }
29897 if err != nil {
29898 return nil, err
29899 }
29900 defer googleapi.CloseBody(res)
29901 if err := googleapi.CheckResponse(res); err != nil {
29902 return nil, err
29903 }
29904 ret := &DirectorySitesListResponse{
29905 ServerResponse: googleapi.ServerResponse{
29906 Header: res.Header,
29907 HTTPStatusCode: res.StatusCode,
29908 },
29909 }
29910 target := &ret
29911 if err := gensupport.DecodeResponse(target, res); err != nil {
29912 return nil, err
29913 }
29914 return ret, nil
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020 }
30021
30022
30023
30024
30025 func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
30026 c.ctx_ = ctx
30027 defer c.PageToken(c.urlParams_.Get("pageToken"))
30028 for {
30029 x, err := c.Do()
30030 if err != nil {
30031 return err
30032 }
30033 if err := f(x); err != nil {
30034 return err
30035 }
30036 if x.NextPageToken == "" {
30037 return nil
30038 }
30039 c.PageToken(x.NextPageToken)
30040 }
30041 }
30042
30043
30044
30045 type DynamicTargetingKeysDeleteCall struct {
30046 s *Service
30047 profileId int64
30048 objectId int64
30049 urlParams_ gensupport.URLParams
30050 ctx_ context.Context
30051 header_ http.Header
30052 }
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064 func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
30065 c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30066 c.profileId = profileId
30067 c.objectId = objectId
30068 c.urlParams_.Set("name", name)
30069 c.urlParams_.Set("objectType", objectType)
30070 return c
30071 }
30072
30073
30074
30075
30076 func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
30077 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30078 return c
30079 }
30080
30081
30082
30083
30084 func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
30085 c.ctx_ = ctx
30086 return c
30087 }
30088
30089
30090
30091 func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
30092 if c.header_ == nil {
30093 c.header_ = make(http.Header)
30094 }
30095 return c.header_
30096 }
30097
30098 func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
30099 reqHeaders := make(http.Header)
30100 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30101 for k, v := range c.header_ {
30102 reqHeaders[k] = v
30103 }
30104 reqHeaders.Set("User-Agent", c.s.userAgent())
30105 var body io.Reader = nil
30106 c.urlParams_.Set("alt", alt)
30107 c.urlParams_.Set("prettyPrint", "false")
30108 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys/{objectId}")
30109 urls += "?" + c.urlParams_.Encode()
30110 req, err := http.NewRequest("DELETE", urls, body)
30111 if err != nil {
30112 return nil, err
30113 }
30114 req.Header = reqHeaders
30115 googleapi.Expand(req.URL, map[string]string{
30116 "profileId": strconv.FormatInt(c.profileId, 10),
30117 "objectId": strconv.FormatInt(c.objectId, 10),
30118 })
30119 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30120 }
30121
30122
30123 func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
30124 gensupport.SetOptions(c.urlParams_, opts...)
30125 res, err := c.doRequest("json")
30126 if err != nil {
30127 return err
30128 }
30129 defer googleapi.CloseBody(res)
30130 if err := googleapi.CheckResponse(res); err != nil {
30131 return err
30132 }
30133 return nil
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191 }
30192
30193
30194
30195 type DynamicTargetingKeysInsertCall struct {
30196 s *Service
30197 profileId int64
30198 dynamictargetingkey *DynamicTargetingKey
30199 urlParams_ gensupport.URLParams
30200 ctx_ context.Context
30201 header_ http.Header
30202 }
30203
30204
30205
30206
30207
30208
30209
30210
30211 func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
30212 c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30213 c.profileId = profileId
30214 c.dynamictargetingkey = dynamictargetingkey
30215 return c
30216 }
30217
30218
30219
30220
30221 func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
30222 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30223 return c
30224 }
30225
30226
30227
30228
30229 func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
30230 c.ctx_ = ctx
30231 return c
30232 }
30233
30234
30235
30236 func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
30237 if c.header_ == nil {
30238 c.header_ = make(http.Header)
30239 }
30240 return c.header_
30241 }
30242
30243 func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
30244 reqHeaders := make(http.Header)
30245 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30246 for k, v := range c.header_ {
30247 reqHeaders[k] = v
30248 }
30249 reqHeaders.Set("User-Agent", c.s.userAgent())
30250 var body io.Reader = nil
30251 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
30252 if err != nil {
30253 return nil, err
30254 }
30255 reqHeaders.Set("Content-Type", "application/json")
30256 c.urlParams_.Set("alt", alt)
30257 c.urlParams_.Set("prettyPrint", "false")
30258 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30259 urls += "?" + c.urlParams_.Encode()
30260 req, err := http.NewRequest("POST", urls, body)
30261 if err != nil {
30262 return nil, err
30263 }
30264 req.Header = reqHeaders
30265 googleapi.Expand(req.URL, map[string]string{
30266 "profileId": strconv.FormatInt(c.profileId, 10),
30267 })
30268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30269 }
30270
30271
30272
30273
30274
30275
30276
30277
30278 func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
30279 gensupport.SetOptions(c.urlParams_, opts...)
30280 res, err := c.doRequest("json")
30281 if res != nil && res.StatusCode == http.StatusNotModified {
30282 if res.Body != nil {
30283 res.Body.Close()
30284 }
30285 return nil, &googleapi.Error{
30286 Code: res.StatusCode,
30287 Header: res.Header,
30288 }
30289 }
30290 if err != nil {
30291 return nil, err
30292 }
30293 defer googleapi.CloseBody(res)
30294 if err := googleapi.CheckResponse(res); err != nil {
30295 return nil, err
30296 }
30297 ret := &DynamicTargetingKey{
30298 ServerResponse: googleapi.ServerResponse{
30299 Header: res.Header,
30300 HTTPStatusCode: res.StatusCode,
30301 },
30302 }
30303 target := &ret
30304 if err := gensupport.DecodeResponse(target, res); err != nil {
30305 return nil, err
30306 }
30307 return ret, nil
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337 }
30338
30339
30340
30341 type DynamicTargetingKeysListCall struct {
30342 s *Service
30343 profileId int64
30344 urlParams_ gensupport.URLParams
30345 ifNoneMatch_ string
30346 ctx_ context.Context
30347 header_ http.Header
30348 }
30349
30350
30351
30352
30353 func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
30354 c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30355 c.profileId = profileId
30356 return c
30357 }
30358
30359
30360
30361 func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
30362 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
30363 return c
30364 }
30365
30366
30367
30368 func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
30369 c.urlParams_.SetMulti("names", append([]string{}, names...))
30370 return c
30371 }
30372
30373
30374
30375 func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
30376 c.urlParams_.Set("objectId", fmt.Sprint(objectId))
30377 return c
30378 }
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389 func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
30390 c.urlParams_.Set("objectType", objectType)
30391 return c
30392 }
30393
30394
30395
30396
30397 func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
30398 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30399 return c
30400 }
30401
30402
30403
30404
30405
30406
30407 func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
30408 c.ifNoneMatch_ = entityTag
30409 return c
30410 }
30411
30412
30413
30414
30415 func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
30416 c.ctx_ = ctx
30417 return c
30418 }
30419
30420
30421
30422 func (c *DynamicTargetingKeysListCall) Header() http.Header {
30423 if c.header_ == nil {
30424 c.header_ = make(http.Header)
30425 }
30426 return c.header_
30427 }
30428
30429 func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
30430 reqHeaders := make(http.Header)
30431 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30432 for k, v := range c.header_ {
30433 reqHeaders[k] = v
30434 }
30435 reqHeaders.Set("User-Agent", c.s.userAgent())
30436 if c.ifNoneMatch_ != "" {
30437 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30438 }
30439 var body io.Reader = nil
30440 c.urlParams_.Set("alt", alt)
30441 c.urlParams_.Set("prettyPrint", "false")
30442 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dynamicTargetingKeys")
30443 urls += "?" + c.urlParams_.Encode()
30444 req, err := http.NewRequest("GET", urls, body)
30445 if err != nil {
30446 return nil, err
30447 }
30448 req.Header = reqHeaders
30449 googleapi.Expand(req.URL, map[string]string{
30450 "profileId": strconv.FormatInt(c.profileId, 10),
30451 })
30452 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30453 }
30454
30455
30456
30457
30458
30459
30460
30461
30462 func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
30463 gensupport.SetOptions(c.urlParams_, opts...)
30464 res, err := c.doRequest("json")
30465 if res != nil && res.StatusCode == http.StatusNotModified {
30466 if res.Body != nil {
30467 res.Body.Close()
30468 }
30469 return nil, &googleapi.Error{
30470 Code: res.StatusCode,
30471 Header: res.Header,
30472 }
30473 }
30474 if err != nil {
30475 return nil, err
30476 }
30477 defer googleapi.CloseBody(res)
30478 if err := googleapi.CheckResponse(res); err != nil {
30479 return nil, err
30480 }
30481 ret := &DynamicTargetingKeysListResponse{
30482 ServerResponse: googleapi.ServerResponse{
30483 Header: res.Header,
30484 HTTPStatusCode: res.StatusCode,
30485 },
30486 }
30487 target := &ret
30488 if err := gensupport.DecodeResponse(target, res); err != nil {
30489 return nil, err
30490 }
30491 return ret, nil
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553 }
30554
30555
30556
30557 type EventTagsDeleteCall struct {
30558 s *Service
30559 profileId int64
30560 id int64
30561 urlParams_ gensupport.URLParams
30562 ctx_ context.Context
30563 header_ http.Header
30564 }
30565
30566
30567
30568
30569
30570 func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
30571 c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30572 c.profileId = profileId
30573 c.id = id
30574 return c
30575 }
30576
30577
30578
30579
30580 func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
30581 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30582 return c
30583 }
30584
30585
30586
30587
30588 func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
30589 c.ctx_ = ctx
30590 return c
30591 }
30592
30593
30594
30595 func (c *EventTagsDeleteCall) Header() http.Header {
30596 if c.header_ == nil {
30597 c.header_ = make(http.Header)
30598 }
30599 return c.header_
30600 }
30601
30602 func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
30603 reqHeaders := make(http.Header)
30604 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30605 for k, v := range c.header_ {
30606 reqHeaders[k] = v
30607 }
30608 reqHeaders.Set("User-Agent", c.s.userAgent())
30609 var body io.Reader = nil
30610 c.urlParams_.Set("alt", alt)
30611 c.urlParams_.Set("prettyPrint", "false")
30612 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30613 urls += "?" + c.urlParams_.Encode()
30614 req, err := http.NewRequest("DELETE", urls, body)
30615 if err != nil {
30616 return nil, err
30617 }
30618 req.Header = reqHeaders
30619 googleapi.Expand(req.URL, map[string]string{
30620 "profileId": strconv.FormatInt(c.profileId, 10),
30621 "id": strconv.FormatInt(c.id, 10),
30622 })
30623 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30624 }
30625
30626
30627 func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
30628 gensupport.SetOptions(c.urlParams_, opts...)
30629 res, err := c.doRequest("json")
30630 if err != nil {
30631 return err
30632 }
30633 defer googleapi.CloseBody(res)
30634 if err := googleapi.CheckResponse(res); err != nil {
30635 return err
30636 }
30637 return nil
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669 }
30670
30671
30672
30673 type EventTagsGetCall struct {
30674 s *Service
30675 profileId int64
30676 id int64
30677 urlParams_ gensupport.URLParams
30678 ifNoneMatch_ string
30679 ctx_ context.Context
30680 header_ http.Header
30681 }
30682
30683
30684
30685
30686
30687 func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
30688 c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30689 c.profileId = profileId
30690 c.id = id
30691 return c
30692 }
30693
30694
30695
30696
30697 func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
30698 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30699 return c
30700 }
30701
30702
30703
30704
30705
30706
30707 func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
30708 c.ifNoneMatch_ = entityTag
30709 return c
30710 }
30711
30712
30713
30714
30715 func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
30716 c.ctx_ = ctx
30717 return c
30718 }
30719
30720
30721
30722 func (c *EventTagsGetCall) Header() http.Header {
30723 if c.header_ == nil {
30724 c.header_ = make(http.Header)
30725 }
30726 return c.header_
30727 }
30728
30729 func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
30730 reqHeaders := make(http.Header)
30731 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30732 for k, v := range c.header_ {
30733 reqHeaders[k] = v
30734 }
30735 reqHeaders.Set("User-Agent", c.s.userAgent())
30736 if c.ifNoneMatch_ != "" {
30737 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30738 }
30739 var body io.Reader = nil
30740 c.urlParams_.Set("alt", alt)
30741 c.urlParams_.Set("prettyPrint", "false")
30742 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags/{id}")
30743 urls += "?" + c.urlParams_.Encode()
30744 req, err := http.NewRequest("GET", urls, body)
30745 if err != nil {
30746 return nil, err
30747 }
30748 req.Header = reqHeaders
30749 googleapi.Expand(req.URL, map[string]string{
30750 "profileId": strconv.FormatInt(c.profileId, 10),
30751 "id": strconv.FormatInt(c.id, 10),
30752 })
30753 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30754 }
30755
30756
30757
30758
30759
30760
30761
30762
30763 func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30764 gensupport.SetOptions(c.urlParams_, opts...)
30765 res, err := c.doRequest("json")
30766 if res != nil && res.StatusCode == http.StatusNotModified {
30767 if res.Body != nil {
30768 res.Body.Close()
30769 }
30770 return nil, &googleapi.Error{
30771 Code: res.StatusCode,
30772 Header: res.Header,
30773 }
30774 }
30775 if err != nil {
30776 return nil, err
30777 }
30778 defer googleapi.CloseBody(res)
30779 if err := googleapi.CheckResponse(res); err != nil {
30780 return nil, err
30781 }
30782 ret := &EventTag{
30783 ServerResponse: googleapi.ServerResponse{
30784 Header: res.Header,
30785 HTTPStatusCode: res.StatusCode,
30786 },
30787 }
30788 target := &ret
30789 if err := gensupport.DecodeResponse(target, res); err != nil {
30790 return nil, err
30791 }
30792 return ret, nil
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827 }
30828
30829
30830
30831 type EventTagsInsertCall struct {
30832 s *Service
30833 profileId int64
30834 eventtag *EventTag
30835 urlParams_ gensupport.URLParams
30836 ctx_ context.Context
30837 header_ http.Header
30838 }
30839
30840
30841
30842
30843 func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
30844 c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30845 c.profileId = profileId
30846 c.eventtag = eventtag
30847 return c
30848 }
30849
30850
30851
30852
30853 func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
30854 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30855 return c
30856 }
30857
30858
30859
30860
30861 func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
30862 c.ctx_ = ctx
30863 return c
30864 }
30865
30866
30867
30868 func (c *EventTagsInsertCall) Header() http.Header {
30869 if c.header_ == nil {
30870 c.header_ = make(http.Header)
30871 }
30872 return c.header_
30873 }
30874
30875 func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
30876 reqHeaders := make(http.Header)
30877 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
30878 for k, v := range c.header_ {
30879 reqHeaders[k] = v
30880 }
30881 reqHeaders.Set("User-Agent", c.s.userAgent())
30882 var body io.Reader = nil
30883 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
30884 if err != nil {
30885 return nil, err
30886 }
30887 reqHeaders.Set("Content-Type", "application/json")
30888 c.urlParams_.Set("alt", alt)
30889 c.urlParams_.Set("prettyPrint", "false")
30890 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
30891 urls += "?" + c.urlParams_.Encode()
30892 req, err := http.NewRequest("POST", urls, body)
30893 if err != nil {
30894 return nil, err
30895 }
30896 req.Header = reqHeaders
30897 googleapi.Expand(req.URL, map[string]string{
30898 "profileId": strconv.FormatInt(c.profileId, 10),
30899 })
30900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30901 }
30902
30903
30904
30905
30906
30907
30908
30909
30910 func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
30911 gensupport.SetOptions(c.urlParams_, opts...)
30912 res, err := c.doRequest("json")
30913 if res != nil && res.StatusCode == http.StatusNotModified {
30914 if res.Body != nil {
30915 res.Body.Close()
30916 }
30917 return nil, &googleapi.Error{
30918 Code: res.StatusCode,
30919 Header: res.Header,
30920 }
30921 }
30922 if err != nil {
30923 return nil, err
30924 }
30925 defer googleapi.CloseBody(res)
30926 if err := googleapi.CheckResponse(res); err != nil {
30927 return nil, err
30928 }
30929 ret := &EventTag{
30930 ServerResponse: googleapi.ServerResponse{
30931 Header: res.Header,
30932 HTTPStatusCode: res.StatusCode,
30933 },
30934 }
30935 target := &ret
30936 if err := gensupport.DecodeResponse(target, res); err != nil {
30937 return nil, err
30938 }
30939 return ret, nil
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969 }
30970
30971
30972
30973 type EventTagsListCall struct {
30974 s *Service
30975 profileId int64
30976 urlParams_ gensupport.URLParams
30977 ifNoneMatch_ string
30978 ctx_ context.Context
30979 header_ http.Header
30980 }
30981
30982
30983
30984
30985 func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
30986 c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30987 c.profileId = profileId
30988 return c
30989 }
30990
30991
30992
30993 func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
30994 c.urlParams_.Set("adId", fmt.Sprint(adId))
30995 return c
30996 }
30997
30998
30999
31000 func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
31001 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
31002 return c
31003 }
31004
31005
31006
31007 func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
31008 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
31009 return c
31010 }
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020 func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
31021 c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
31022 return c
31023 }
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033 func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
31034 c.urlParams_.Set("enabled", fmt.Sprint(enabled))
31035 return c
31036 }
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049 func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
31050 c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
31051 return c
31052 }
31053
31054
31055
31056 func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
31057 var ids_ []string
31058 for _, v := range ids {
31059 ids_ = append(ids_, fmt.Sprint(v))
31060 }
31061 c.urlParams_.SetMulti("ids", ids_)
31062 return c
31063 }
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073 func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
31074 c.urlParams_.Set("searchString", searchString)
31075 return c
31076 }
31077
31078
31079
31080
31081
31082
31083
31084
31085 func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
31086 c.urlParams_.Set("sortField", sortField)
31087 return c
31088 }
31089
31090
31091
31092
31093
31094
31095
31096
31097 func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
31098 c.urlParams_.Set("sortOrder", sortOrder)
31099 return c
31100 }
31101
31102
31103
31104
31105 func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
31106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31107 return c
31108 }
31109
31110
31111
31112
31113
31114
31115 func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
31116 c.ifNoneMatch_ = entityTag
31117 return c
31118 }
31119
31120
31121
31122
31123 func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
31124 c.ctx_ = ctx
31125 return c
31126 }
31127
31128
31129
31130 func (c *EventTagsListCall) Header() http.Header {
31131 if c.header_ == nil {
31132 c.header_ = make(http.Header)
31133 }
31134 return c.header_
31135 }
31136
31137 func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
31138 reqHeaders := make(http.Header)
31139 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
31140 for k, v := range c.header_ {
31141 reqHeaders[k] = v
31142 }
31143 reqHeaders.Set("User-Agent", c.s.userAgent())
31144 if c.ifNoneMatch_ != "" {
31145 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31146 }
31147 var body io.Reader = nil
31148 c.urlParams_.Set("alt", alt)
31149 c.urlParams_.Set("prettyPrint", "false")
31150 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31151 urls += "?" + c.urlParams_.Encode()
31152 req, err := http.NewRequest("GET", urls, body)
31153 if err != nil {
31154 return nil, err
31155 }
31156 req.Header = reqHeaders
31157 googleapi.Expand(req.URL, map[string]string{
31158 "profileId": strconv.FormatInt(c.profileId, 10),
31159 })
31160 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31161 }
31162
31163
31164
31165
31166
31167
31168
31169
31170 func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
31171 gensupport.SetOptions(c.urlParams_, opts...)
31172 res, err := c.doRequest("json")
31173 if res != nil && res.StatusCode == http.StatusNotModified {
31174 if res.Body != nil {
31175 res.Body.Close()
31176 }
31177 return nil, &googleapi.Error{
31178 Code: res.StatusCode,
31179 Header: res.Header,
31180 }
31181 }
31182 if err != nil {
31183 return nil, err
31184 }
31185 defer googleapi.CloseBody(res)
31186 if err := googleapi.CheckResponse(res); err != nil {
31187 return nil, err
31188 }
31189 ret := &EventTagsListResponse{
31190 ServerResponse: googleapi.ServerResponse{
31191 Header: res.Header,
31192 HTTPStatusCode: res.StatusCode,
31193 },
31194 }
31195 target := &ret
31196 if err := gensupport.DecodeResponse(target, res); err != nil {
31197 return nil, err
31198 }
31199 return ret, nil
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310 }
31311
31312
31313
31314 type EventTagsPatchCall struct {
31315 s *Service
31316 profileId int64
31317 eventtag *EventTag
31318 urlParams_ gensupport.URLParams
31319 ctx_ context.Context
31320 header_ http.Header
31321 }
31322
31323
31324
31325
31326
31327
31328 func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
31329 c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31330 c.profileId = profileId
31331 c.urlParams_.Set("id", fmt.Sprint(id))
31332 c.eventtag = eventtag
31333 return c
31334 }
31335
31336
31337
31338
31339 func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
31340 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31341 return c
31342 }
31343
31344
31345
31346
31347 func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
31348 c.ctx_ = ctx
31349 return c
31350 }
31351
31352
31353
31354 func (c *EventTagsPatchCall) Header() http.Header {
31355 if c.header_ == nil {
31356 c.header_ = make(http.Header)
31357 }
31358 return c.header_
31359 }
31360
31361 func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
31362 reqHeaders := make(http.Header)
31363 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
31364 for k, v := range c.header_ {
31365 reqHeaders[k] = v
31366 }
31367 reqHeaders.Set("User-Agent", c.s.userAgent())
31368 var body io.Reader = nil
31369 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31370 if err != nil {
31371 return nil, err
31372 }
31373 reqHeaders.Set("Content-Type", "application/json")
31374 c.urlParams_.Set("alt", alt)
31375 c.urlParams_.Set("prettyPrint", "false")
31376 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31377 urls += "?" + c.urlParams_.Encode()
31378 req, err := http.NewRequest("PATCH", urls, body)
31379 if err != nil {
31380 return nil, err
31381 }
31382 req.Header = reqHeaders
31383 googleapi.Expand(req.URL, map[string]string{
31384 "profileId": strconv.FormatInt(c.profileId, 10),
31385 })
31386 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31387 }
31388
31389
31390
31391
31392
31393
31394
31395
31396 func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31397 gensupport.SetOptions(c.urlParams_, opts...)
31398 res, err := c.doRequest("json")
31399 if res != nil && res.StatusCode == http.StatusNotModified {
31400 if res.Body != nil {
31401 res.Body.Close()
31402 }
31403 return nil, &googleapi.Error{
31404 Code: res.StatusCode,
31405 Header: res.Header,
31406 }
31407 }
31408 if err != nil {
31409 return nil, err
31410 }
31411 defer googleapi.CloseBody(res)
31412 if err := googleapi.CheckResponse(res); err != nil {
31413 return nil, err
31414 }
31415 ret := &EventTag{
31416 ServerResponse: googleapi.ServerResponse{
31417 Header: res.Header,
31418 HTTPStatusCode: res.StatusCode,
31419 },
31420 }
31421 target := &ret
31422 if err := gensupport.DecodeResponse(target, res); err != nil {
31423 return nil, err
31424 }
31425 return ret, nil
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463 }
31464
31465
31466
31467 type EventTagsUpdateCall struct {
31468 s *Service
31469 profileId int64
31470 eventtag *EventTag
31471 urlParams_ gensupport.URLParams
31472 ctx_ context.Context
31473 header_ http.Header
31474 }
31475
31476
31477
31478
31479 func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
31480 c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31481 c.profileId = profileId
31482 c.eventtag = eventtag
31483 return c
31484 }
31485
31486
31487
31488
31489 func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
31490 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31491 return c
31492 }
31493
31494
31495
31496
31497 func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
31498 c.ctx_ = ctx
31499 return c
31500 }
31501
31502
31503
31504 func (c *EventTagsUpdateCall) Header() http.Header {
31505 if c.header_ == nil {
31506 c.header_ = make(http.Header)
31507 }
31508 return c.header_
31509 }
31510
31511 func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
31512 reqHeaders := make(http.Header)
31513 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
31514 for k, v := range c.header_ {
31515 reqHeaders[k] = v
31516 }
31517 reqHeaders.Set("User-Agent", c.s.userAgent())
31518 var body io.Reader = nil
31519 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
31520 if err != nil {
31521 return nil, err
31522 }
31523 reqHeaders.Set("Content-Type", "application/json")
31524 c.urlParams_.Set("alt", alt)
31525 c.urlParams_.Set("prettyPrint", "false")
31526 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/eventTags")
31527 urls += "?" + c.urlParams_.Encode()
31528 req, err := http.NewRequest("PUT", urls, body)
31529 if err != nil {
31530 return nil, err
31531 }
31532 req.Header = reqHeaders
31533 googleapi.Expand(req.URL, map[string]string{
31534 "profileId": strconv.FormatInt(c.profileId, 10),
31535 })
31536 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31537 }
31538
31539
31540
31541
31542
31543
31544
31545
31546 func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
31547 gensupport.SetOptions(c.urlParams_, opts...)
31548 res, err := c.doRequest("json")
31549 if res != nil && res.StatusCode == http.StatusNotModified {
31550 if res.Body != nil {
31551 res.Body.Close()
31552 }
31553 return nil, &googleapi.Error{
31554 Code: res.StatusCode,
31555 Header: res.Header,
31556 }
31557 }
31558 if err != nil {
31559 return nil, err
31560 }
31561 defer googleapi.CloseBody(res)
31562 if err := googleapi.CheckResponse(res); err != nil {
31563 return nil, err
31564 }
31565 ret := &EventTag{
31566 ServerResponse: googleapi.ServerResponse{
31567 Header: res.Header,
31568 HTTPStatusCode: res.StatusCode,
31569 },
31570 }
31571 target := &ret
31572 if err := gensupport.DecodeResponse(target, res); err != nil {
31573 return nil, err
31574 }
31575 return ret, nil
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605 }
31606
31607
31608
31609 type FilesGetCall struct {
31610 s *Service
31611 reportId int64
31612 fileId int64
31613 urlParams_ gensupport.URLParams
31614 ifNoneMatch_ string
31615 ctx_ context.Context
31616 header_ http.Header
31617 }
31618
31619
31620
31621
31622
31623
31624 func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
31625 c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31626 c.reportId = reportId
31627 c.fileId = fileId
31628 return c
31629 }
31630
31631
31632
31633
31634 func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
31635 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31636 return c
31637 }
31638
31639
31640
31641
31642
31643
31644 func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
31645 c.ifNoneMatch_ = entityTag
31646 return c
31647 }
31648
31649
31650
31651
31652 func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
31653 c.ctx_ = ctx
31654 return c
31655 }
31656
31657
31658
31659 func (c *FilesGetCall) Header() http.Header {
31660 if c.header_ == nil {
31661 c.header_ = make(http.Header)
31662 }
31663 return c.header_
31664 }
31665
31666 func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
31667 reqHeaders := make(http.Header)
31668 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
31669 for k, v := range c.header_ {
31670 reqHeaders[k] = v
31671 }
31672 reqHeaders.Set("User-Agent", c.s.userAgent())
31673 if c.ifNoneMatch_ != "" {
31674 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31675 }
31676 var body io.Reader = nil
31677 c.urlParams_.Set("alt", alt)
31678 c.urlParams_.Set("prettyPrint", "false")
31679 urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
31680 urls += "?" + c.urlParams_.Encode()
31681 req, err := http.NewRequest("GET", urls, body)
31682 if err != nil {
31683 return nil, err
31684 }
31685 req.Header = reqHeaders
31686 googleapi.Expand(req.URL, map[string]string{
31687 "reportId": strconv.FormatInt(c.reportId, 10),
31688 "fileId": strconv.FormatInt(c.fileId, 10),
31689 })
31690 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31691 }
31692
31693
31694
31695
31696 func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
31697 gensupport.SetOptions(c.urlParams_, opts...)
31698 res, err := c.doRequest("media")
31699 if err != nil {
31700 return nil, err
31701 }
31702 if err := googleapi.CheckResponse(res); err != nil {
31703 res.Body.Close()
31704 return nil, err
31705 }
31706 return res, nil
31707 }
31708
31709
31710
31711
31712
31713
31714
31715
31716 func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
31717 gensupport.SetOptions(c.urlParams_, opts...)
31718 res, err := c.doRequest("json")
31719 if res != nil && res.StatusCode == http.StatusNotModified {
31720 if res.Body != nil {
31721 res.Body.Close()
31722 }
31723 return nil, &googleapi.Error{
31724 Code: res.StatusCode,
31725 Header: res.Header,
31726 }
31727 }
31728 if err != nil {
31729 return nil, err
31730 }
31731 defer googleapi.CloseBody(res)
31732 if err := googleapi.CheckResponse(res); err != nil {
31733 return nil, err
31734 }
31735 ret := &File{
31736 ServerResponse: googleapi.ServerResponse{
31737 Header: res.Header,
31738 HTTPStatusCode: res.StatusCode,
31739 },
31740 }
31741 target := &ret
31742 if err := gensupport.DecodeResponse(target, res); err != nil {
31743 return nil, err
31744 }
31745 return ret, nil
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781 }
31782
31783
31784
31785 type FilesListCall struct {
31786 s *Service
31787 profileId int64
31788 urlParams_ gensupport.URLParams
31789 ifNoneMatch_ string
31790 ctx_ context.Context
31791 header_ http.Header
31792 }
31793
31794
31795
31796
31797 func (r *FilesService) List(profileId int64) *FilesListCall {
31798 c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31799 c.profileId = profileId
31800 return c
31801 }
31802
31803
31804
31805 func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
31806 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31807 return c
31808 }
31809
31810
31811
31812 func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
31813 c.urlParams_.Set("pageToken", pageToken)
31814 return c
31815 }
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825 func (c *FilesListCall) Scope(scope string) *FilesListCall {
31826 c.urlParams_.Set("scope", scope)
31827 return c
31828 }
31829
31830
31831
31832
31833
31834
31835
31836
31837 func (c *FilesListCall) SortField(sortField string) *FilesListCall {
31838 c.urlParams_.Set("sortField", sortField)
31839 return c
31840 }
31841
31842
31843
31844
31845
31846
31847
31848
31849 func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
31850 c.urlParams_.Set("sortOrder", sortOrder)
31851 return c
31852 }
31853
31854
31855
31856
31857 func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
31858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31859 return c
31860 }
31861
31862
31863
31864
31865
31866
31867 func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
31868 c.ifNoneMatch_ = entityTag
31869 return c
31870 }
31871
31872
31873
31874
31875 func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
31876 c.ctx_ = ctx
31877 return c
31878 }
31879
31880
31881
31882 func (c *FilesListCall) Header() http.Header {
31883 if c.header_ == nil {
31884 c.header_ = make(http.Header)
31885 }
31886 return c.header_
31887 }
31888
31889 func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
31890 reqHeaders := make(http.Header)
31891 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
31892 for k, v := range c.header_ {
31893 reqHeaders[k] = v
31894 }
31895 reqHeaders.Set("User-Agent", c.s.userAgent())
31896 if c.ifNoneMatch_ != "" {
31897 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31898 }
31899 var body io.Reader = nil
31900 c.urlParams_.Set("alt", alt)
31901 c.urlParams_.Set("prettyPrint", "false")
31902 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
31903 urls += "?" + c.urlParams_.Encode()
31904 req, err := http.NewRequest("GET", urls, body)
31905 if err != nil {
31906 return nil, err
31907 }
31908 req.Header = reqHeaders
31909 googleapi.Expand(req.URL, map[string]string{
31910 "profileId": strconv.FormatInt(c.profileId, 10),
31911 })
31912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31913 }
31914
31915
31916
31917
31918
31919
31920
31921
31922 func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
31923 gensupport.SetOptions(c.urlParams_, opts...)
31924 res, err := c.doRequest("json")
31925 if res != nil && res.StatusCode == http.StatusNotModified {
31926 if res.Body != nil {
31927 res.Body.Close()
31928 }
31929 return nil, &googleapi.Error{
31930 Code: res.StatusCode,
31931 Header: res.Header,
31932 }
31933 }
31934 if err != nil {
31935 return nil, err
31936 }
31937 defer googleapi.CloseBody(res)
31938 if err := googleapi.CheckResponse(res); err != nil {
31939 return nil, err
31940 }
31941 ret := &FileList{
31942 ServerResponse: googleapi.ServerResponse{
31943 Header: res.Header,
31944 HTTPStatusCode: res.StatusCode,
31945 },
31946 }
31947 target := &ret
31948 if err := gensupport.DecodeResponse(target, res); err != nil {
31949 return nil, err
31950 }
31951 return ret, nil
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036 }
32037
32038
32039
32040
32041 func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
32042 c.ctx_ = ctx
32043 defer c.PageToken(c.urlParams_.Get("pageToken"))
32044 for {
32045 x, err := c.Do()
32046 if err != nil {
32047 return err
32048 }
32049 if err := f(x); err != nil {
32050 return err
32051 }
32052 if x.NextPageToken == "" {
32053 return nil
32054 }
32055 c.PageToken(x.NextPageToken)
32056 }
32057 }
32058
32059
32060
32061 type FloodlightActivitiesDeleteCall struct {
32062 s *Service
32063 profileId int64
32064 id int64
32065 urlParams_ gensupport.URLParams
32066 ctx_ context.Context
32067 header_ http.Header
32068 }
32069
32070
32071
32072
32073
32074 func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
32075 c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32076 c.profileId = profileId
32077 c.id = id
32078 return c
32079 }
32080
32081
32082
32083
32084 func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
32085 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32086 return c
32087 }
32088
32089
32090
32091
32092 func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
32093 c.ctx_ = ctx
32094 return c
32095 }
32096
32097
32098
32099 func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
32100 if c.header_ == nil {
32101 c.header_ = make(http.Header)
32102 }
32103 return c.header_
32104 }
32105
32106 func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
32107 reqHeaders := make(http.Header)
32108 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
32109 for k, v := range c.header_ {
32110 reqHeaders[k] = v
32111 }
32112 reqHeaders.Set("User-Agent", c.s.userAgent())
32113 var body io.Reader = nil
32114 c.urlParams_.Set("alt", alt)
32115 c.urlParams_.Set("prettyPrint", "false")
32116 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32117 urls += "?" + c.urlParams_.Encode()
32118 req, err := http.NewRequest("DELETE", urls, body)
32119 if err != nil {
32120 return nil, err
32121 }
32122 req.Header = reqHeaders
32123 googleapi.Expand(req.URL, map[string]string{
32124 "profileId": strconv.FormatInt(c.profileId, 10),
32125 "id": strconv.FormatInt(c.id, 10),
32126 })
32127 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32128 }
32129
32130
32131 func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
32132 gensupport.SetOptions(c.urlParams_, opts...)
32133 res, err := c.doRequest("json")
32134 if err != nil {
32135 return err
32136 }
32137 defer googleapi.CloseBody(res)
32138 if err := googleapi.CheckResponse(res); err != nil {
32139 return err
32140 }
32141 return nil
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173 }
32174
32175
32176
32177 type FloodlightActivitiesGeneratetagCall struct {
32178 s *Service
32179 profileId int64
32180 urlParams_ gensupport.URLParams
32181 ctx_ context.Context
32182 header_ http.Header
32183 }
32184
32185
32186
32187
32188 func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
32189 c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32190 c.profileId = profileId
32191 return c
32192 }
32193
32194
32195
32196
32197 func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
32198 c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
32199 return c
32200 }
32201
32202
32203
32204
32205 func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
32206 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32207 return c
32208 }
32209
32210
32211
32212
32213 func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
32214 c.ctx_ = ctx
32215 return c
32216 }
32217
32218
32219
32220 func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
32221 if c.header_ == nil {
32222 c.header_ = make(http.Header)
32223 }
32224 return c.header_
32225 }
32226
32227 func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
32228 reqHeaders := make(http.Header)
32229 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
32230 for k, v := range c.header_ {
32231 reqHeaders[k] = v
32232 }
32233 reqHeaders.Set("User-Agent", c.s.userAgent())
32234 var body io.Reader = nil
32235 c.urlParams_.Set("alt", alt)
32236 c.urlParams_.Set("prettyPrint", "false")
32237 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/generatetag")
32238 urls += "?" + c.urlParams_.Encode()
32239 req, err := http.NewRequest("POST", urls, body)
32240 if err != nil {
32241 return nil, err
32242 }
32243 req.Header = reqHeaders
32244 googleapi.Expand(req.URL, map[string]string{
32245 "profileId": strconv.FormatInt(c.profileId, 10),
32246 })
32247 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32248 }
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258 func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
32259 gensupport.SetOptions(c.urlParams_, opts...)
32260 res, err := c.doRequest("json")
32261 if res != nil && res.StatusCode == http.StatusNotModified {
32262 if res.Body != nil {
32263 res.Body.Close()
32264 }
32265 return nil, &googleapi.Error{
32266 Code: res.StatusCode,
32267 Header: res.Header,
32268 }
32269 }
32270 if err != nil {
32271 return nil, err
32272 }
32273 defer googleapi.CloseBody(res)
32274 if err := googleapi.CheckResponse(res); err != nil {
32275 return nil, err
32276 }
32277 ret := &FloodlightActivitiesGenerateTagResponse{
32278 ServerResponse: googleapi.ServerResponse{
32279 Header: res.Header,
32280 HTTPStatusCode: res.StatusCode,
32281 },
32282 }
32283 target := &ret
32284 if err := gensupport.DecodeResponse(target, res); err != nil {
32285 return nil, err
32286 }
32287 return ret, nil
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320 }
32321
32322
32323
32324 type FloodlightActivitiesGetCall struct {
32325 s *Service
32326 profileId int64
32327 id int64
32328 urlParams_ gensupport.URLParams
32329 ifNoneMatch_ string
32330 ctx_ context.Context
32331 header_ http.Header
32332 }
32333
32334
32335
32336
32337
32338 func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
32339 c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32340 c.profileId = profileId
32341 c.id = id
32342 return c
32343 }
32344
32345
32346
32347
32348 func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
32349 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32350 return c
32351 }
32352
32353
32354
32355
32356
32357
32358 func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
32359 c.ifNoneMatch_ = entityTag
32360 return c
32361 }
32362
32363
32364
32365
32366 func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
32367 c.ctx_ = ctx
32368 return c
32369 }
32370
32371
32372
32373 func (c *FloodlightActivitiesGetCall) Header() http.Header {
32374 if c.header_ == nil {
32375 c.header_ = make(http.Header)
32376 }
32377 return c.header_
32378 }
32379
32380 func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
32381 reqHeaders := make(http.Header)
32382 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
32383 for k, v := range c.header_ {
32384 reqHeaders[k] = v
32385 }
32386 reqHeaders.Set("User-Agent", c.s.userAgent())
32387 if c.ifNoneMatch_ != "" {
32388 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32389 }
32390 var body io.Reader = nil
32391 c.urlParams_.Set("alt", alt)
32392 c.urlParams_.Set("prettyPrint", "false")
32393 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities/{id}")
32394 urls += "?" + c.urlParams_.Encode()
32395 req, err := http.NewRequest("GET", urls, body)
32396 if err != nil {
32397 return nil, err
32398 }
32399 req.Header = reqHeaders
32400 googleapi.Expand(req.URL, map[string]string{
32401 "profileId": strconv.FormatInt(c.profileId, 10),
32402 "id": strconv.FormatInt(c.id, 10),
32403 })
32404 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32405 }
32406
32407
32408
32409
32410
32411
32412
32413
32414 func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32415 gensupport.SetOptions(c.urlParams_, opts...)
32416 res, err := c.doRequest("json")
32417 if res != nil && res.StatusCode == http.StatusNotModified {
32418 if res.Body != nil {
32419 res.Body.Close()
32420 }
32421 return nil, &googleapi.Error{
32422 Code: res.StatusCode,
32423 Header: res.Header,
32424 }
32425 }
32426 if err != nil {
32427 return nil, err
32428 }
32429 defer googleapi.CloseBody(res)
32430 if err := googleapi.CheckResponse(res); err != nil {
32431 return nil, err
32432 }
32433 ret := &FloodlightActivity{
32434 ServerResponse: googleapi.ServerResponse{
32435 Header: res.Header,
32436 HTTPStatusCode: res.StatusCode,
32437 },
32438 }
32439 target := &ret
32440 if err := gensupport.DecodeResponse(target, res); err != nil {
32441 return nil, err
32442 }
32443 return ret, nil
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478 }
32479
32480
32481
32482 type FloodlightActivitiesInsertCall struct {
32483 s *Service
32484 profileId int64
32485 floodlightactivity *FloodlightActivity
32486 urlParams_ gensupport.URLParams
32487 ctx_ context.Context
32488 header_ http.Header
32489 }
32490
32491
32492
32493
32494 func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
32495 c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32496 c.profileId = profileId
32497 c.floodlightactivity = floodlightactivity
32498 return c
32499 }
32500
32501
32502
32503
32504 func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
32505 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32506 return c
32507 }
32508
32509
32510
32511
32512 func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
32513 c.ctx_ = ctx
32514 return c
32515 }
32516
32517
32518
32519 func (c *FloodlightActivitiesInsertCall) Header() http.Header {
32520 if c.header_ == nil {
32521 c.header_ = make(http.Header)
32522 }
32523 return c.header_
32524 }
32525
32526 func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
32527 reqHeaders := make(http.Header)
32528 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
32529 for k, v := range c.header_ {
32530 reqHeaders[k] = v
32531 }
32532 reqHeaders.Set("User-Agent", c.s.userAgent())
32533 var body io.Reader = nil
32534 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
32535 if err != nil {
32536 return nil, err
32537 }
32538 reqHeaders.Set("Content-Type", "application/json")
32539 c.urlParams_.Set("alt", alt)
32540 c.urlParams_.Set("prettyPrint", "false")
32541 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32542 urls += "?" + c.urlParams_.Encode()
32543 req, err := http.NewRequest("POST", urls, body)
32544 if err != nil {
32545 return nil, err
32546 }
32547 req.Header = reqHeaders
32548 googleapi.Expand(req.URL, map[string]string{
32549 "profileId": strconv.FormatInt(c.profileId, 10),
32550 })
32551 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32552 }
32553
32554
32555
32556
32557
32558
32559
32560
32561 func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
32562 gensupport.SetOptions(c.urlParams_, opts...)
32563 res, err := c.doRequest("json")
32564 if res != nil && res.StatusCode == http.StatusNotModified {
32565 if res.Body != nil {
32566 res.Body.Close()
32567 }
32568 return nil, &googleapi.Error{
32569 Code: res.StatusCode,
32570 Header: res.Header,
32571 }
32572 }
32573 if err != nil {
32574 return nil, err
32575 }
32576 defer googleapi.CloseBody(res)
32577 if err := googleapi.CheckResponse(res); err != nil {
32578 return nil, err
32579 }
32580 ret := &FloodlightActivity{
32581 ServerResponse: googleapi.ServerResponse{
32582 Header: res.Header,
32583 HTTPStatusCode: res.StatusCode,
32584 },
32585 }
32586 target := &ret
32587 if err := gensupport.DecodeResponse(target, res); err != nil {
32588 return nil, err
32589 }
32590 return ret, nil
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620 }
32621
32622
32623
32624 type FloodlightActivitiesListCall struct {
32625 s *Service
32626 profileId int64
32627 urlParams_ gensupport.URLParams
32628 ifNoneMatch_ string
32629 ctx_ context.Context
32630 header_ http.Header
32631 }
32632
32633
32634
32635
32636
32637 func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
32638 c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32639 c.profileId = profileId
32640 return c
32641 }
32642
32643
32644
32645
32646
32647 func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
32648 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
32649 return c
32650 }
32651
32652
32653
32654
32655 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
32656 var floodlightActivityGroupIds_ []string
32657 for _, v := range floodlightActivityGroupIds {
32658 floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
32659 }
32660 c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
32661 return c
32662 }
32663
32664
32665
32666
32667 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
32668 c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
32669 return c
32670 }
32671
32672
32673
32674
32675 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
32676 c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
32677 return c
32678 }
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
32689 c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
32690 return c
32691 }
32692
32693
32694
32695
32696
32697 func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
32698 c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
32699 return c
32700 }
32701
32702
32703
32704
32705 func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
32706 var ids_ []string
32707 for _, v := range ids {
32708 ids_ = append(ids_, fmt.Sprint(v))
32709 }
32710 c.urlParams_.SetMulti("ids", ids_)
32711 return c
32712 }
32713
32714
32715
32716 func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
32717 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32718 return c
32719 }
32720
32721
32722
32723 func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
32724 c.urlParams_.Set("pageToken", pageToken)
32725 return c
32726 }
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737 func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
32738 c.urlParams_.Set("searchString", searchString)
32739 return c
32740 }
32741
32742
32743
32744
32745
32746
32747
32748
32749 func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
32750 c.urlParams_.Set("sortField", sortField)
32751 return c
32752 }
32753
32754
32755
32756
32757
32758
32759
32760
32761 func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
32762 c.urlParams_.Set("sortOrder", sortOrder)
32763 return c
32764 }
32765
32766
32767
32768 func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
32769 c.urlParams_.Set("tagString", tagString)
32770 return c
32771 }
32772
32773
32774
32775
32776 func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
32777 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32778 return c
32779 }
32780
32781
32782
32783
32784
32785
32786 func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
32787 c.ifNoneMatch_ = entityTag
32788 return c
32789 }
32790
32791
32792
32793
32794 func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
32795 c.ctx_ = ctx
32796 return c
32797 }
32798
32799
32800
32801 func (c *FloodlightActivitiesListCall) Header() http.Header {
32802 if c.header_ == nil {
32803 c.header_ = make(http.Header)
32804 }
32805 return c.header_
32806 }
32807
32808 func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
32809 reqHeaders := make(http.Header)
32810 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
32811 for k, v := range c.header_ {
32812 reqHeaders[k] = v
32813 }
32814 reqHeaders.Set("User-Agent", c.s.userAgent())
32815 if c.ifNoneMatch_ != "" {
32816 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32817 }
32818 var body io.Reader = nil
32819 c.urlParams_.Set("alt", alt)
32820 c.urlParams_.Set("prettyPrint", "false")
32821 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
32822 urls += "?" + c.urlParams_.Encode()
32823 req, err := http.NewRequest("GET", urls, body)
32824 if err != nil {
32825 return nil, err
32826 }
32827 req.Header = reqHeaders
32828 googleapi.Expand(req.URL, map[string]string{
32829 "profileId": strconv.FormatInt(c.profileId, 10),
32830 })
32831 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32832 }
32833
32834
32835
32836
32837
32838
32839
32840
32841 func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
32842 gensupport.SetOptions(c.urlParams_, opts...)
32843 res, err := c.doRequest("json")
32844 if res != nil && res.StatusCode == http.StatusNotModified {
32845 if res.Body != nil {
32846 res.Body.Close()
32847 }
32848 return nil, &googleapi.Error{
32849 Code: res.StatusCode,
32850 Header: res.Header,
32851 }
32852 }
32853 if err != nil {
32854 return nil, err
32855 }
32856 defer googleapi.CloseBody(res)
32857 if err := googleapi.CheckResponse(res); err != nil {
32858 return nil, err
32859 }
32860 ret := &FloodlightActivitiesListResponse{
32861 ServerResponse: googleapi.ServerResponse{
32862 Header: res.Header,
32863 HTTPStatusCode: res.StatusCode,
32864 },
32865 }
32866 target := &ret
32867 if err := gensupport.DecodeResponse(target, res); err != nil {
32868 return nil, err
32869 }
32870 return ret, nil
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998 }
32999
33000
33001
33002
33003 func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
33004 c.ctx_ = ctx
33005 defer c.PageToken(c.urlParams_.Get("pageToken"))
33006 for {
33007 x, err := c.Do()
33008 if err != nil {
33009 return err
33010 }
33011 if err := f(x); err != nil {
33012 return err
33013 }
33014 if x.NextPageToken == "" {
33015 return nil
33016 }
33017 c.PageToken(x.NextPageToken)
33018 }
33019 }
33020
33021
33022
33023 type FloodlightActivitiesPatchCall struct {
33024 s *Service
33025 profileId int64
33026 floodlightactivity *FloodlightActivity
33027 urlParams_ gensupport.URLParams
33028 ctx_ context.Context
33029 header_ http.Header
33030 }
33031
33032
33033
33034
33035
33036
33037 func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
33038 c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33039 c.profileId = profileId
33040 c.urlParams_.Set("id", fmt.Sprint(id))
33041 c.floodlightactivity = floodlightactivity
33042 return c
33043 }
33044
33045
33046
33047
33048 func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
33049 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33050 return c
33051 }
33052
33053
33054
33055
33056 func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
33057 c.ctx_ = ctx
33058 return c
33059 }
33060
33061
33062
33063 func (c *FloodlightActivitiesPatchCall) Header() http.Header {
33064 if c.header_ == nil {
33065 c.header_ = make(http.Header)
33066 }
33067 return c.header_
33068 }
33069
33070 func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
33071 reqHeaders := make(http.Header)
33072 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
33073 for k, v := range c.header_ {
33074 reqHeaders[k] = v
33075 }
33076 reqHeaders.Set("User-Agent", c.s.userAgent())
33077 var body io.Reader = nil
33078 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33079 if err != nil {
33080 return nil, err
33081 }
33082 reqHeaders.Set("Content-Type", "application/json")
33083 c.urlParams_.Set("alt", alt)
33084 c.urlParams_.Set("prettyPrint", "false")
33085 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33086 urls += "?" + c.urlParams_.Encode()
33087 req, err := http.NewRequest("PATCH", urls, body)
33088 if err != nil {
33089 return nil, err
33090 }
33091 req.Header = reqHeaders
33092 googleapi.Expand(req.URL, map[string]string{
33093 "profileId": strconv.FormatInt(c.profileId, 10),
33094 })
33095 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33096 }
33097
33098
33099
33100
33101
33102
33103
33104
33105 func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33106 gensupport.SetOptions(c.urlParams_, opts...)
33107 res, err := c.doRequest("json")
33108 if res != nil && res.StatusCode == http.StatusNotModified {
33109 if res.Body != nil {
33110 res.Body.Close()
33111 }
33112 return nil, &googleapi.Error{
33113 Code: res.StatusCode,
33114 Header: res.Header,
33115 }
33116 }
33117 if err != nil {
33118 return nil, err
33119 }
33120 defer googleapi.CloseBody(res)
33121 if err := googleapi.CheckResponse(res); err != nil {
33122 return nil, err
33123 }
33124 ret := &FloodlightActivity{
33125 ServerResponse: googleapi.ServerResponse{
33126 Header: res.Header,
33127 HTTPStatusCode: res.StatusCode,
33128 },
33129 }
33130 target := &ret
33131 if err := gensupport.DecodeResponse(target, res); err != nil {
33132 return nil, err
33133 }
33134 return ret, nil
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172 }
33173
33174
33175
33176 type FloodlightActivitiesUpdateCall struct {
33177 s *Service
33178 profileId int64
33179 floodlightactivity *FloodlightActivity
33180 urlParams_ gensupport.URLParams
33181 ctx_ context.Context
33182 header_ http.Header
33183 }
33184
33185
33186
33187
33188 func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
33189 c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33190 c.profileId = profileId
33191 c.floodlightactivity = floodlightactivity
33192 return c
33193 }
33194
33195
33196
33197
33198 func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
33199 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33200 return c
33201 }
33202
33203
33204
33205
33206 func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
33207 c.ctx_ = ctx
33208 return c
33209 }
33210
33211
33212
33213 func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
33214 if c.header_ == nil {
33215 c.header_ = make(http.Header)
33216 }
33217 return c.header_
33218 }
33219
33220 func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
33221 reqHeaders := make(http.Header)
33222 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
33223 for k, v := range c.header_ {
33224 reqHeaders[k] = v
33225 }
33226 reqHeaders.Set("User-Agent", c.s.userAgent())
33227 var body io.Reader = nil
33228 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
33229 if err != nil {
33230 return nil, err
33231 }
33232 reqHeaders.Set("Content-Type", "application/json")
33233 c.urlParams_.Set("alt", alt)
33234 c.urlParams_.Set("prettyPrint", "false")
33235 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivities")
33236 urls += "?" + c.urlParams_.Encode()
33237 req, err := http.NewRequest("PUT", urls, body)
33238 if err != nil {
33239 return nil, err
33240 }
33241 req.Header = reqHeaders
33242 googleapi.Expand(req.URL, map[string]string{
33243 "profileId": strconv.FormatInt(c.profileId, 10),
33244 })
33245 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33246 }
33247
33248
33249
33250
33251
33252
33253
33254
33255 func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
33256 gensupport.SetOptions(c.urlParams_, opts...)
33257 res, err := c.doRequest("json")
33258 if res != nil && res.StatusCode == http.StatusNotModified {
33259 if res.Body != nil {
33260 res.Body.Close()
33261 }
33262 return nil, &googleapi.Error{
33263 Code: res.StatusCode,
33264 Header: res.Header,
33265 }
33266 }
33267 if err != nil {
33268 return nil, err
33269 }
33270 defer googleapi.CloseBody(res)
33271 if err := googleapi.CheckResponse(res); err != nil {
33272 return nil, err
33273 }
33274 ret := &FloodlightActivity{
33275 ServerResponse: googleapi.ServerResponse{
33276 Header: res.Header,
33277 HTTPStatusCode: res.StatusCode,
33278 },
33279 }
33280 target := &ret
33281 if err := gensupport.DecodeResponse(target, res); err != nil {
33282 return nil, err
33283 }
33284 return ret, nil
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314 }
33315
33316
33317
33318 type FloodlightActivityGroupsGetCall struct {
33319 s *Service
33320 profileId int64
33321 id int64
33322 urlParams_ gensupport.URLParams
33323 ifNoneMatch_ string
33324 ctx_ context.Context
33325 header_ http.Header
33326 }
33327
33328
33329
33330
33331
33332 func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
33333 c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33334 c.profileId = profileId
33335 c.id = id
33336 return c
33337 }
33338
33339
33340
33341
33342 func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
33343 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33344 return c
33345 }
33346
33347
33348
33349
33350
33351
33352 func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
33353 c.ifNoneMatch_ = entityTag
33354 return c
33355 }
33356
33357
33358
33359
33360 func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
33361 c.ctx_ = ctx
33362 return c
33363 }
33364
33365
33366
33367 func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
33368 if c.header_ == nil {
33369 c.header_ = make(http.Header)
33370 }
33371 return c.header_
33372 }
33373
33374 func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
33375 reqHeaders := make(http.Header)
33376 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
33377 for k, v := range c.header_ {
33378 reqHeaders[k] = v
33379 }
33380 reqHeaders.Set("User-Agent", c.s.userAgent())
33381 if c.ifNoneMatch_ != "" {
33382 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33383 }
33384 var body io.Reader = nil
33385 c.urlParams_.Set("alt", alt)
33386 c.urlParams_.Set("prettyPrint", "false")
33387 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups/{id}")
33388 urls += "?" + c.urlParams_.Encode()
33389 req, err := http.NewRequest("GET", urls, body)
33390 if err != nil {
33391 return nil, err
33392 }
33393 req.Header = reqHeaders
33394 googleapi.Expand(req.URL, map[string]string{
33395 "profileId": strconv.FormatInt(c.profileId, 10),
33396 "id": strconv.FormatInt(c.id, 10),
33397 })
33398 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33399 }
33400
33401
33402
33403
33404
33405
33406
33407
33408 func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33409 gensupport.SetOptions(c.urlParams_, opts...)
33410 res, err := c.doRequest("json")
33411 if res != nil && res.StatusCode == http.StatusNotModified {
33412 if res.Body != nil {
33413 res.Body.Close()
33414 }
33415 return nil, &googleapi.Error{
33416 Code: res.StatusCode,
33417 Header: res.Header,
33418 }
33419 }
33420 if err != nil {
33421 return nil, err
33422 }
33423 defer googleapi.CloseBody(res)
33424 if err := googleapi.CheckResponse(res); err != nil {
33425 return nil, err
33426 }
33427 ret := &FloodlightActivityGroup{
33428 ServerResponse: googleapi.ServerResponse{
33429 Header: res.Header,
33430 HTTPStatusCode: res.StatusCode,
33431 },
33432 }
33433 target := &ret
33434 if err := gensupport.DecodeResponse(target, res); err != nil {
33435 return nil, err
33436 }
33437 return ret, nil
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472 }
33473
33474
33475
33476 type FloodlightActivityGroupsInsertCall struct {
33477 s *Service
33478 profileId int64
33479 floodlightactivitygroup *FloodlightActivityGroup
33480 urlParams_ gensupport.URLParams
33481 ctx_ context.Context
33482 header_ http.Header
33483 }
33484
33485
33486
33487
33488 func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
33489 c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33490 c.profileId = profileId
33491 c.floodlightactivitygroup = floodlightactivitygroup
33492 return c
33493 }
33494
33495
33496
33497
33498 func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
33499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33500 return c
33501 }
33502
33503
33504
33505
33506 func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
33507 c.ctx_ = ctx
33508 return c
33509 }
33510
33511
33512
33513 func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
33514 if c.header_ == nil {
33515 c.header_ = make(http.Header)
33516 }
33517 return c.header_
33518 }
33519
33520 func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
33521 reqHeaders := make(http.Header)
33522 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
33523 for k, v := range c.header_ {
33524 reqHeaders[k] = v
33525 }
33526 reqHeaders.Set("User-Agent", c.s.userAgent())
33527 var body io.Reader = nil
33528 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
33529 if err != nil {
33530 return nil, err
33531 }
33532 reqHeaders.Set("Content-Type", "application/json")
33533 c.urlParams_.Set("alt", alt)
33534 c.urlParams_.Set("prettyPrint", "false")
33535 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33536 urls += "?" + c.urlParams_.Encode()
33537 req, err := http.NewRequest("POST", urls, body)
33538 if err != nil {
33539 return nil, err
33540 }
33541 req.Header = reqHeaders
33542 googleapi.Expand(req.URL, map[string]string{
33543 "profileId": strconv.FormatInt(c.profileId, 10),
33544 })
33545 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33546 }
33547
33548
33549
33550
33551
33552
33553
33554
33555 func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
33556 gensupport.SetOptions(c.urlParams_, opts...)
33557 res, err := c.doRequest("json")
33558 if res != nil && res.StatusCode == http.StatusNotModified {
33559 if res.Body != nil {
33560 res.Body.Close()
33561 }
33562 return nil, &googleapi.Error{
33563 Code: res.StatusCode,
33564 Header: res.Header,
33565 }
33566 }
33567 if err != nil {
33568 return nil, err
33569 }
33570 defer googleapi.CloseBody(res)
33571 if err := googleapi.CheckResponse(res); err != nil {
33572 return nil, err
33573 }
33574 ret := &FloodlightActivityGroup{
33575 ServerResponse: googleapi.ServerResponse{
33576 Header: res.Header,
33577 HTTPStatusCode: res.StatusCode,
33578 },
33579 }
33580 target := &ret
33581 if err := gensupport.DecodeResponse(target, res); err != nil {
33582 return nil, err
33583 }
33584 return ret, nil
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614 }
33615
33616
33617
33618 type FloodlightActivityGroupsListCall struct {
33619 s *Service
33620 profileId int64
33621 urlParams_ gensupport.URLParams
33622 ifNoneMatch_ string
33623 ctx_ context.Context
33624 header_ http.Header
33625 }
33626
33627
33628
33629
33630
33631 func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
33632 c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33633 c.profileId = profileId
33634 return c
33635 }
33636
33637
33638
33639
33640
33641 func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
33642 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33643 return c
33644 }
33645
33646
33647
33648
33649
33650 func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
33651 c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
33652 return c
33653 }
33654
33655
33656
33657
33658 func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
33659 var ids_ []string
33660 for _, v := range ids {
33661 ids_ = append(ids_, fmt.Sprint(v))
33662 }
33663 c.urlParams_.SetMulti("ids", ids_)
33664 return c
33665 }
33666
33667
33668
33669 func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
33670 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33671 return c
33672 }
33673
33674
33675
33676 func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
33677 c.urlParams_.Set("pageToken", pageToken)
33678 return c
33679 }
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691 func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
33692 c.urlParams_.Set("searchString", searchString)
33693 return c
33694 }
33695
33696
33697
33698
33699
33700
33701
33702
33703 func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
33704 c.urlParams_.Set("sortField", sortField)
33705 return c
33706 }
33707
33708
33709
33710
33711
33712
33713
33714
33715 func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
33716 c.urlParams_.Set("sortOrder", sortOrder)
33717 return c
33718 }
33719
33720
33721
33722
33723
33724
33725
33726
33727 func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
33728 c.urlParams_.Set("type", type_)
33729 return c
33730 }
33731
33732
33733
33734
33735 func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
33736 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33737 return c
33738 }
33739
33740
33741
33742
33743
33744
33745 func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
33746 c.ifNoneMatch_ = entityTag
33747 return c
33748 }
33749
33750
33751
33752
33753 func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
33754 c.ctx_ = ctx
33755 return c
33756 }
33757
33758
33759
33760 func (c *FloodlightActivityGroupsListCall) Header() http.Header {
33761 if c.header_ == nil {
33762 c.header_ = make(http.Header)
33763 }
33764 return c.header_
33765 }
33766
33767 func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
33768 reqHeaders := make(http.Header)
33769 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
33770 for k, v := range c.header_ {
33771 reqHeaders[k] = v
33772 }
33773 reqHeaders.Set("User-Agent", c.s.userAgent())
33774 if c.ifNoneMatch_ != "" {
33775 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33776 }
33777 var body io.Reader = nil
33778 c.urlParams_.Set("alt", alt)
33779 c.urlParams_.Set("prettyPrint", "false")
33780 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
33781 urls += "?" + c.urlParams_.Encode()
33782 req, err := http.NewRequest("GET", urls, body)
33783 if err != nil {
33784 return nil, err
33785 }
33786 req.Header = reqHeaders
33787 googleapi.Expand(req.URL, map[string]string{
33788 "profileId": strconv.FormatInt(c.profileId, 10),
33789 })
33790 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33791 }
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801 func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
33802 gensupport.SetOptions(c.urlParams_, opts...)
33803 res, err := c.doRequest("json")
33804 if res != nil && res.StatusCode == http.StatusNotModified {
33805 if res.Body != nil {
33806 res.Body.Close()
33807 }
33808 return nil, &googleapi.Error{
33809 Code: res.StatusCode,
33810 Header: res.Header,
33811 }
33812 }
33813 if err != nil {
33814 return nil, err
33815 }
33816 defer googleapi.CloseBody(res)
33817 if err := googleapi.CheckResponse(res); err != nil {
33818 return nil, err
33819 }
33820 ret := &FloodlightActivityGroupsListResponse{
33821 ServerResponse: googleapi.ServerResponse{
33822 Header: res.Header,
33823 HTTPStatusCode: res.StatusCode,
33824 },
33825 }
33826 target := &ret
33827 if err := gensupport.DecodeResponse(target, res); err != nil {
33828 return nil, err
33829 }
33830 return ret, nil
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936 }
33937
33938
33939
33940
33941 func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
33942 c.ctx_ = ctx
33943 defer c.PageToken(c.urlParams_.Get("pageToken"))
33944 for {
33945 x, err := c.Do()
33946 if err != nil {
33947 return err
33948 }
33949 if err := f(x); err != nil {
33950 return err
33951 }
33952 if x.NextPageToken == "" {
33953 return nil
33954 }
33955 c.PageToken(x.NextPageToken)
33956 }
33957 }
33958
33959
33960
33961 type FloodlightActivityGroupsPatchCall struct {
33962 s *Service
33963 profileId int64
33964 floodlightactivitygroup *FloodlightActivityGroup
33965 urlParams_ gensupport.URLParams
33966 ctx_ context.Context
33967 header_ http.Header
33968 }
33969
33970
33971
33972
33973
33974
33975 func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
33976 c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33977 c.profileId = profileId
33978 c.urlParams_.Set("id", fmt.Sprint(id))
33979 c.floodlightactivitygroup = floodlightactivitygroup
33980 return c
33981 }
33982
33983
33984
33985
33986 func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
33987 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33988 return c
33989 }
33990
33991
33992
33993
33994 func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
33995 c.ctx_ = ctx
33996 return c
33997 }
33998
33999
34000
34001 func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
34002 if c.header_ == nil {
34003 c.header_ = make(http.Header)
34004 }
34005 return c.header_
34006 }
34007
34008 func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
34009 reqHeaders := make(http.Header)
34010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34011 for k, v := range c.header_ {
34012 reqHeaders[k] = v
34013 }
34014 reqHeaders.Set("User-Agent", c.s.userAgent())
34015 var body io.Reader = nil
34016 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34017 if err != nil {
34018 return nil, err
34019 }
34020 reqHeaders.Set("Content-Type", "application/json")
34021 c.urlParams_.Set("alt", alt)
34022 c.urlParams_.Set("prettyPrint", "false")
34023 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34024 urls += "?" + c.urlParams_.Encode()
34025 req, err := http.NewRequest("PATCH", urls, body)
34026 if err != nil {
34027 return nil, err
34028 }
34029 req.Header = reqHeaders
34030 googleapi.Expand(req.URL, map[string]string{
34031 "profileId": strconv.FormatInt(c.profileId, 10),
34032 })
34033 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34034 }
34035
34036
34037
34038
34039
34040
34041
34042
34043 func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34044 gensupport.SetOptions(c.urlParams_, opts...)
34045 res, err := c.doRequest("json")
34046 if res != nil && res.StatusCode == http.StatusNotModified {
34047 if res.Body != nil {
34048 res.Body.Close()
34049 }
34050 return nil, &googleapi.Error{
34051 Code: res.StatusCode,
34052 Header: res.Header,
34053 }
34054 }
34055 if err != nil {
34056 return nil, err
34057 }
34058 defer googleapi.CloseBody(res)
34059 if err := googleapi.CheckResponse(res); err != nil {
34060 return nil, err
34061 }
34062 ret := &FloodlightActivityGroup{
34063 ServerResponse: googleapi.ServerResponse{
34064 Header: res.Header,
34065 HTTPStatusCode: res.StatusCode,
34066 },
34067 }
34068 target := &ret
34069 if err := gensupport.DecodeResponse(target, res); err != nil {
34070 return nil, err
34071 }
34072 return ret, nil
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110 }
34111
34112
34113
34114 type FloodlightActivityGroupsUpdateCall struct {
34115 s *Service
34116 profileId int64
34117 floodlightactivitygroup *FloodlightActivityGroup
34118 urlParams_ gensupport.URLParams
34119 ctx_ context.Context
34120 header_ http.Header
34121 }
34122
34123
34124
34125
34126 func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
34127 c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34128 c.profileId = profileId
34129 c.floodlightactivitygroup = floodlightactivitygroup
34130 return c
34131 }
34132
34133
34134
34135
34136 func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
34137 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34138 return c
34139 }
34140
34141
34142
34143
34144 func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
34145 c.ctx_ = ctx
34146 return c
34147 }
34148
34149
34150
34151 func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
34152 if c.header_ == nil {
34153 c.header_ = make(http.Header)
34154 }
34155 return c.header_
34156 }
34157
34158 func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
34159 reqHeaders := make(http.Header)
34160 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34161 for k, v := range c.header_ {
34162 reqHeaders[k] = v
34163 }
34164 reqHeaders.Set("User-Agent", c.s.userAgent())
34165 var body io.Reader = nil
34166 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
34167 if err != nil {
34168 return nil, err
34169 }
34170 reqHeaders.Set("Content-Type", "application/json")
34171 c.urlParams_.Set("alt", alt)
34172 c.urlParams_.Set("prettyPrint", "false")
34173 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightActivityGroups")
34174 urls += "?" + c.urlParams_.Encode()
34175 req, err := http.NewRequest("PUT", urls, body)
34176 if err != nil {
34177 return nil, err
34178 }
34179 req.Header = reqHeaders
34180 googleapi.Expand(req.URL, map[string]string{
34181 "profileId": strconv.FormatInt(c.profileId, 10),
34182 })
34183 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34184 }
34185
34186
34187
34188
34189
34190
34191
34192
34193 func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
34194 gensupport.SetOptions(c.urlParams_, opts...)
34195 res, err := c.doRequest("json")
34196 if res != nil && res.StatusCode == http.StatusNotModified {
34197 if res.Body != nil {
34198 res.Body.Close()
34199 }
34200 return nil, &googleapi.Error{
34201 Code: res.StatusCode,
34202 Header: res.Header,
34203 }
34204 }
34205 if err != nil {
34206 return nil, err
34207 }
34208 defer googleapi.CloseBody(res)
34209 if err := googleapi.CheckResponse(res); err != nil {
34210 return nil, err
34211 }
34212 ret := &FloodlightActivityGroup{
34213 ServerResponse: googleapi.ServerResponse{
34214 Header: res.Header,
34215 HTTPStatusCode: res.StatusCode,
34216 },
34217 }
34218 target := &ret
34219 if err := gensupport.DecodeResponse(target, res); err != nil {
34220 return nil, err
34221 }
34222 return ret, nil
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252 }
34253
34254
34255
34256 type FloodlightConfigurationsGetCall struct {
34257 s *Service
34258 profileId int64
34259 id int64
34260 urlParams_ gensupport.URLParams
34261 ifNoneMatch_ string
34262 ctx_ context.Context
34263 header_ http.Header
34264 }
34265
34266
34267
34268
34269
34270 func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
34271 c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34272 c.profileId = profileId
34273 c.id = id
34274 return c
34275 }
34276
34277
34278
34279
34280 func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
34281 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34282 return c
34283 }
34284
34285
34286
34287
34288
34289
34290 func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
34291 c.ifNoneMatch_ = entityTag
34292 return c
34293 }
34294
34295
34296
34297
34298 func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
34299 c.ctx_ = ctx
34300 return c
34301 }
34302
34303
34304
34305 func (c *FloodlightConfigurationsGetCall) Header() http.Header {
34306 if c.header_ == nil {
34307 c.header_ = make(http.Header)
34308 }
34309 return c.header_
34310 }
34311
34312 func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
34313 reqHeaders := make(http.Header)
34314 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34315 for k, v := range c.header_ {
34316 reqHeaders[k] = v
34317 }
34318 reqHeaders.Set("User-Agent", c.s.userAgent())
34319 if c.ifNoneMatch_ != "" {
34320 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34321 }
34322 var body io.Reader = nil
34323 c.urlParams_.Set("alt", alt)
34324 c.urlParams_.Set("prettyPrint", "false")
34325 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations/{id}")
34326 urls += "?" + c.urlParams_.Encode()
34327 req, err := http.NewRequest("GET", urls, body)
34328 if err != nil {
34329 return nil, err
34330 }
34331 req.Header = reqHeaders
34332 googleapi.Expand(req.URL, map[string]string{
34333 "profileId": strconv.FormatInt(c.profileId, 10),
34334 "id": strconv.FormatInt(c.id, 10),
34335 })
34336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34337 }
34338
34339
34340
34341
34342
34343
34344
34345
34346 func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34347 gensupport.SetOptions(c.urlParams_, opts...)
34348 res, err := c.doRequest("json")
34349 if res != nil && res.StatusCode == http.StatusNotModified {
34350 if res.Body != nil {
34351 res.Body.Close()
34352 }
34353 return nil, &googleapi.Error{
34354 Code: res.StatusCode,
34355 Header: res.Header,
34356 }
34357 }
34358 if err != nil {
34359 return nil, err
34360 }
34361 defer googleapi.CloseBody(res)
34362 if err := googleapi.CheckResponse(res); err != nil {
34363 return nil, err
34364 }
34365 ret := &FloodlightConfiguration{
34366 ServerResponse: googleapi.ServerResponse{
34367 Header: res.Header,
34368 HTTPStatusCode: res.StatusCode,
34369 },
34370 }
34371 target := &ret
34372 if err := gensupport.DecodeResponse(target, res); err != nil {
34373 return nil, err
34374 }
34375 return ret, nil
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410 }
34411
34412
34413
34414 type FloodlightConfigurationsListCall struct {
34415 s *Service
34416 profileId int64
34417 urlParams_ gensupport.URLParams
34418 ifNoneMatch_ string
34419 ctx_ context.Context
34420 header_ http.Header
34421 }
34422
34423
34424
34425
34426
34427 func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
34428 c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34429 c.profileId = profileId
34430 return c
34431 }
34432
34433
34434
34435
34436 func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
34437 var ids_ []string
34438 for _, v := range ids {
34439 ids_ = append(ids_, fmt.Sprint(v))
34440 }
34441 c.urlParams_.SetMulti("ids", ids_)
34442 return c
34443 }
34444
34445
34446
34447
34448 func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
34449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34450 return c
34451 }
34452
34453
34454
34455
34456
34457
34458 func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
34459 c.ifNoneMatch_ = entityTag
34460 return c
34461 }
34462
34463
34464
34465
34466 func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
34467 c.ctx_ = ctx
34468 return c
34469 }
34470
34471
34472
34473 func (c *FloodlightConfigurationsListCall) Header() http.Header {
34474 if c.header_ == nil {
34475 c.header_ = make(http.Header)
34476 }
34477 return c.header_
34478 }
34479
34480 func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
34481 reqHeaders := make(http.Header)
34482 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34483 for k, v := range c.header_ {
34484 reqHeaders[k] = v
34485 }
34486 reqHeaders.Set("User-Agent", c.s.userAgent())
34487 if c.ifNoneMatch_ != "" {
34488 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34489 }
34490 var body io.Reader = nil
34491 c.urlParams_.Set("alt", alt)
34492 c.urlParams_.Set("prettyPrint", "false")
34493 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34494 urls += "?" + c.urlParams_.Encode()
34495 req, err := http.NewRequest("GET", urls, body)
34496 if err != nil {
34497 return nil, err
34498 }
34499 req.Header = reqHeaders
34500 googleapi.Expand(req.URL, map[string]string{
34501 "profileId": strconv.FormatInt(c.profileId, 10),
34502 })
34503 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34504 }
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514 func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
34515 gensupport.SetOptions(c.urlParams_, opts...)
34516 res, err := c.doRequest("json")
34517 if res != nil && res.StatusCode == http.StatusNotModified {
34518 if res.Body != nil {
34519 res.Body.Close()
34520 }
34521 return nil, &googleapi.Error{
34522 Code: res.StatusCode,
34523 Header: res.Header,
34524 }
34525 }
34526 if err != nil {
34527 return nil, err
34528 }
34529 defer googleapi.CloseBody(res)
34530 if err := googleapi.CheckResponse(res); err != nil {
34531 return nil, err
34532 }
34533 ret := &FloodlightConfigurationsListResponse{
34534 ServerResponse: googleapi.ServerResponse{
34535 Header: res.Header,
34536 HTTPStatusCode: res.StatusCode,
34537 },
34538 }
34539 target := &ret
34540 if err := gensupport.DecodeResponse(target, res); err != nil {
34541 return nil, err
34542 }
34543 return ret, nil
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577 }
34578
34579
34580
34581 type FloodlightConfigurationsPatchCall struct {
34582 s *Service
34583 profileId int64
34584 floodlightconfiguration *FloodlightConfiguration
34585 urlParams_ gensupport.URLParams
34586 ctx_ context.Context
34587 header_ http.Header
34588 }
34589
34590
34591
34592
34593
34594
34595 func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
34596 c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34597 c.profileId = profileId
34598 c.urlParams_.Set("id", fmt.Sprint(id))
34599 c.floodlightconfiguration = floodlightconfiguration
34600 return c
34601 }
34602
34603
34604
34605
34606 func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
34607 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34608 return c
34609 }
34610
34611
34612
34613
34614 func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
34615 c.ctx_ = ctx
34616 return c
34617 }
34618
34619
34620
34621 func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
34622 if c.header_ == nil {
34623 c.header_ = make(http.Header)
34624 }
34625 return c.header_
34626 }
34627
34628 func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
34629 reqHeaders := make(http.Header)
34630 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34631 for k, v := range c.header_ {
34632 reqHeaders[k] = v
34633 }
34634 reqHeaders.Set("User-Agent", c.s.userAgent())
34635 var body io.Reader = nil
34636 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34637 if err != nil {
34638 return nil, err
34639 }
34640 reqHeaders.Set("Content-Type", "application/json")
34641 c.urlParams_.Set("alt", alt)
34642 c.urlParams_.Set("prettyPrint", "false")
34643 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34644 urls += "?" + c.urlParams_.Encode()
34645 req, err := http.NewRequest("PATCH", urls, body)
34646 if err != nil {
34647 return nil, err
34648 }
34649 req.Header = reqHeaders
34650 googleapi.Expand(req.URL, map[string]string{
34651 "profileId": strconv.FormatInt(c.profileId, 10),
34652 })
34653 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34654 }
34655
34656
34657
34658
34659
34660
34661
34662
34663 func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34664 gensupport.SetOptions(c.urlParams_, opts...)
34665 res, err := c.doRequest("json")
34666 if res != nil && res.StatusCode == http.StatusNotModified {
34667 if res.Body != nil {
34668 res.Body.Close()
34669 }
34670 return nil, &googleapi.Error{
34671 Code: res.StatusCode,
34672 Header: res.Header,
34673 }
34674 }
34675 if err != nil {
34676 return nil, err
34677 }
34678 defer googleapi.CloseBody(res)
34679 if err := googleapi.CheckResponse(res); err != nil {
34680 return nil, err
34681 }
34682 ret := &FloodlightConfiguration{
34683 ServerResponse: googleapi.ServerResponse{
34684 Header: res.Header,
34685 HTTPStatusCode: res.StatusCode,
34686 },
34687 }
34688 target := &ret
34689 if err := gensupport.DecodeResponse(target, res); err != nil {
34690 return nil, err
34691 }
34692 return ret, nil
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730 }
34731
34732
34733
34734 type FloodlightConfigurationsUpdateCall struct {
34735 s *Service
34736 profileId int64
34737 floodlightconfiguration *FloodlightConfiguration
34738 urlParams_ gensupport.URLParams
34739 ctx_ context.Context
34740 header_ http.Header
34741 }
34742
34743
34744
34745
34746 func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
34747 c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34748 c.profileId = profileId
34749 c.floodlightconfiguration = floodlightconfiguration
34750 return c
34751 }
34752
34753
34754
34755
34756 func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
34757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34758 return c
34759 }
34760
34761
34762
34763
34764 func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
34765 c.ctx_ = ctx
34766 return c
34767 }
34768
34769
34770
34771 func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
34772 if c.header_ == nil {
34773 c.header_ = make(http.Header)
34774 }
34775 return c.header_
34776 }
34777
34778 func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
34779 reqHeaders := make(http.Header)
34780 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34781 for k, v := range c.header_ {
34782 reqHeaders[k] = v
34783 }
34784 reqHeaders.Set("User-Agent", c.s.userAgent())
34785 var body io.Reader = nil
34786 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
34787 if err != nil {
34788 return nil, err
34789 }
34790 reqHeaders.Set("Content-Type", "application/json")
34791 c.urlParams_.Set("alt", alt)
34792 c.urlParams_.Set("prettyPrint", "false")
34793 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/floodlightConfigurations")
34794 urls += "?" + c.urlParams_.Encode()
34795 req, err := http.NewRequest("PUT", urls, body)
34796 if err != nil {
34797 return nil, err
34798 }
34799 req.Header = reqHeaders
34800 googleapi.Expand(req.URL, map[string]string{
34801 "profileId": strconv.FormatInt(c.profileId, 10),
34802 })
34803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34804 }
34805
34806
34807
34808
34809
34810
34811
34812
34813 func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
34814 gensupport.SetOptions(c.urlParams_, opts...)
34815 res, err := c.doRequest("json")
34816 if res != nil && res.StatusCode == http.StatusNotModified {
34817 if res.Body != nil {
34818 res.Body.Close()
34819 }
34820 return nil, &googleapi.Error{
34821 Code: res.StatusCode,
34822 Header: res.Header,
34823 }
34824 }
34825 if err != nil {
34826 return nil, err
34827 }
34828 defer googleapi.CloseBody(res)
34829 if err := googleapi.CheckResponse(res); err != nil {
34830 return nil, err
34831 }
34832 ret := &FloodlightConfiguration{
34833 ServerResponse: googleapi.ServerResponse{
34834 Header: res.Header,
34835 HTTPStatusCode: res.StatusCode,
34836 },
34837 }
34838 target := &ret
34839 if err := gensupport.DecodeResponse(target, res); err != nil {
34840 return nil, err
34841 }
34842 return ret, nil
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872 }
34873
34874
34875
34876 type InventoryItemsGetCall struct {
34877 s *Service
34878 profileId int64
34879 projectId int64
34880 id int64
34881 urlParams_ gensupport.URLParams
34882 ifNoneMatch_ string
34883 ctx_ context.Context
34884 header_ http.Header
34885 }
34886
34887
34888
34889
34890
34891
34892 func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
34893 c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34894 c.profileId = profileId
34895 c.projectId = projectId
34896 c.id = id
34897 return c
34898 }
34899
34900
34901
34902
34903 func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
34904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34905 return c
34906 }
34907
34908
34909
34910
34911
34912
34913 func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
34914 c.ifNoneMatch_ = entityTag
34915 return c
34916 }
34917
34918
34919
34920
34921 func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
34922 c.ctx_ = ctx
34923 return c
34924 }
34925
34926
34927
34928 func (c *InventoryItemsGetCall) Header() http.Header {
34929 if c.header_ == nil {
34930 c.header_ = make(http.Header)
34931 }
34932 return c.header_
34933 }
34934
34935 func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
34936 reqHeaders := make(http.Header)
34937 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
34938 for k, v := range c.header_ {
34939 reqHeaders[k] = v
34940 }
34941 reqHeaders.Set("User-Agent", c.s.userAgent())
34942 if c.ifNoneMatch_ != "" {
34943 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34944 }
34945 var body io.Reader = nil
34946 c.urlParams_.Set("alt", alt)
34947 c.urlParams_.Set("prettyPrint", "false")
34948 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}")
34949 urls += "?" + c.urlParams_.Encode()
34950 req, err := http.NewRequest("GET", urls, body)
34951 if err != nil {
34952 return nil, err
34953 }
34954 req.Header = reqHeaders
34955 googleapi.Expand(req.URL, map[string]string{
34956 "profileId": strconv.FormatInt(c.profileId, 10),
34957 "projectId": strconv.FormatInt(c.projectId, 10),
34958 "id": strconv.FormatInt(c.id, 10),
34959 })
34960 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34961 }
34962
34963
34964
34965
34966
34967
34968
34969
34970 func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
34971 gensupport.SetOptions(c.urlParams_, opts...)
34972 res, err := c.doRequest("json")
34973 if res != nil && res.StatusCode == http.StatusNotModified {
34974 if res.Body != nil {
34975 res.Body.Close()
34976 }
34977 return nil, &googleapi.Error{
34978 Code: res.StatusCode,
34979 Header: res.Header,
34980 }
34981 }
34982 if err != nil {
34983 return nil, err
34984 }
34985 defer googleapi.CloseBody(res)
34986 if err := googleapi.CheckResponse(res); err != nil {
34987 return nil, err
34988 }
34989 ret := &InventoryItem{
34990 ServerResponse: googleapi.ServerResponse{
34991 Header: res.Header,
34992 HTTPStatusCode: res.StatusCode,
34993 },
34994 }
34995 target := &ret
34996 if err := gensupport.DecodeResponse(target, res); err != nil {
34997 return nil, err
34998 }
34999 return ret, nil
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042 }
35043
35044
35045
35046 type InventoryItemsListCall struct {
35047 s *Service
35048 profileId int64
35049 projectId int64
35050 urlParams_ gensupport.URLParams
35051 ifNoneMatch_ string
35052 ctx_ context.Context
35053 header_ http.Header
35054 }
35055
35056
35057
35058
35059
35060
35061 func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
35062 c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35063 c.profileId = profileId
35064 c.projectId = projectId
35065 return c
35066 }
35067
35068
35069
35070 func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
35071 var ids_ []string
35072 for _, v := range ids {
35073 ids_ = append(ids_, fmt.Sprint(v))
35074 }
35075 c.urlParams_.SetMulti("ids", ids_)
35076 return c
35077 }
35078
35079
35080
35081 func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
35082 c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
35083 return c
35084 }
35085
35086
35087
35088 func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
35089 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35090 return c
35091 }
35092
35093
35094
35095 func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
35096 var orderId_ []string
35097 for _, v := range orderId {
35098 orderId_ = append(orderId_, fmt.Sprint(v))
35099 }
35100 c.urlParams_.SetMulti("orderId", orderId_)
35101 return c
35102 }
35103
35104
35105
35106 func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
35107 c.urlParams_.Set("pageToken", pageToken)
35108 return c
35109 }
35110
35111
35112
35113 func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
35114 var siteId_ []string
35115 for _, v := range siteId {
35116 siteId_ = append(siteId_, fmt.Sprint(v))
35117 }
35118 c.urlParams_.SetMulti("siteId", siteId_)
35119 return c
35120 }
35121
35122
35123
35124
35125
35126
35127
35128
35129 func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
35130 c.urlParams_.Set("sortField", sortField)
35131 return c
35132 }
35133
35134
35135
35136
35137
35138
35139
35140
35141 func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
35142 c.urlParams_.Set("sortOrder", sortOrder)
35143 return c
35144 }
35145
35146
35147
35148
35149
35150
35151
35152
35153 func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
35154 c.urlParams_.Set("type", type_)
35155 return c
35156 }
35157
35158
35159
35160
35161 func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
35162 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35163 return c
35164 }
35165
35166
35167
35168
35169
35170
35171 func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
35172 c.ifNoneMatch_ = entityTag
35173 return c
35174 }
35175
35176
35177
35178
35179 func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
35180 c.ctx_ = ctx
35181 return c
35182 }
35183
35184
35185
35186 func (c *InventoryItemsListCall) Header() http.Header {
35187 if c.header_ == nil {
35188 c.header_ = make(http.Header)
35189 }
35190 return c.header_
35191 }
35192
35193 func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
35194 reqHeaders := make(http.Header)
35195 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
35196 for k, v := range c.header_ {
35197 reqHeaders[k] = v
35198 }
35199 reqHeaders.Set("User-Agent", c.s.userAgent())
35200 if c.ifNoneMatch_ != "" {
35201 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35202 }
35203 var body io.Reader = nil
35204 c.urlParams_.Set("alt", alt)
35205 c.urlParams_.Set("prettyPrint", "false")
35206 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/inventoryItems")
35207 urls += "?" + c.urlParams_.Encode()
35208 req, err := http.NewRequest("GET", urls, body)
35209 if err != nil {
35210 return nil, err
35211 }
35212 req.Header = reqHeaders
35213 googleapi.Expand(req.URL, map[string]string{
35214 "profileId": strconv.FormatInt(c.profileId, 10),
35215 "projectId": strconv.FormatInt(c.projectId, 10),
35216 })
35217 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35218 }
35219
35220
35221
35222
35223
35224
35225
35226
35227 func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
35228 gensupport.SetOptions(c.urlParams_, opts...)
35229 res, err := c.doRequest("json")
35230 if res != nil && res.StatusCode == http.StatusNotModified {
35231 if res.Body != nil {
35232 res.Body.Close()
35233 }
35234 return nil, &googleapi.Error{
35235 Code: res.StatusCode,
35236 Header: res.Header,
35237 }
35238 }
35239 if err != nil {
35240 return nil, err
35241 }
35242 defer googleapi.CloseBody(res)
35243 if err := googleapi.CheckResponse(res); err != nil {
35244 return nil, err
35245 }
35246 ret := &InventoryItemsListResponse{
35247 ServerResponse: googleapi.ServerResponse{
35248 Header: res.Header,
35249 HTTPStatusCode: res.StatusCode,
35250 },
35251 }
35252 target := &ret
35253 if err := gensupport.DecodeResponse(target, res); err != nil {
35254 return nil, err
35255 }
35256 return ret, nil
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372 }
35373
35374
35375
35376
35377 func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
35378 c.ctx_ = ctx
35379 defer c.PageToken(c.urlParams_.Get("pageToken"))
35380 for {
35381 x, err := c.Do()
35382 if err != nil {
35383 return err
35384 }
35385 if err := f(x); err != nil {
35386 return err
35387 }
35388 if x.NextPageToken == "" {
35389 return nil
35390 }
35391 c.PageToken(x.NextPageToken)
35392 }
35393 }
35394
35395
35396
35397 type LanguagesListCall struct {
35398 s *Service
35399 profileId int64
35400 urlParams_ gensupport.URLParams
35401 ifNoneMatch_ string
35402 ctx_ context.Context
35403 header_ http.Header
35404 }
35405
35406
35407
35408
35409 func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
35410 c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35411 c.profileId = profileId
35412 return c
35413 }
35414
35415
35416
35417
35418 func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
35419 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35420 return c
35421 }
35422
35423
35424
35425
35426
35427
35428 func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
35429 c.ifNoneMatch_ = entityTag
35430 return c
35431 }
35432
35433
35434
35435
35436 func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
35437 c.ctx_ = ctx
35438 return c
35439 }
35440
35441
35442
35443 func (c *LanguagesListCall) Header() http.Header {
35444 if c.header_ == nil {
35445 c.header_ = make(http.Header)
35446 }
35447 return c.header_
35448 }
35449
35450 func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
35451 reqHeaders := make(http.Header)
35452 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
35453 for k, v := range c.header_ {
35454 reqHeaders[k] = v
35455 }
35456 reqHeaders.Set("User-Agent", c.s.userAgent())
35457 if c.ifNoneMatch_ != "" {
35458 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35459 }
35460 var body io.Reader = nil
35461 c.urlParams_.Set("alt", alt)
35462 c.urlParams_.Set("prettyPrint", "false")
35463 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/languages")
35464 urls += "?" + c.urlParams_.Encode()
35465 req, err := http.NewRequest("GET", urls, body)
35466 if err != nil {
35467 return nil, err
35468 }
35469 req.Header = reqHeaders
35470 googleapi.Expand(req.URL, map[string]string{
35471 "profileId": strconv.FormatInt(c.profileId, 10),
35472 })
35473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35474 }
35475
35476
35477
35478
35479
35480
35481
35482
35483 func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
35484 gensupport.SetOptions(c.urlParams_, opts...)
35485 res, err := c.doRequest("json")
35486 if res != nil && res.StatusCode == http.StatusNotModified {
35487 if res.Body != nil {
35488 res.Body.Close()
35489 }
35490 return nil, &googleapi.Error{
35491 Code: res.StatusCode,
35492 Header: res.Header,
35493 }
35494 }
35495 if err != nil {
35496 return nil, err
35497 }
35498 defer googleapi.CloseBody(res)
35499 if err := googleapi.CheckResponse(res); err != nil {
35500 return nil, err
35501 }
35502 ret := &LanguagesListResponse{
35503 ServerResponse: googleapi.ServerResponse{
35504 Header: res.Header,
35505 HTTPStatusCode: res.StatusCode,
35506 },
35507 }
35508 target := &ret
35509 if err := gensupport.DecodeResponse(target, res); err != nil {
35510 return nil, err
35511 }
35512 return ret, nil
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539 }
35540
35541
35542
35543 type MetrosListCall struct {
35544 s *Service
35545 profileId int64
35546 urlParams_ gensupport.URLParams
35547 ifNoneMatch_ string
35548 ctx_ context.Context
35549 header_ http.Header
35550 }
35551
35552
35553
35554
35555 func (r *MetrosService) List(profileId int64) *MetrosListCall {
35556 c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35557 c.profileId = profileId
35558 return c
35559 }
35560
35561
35562
35563
35564 func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
35565 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35566 return c
35567 }
35568
35569
35570
35571
35572
35573
35574 func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
35575 c.ifNoneMatch_ = entityTag
35576 return c
35577 }
35578
35579
35580
35581
35582 func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
35583 c.ctx_ = ctx
35584 return c
35585 }
35586
35587
35588
35589 func (c *MetrosListCall) Header() http.Header {
35590 if c.header_ == nil {
35591 c.header_ = make(http.Header)
35592 }
35593 return c.header_
35594 }
35595
35596 func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
35597 reqHeaders := make(http.Header)
35598 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
35599 for k, v := range c.header_ {
35600 reqHeaders[k] = v
35601 }
35602 reqHeaders.Set("User-Agent", c.s.userAgent())
35603 if c.ifNoneMatch_ != "" {
35604 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35605 }
35606 var body io.Reader = nil
35607 c.urlParams_.Set("alt", alt)
35608 c.urlParams_.Set("prettyPrint", "false")
35609 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/metros")
35610 urls += "?" + c.urlParams_.Encode()
35611 req, err := http.NewRequest("GET", urls, body)
35612 if err != nil {
35613 return nil, err
35614 }
35615 req.Header = reqHeaders
35616 googleapi.Expand(req.URL, map[string]string{
35617 "profileId": strconv.FormatInt(c.profileId, 10),
35618 })
35619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35620 }
35621
35622
35623
35624
35625
35626
35627
35628
35629 func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
35630 gensupport.SetOptions(c.urlParams_, opts...)
35631 res, err := c.doRequest("json")
35632 if res != nil && res.StatusCode == http.StatusNotModified {
35633 if res.Body != nil {
35634 res.Body.Close()
35635 }
35636 return nil, &googleapi.Error{
35637 Code: res.StatusCode,
35638 Header: res.Header,
35639 }
35640 }
35641 if err != nil {
35642 return nil, err
35643 }
35644 defer googleapi.CloseBody(res)
35645 if err := googleapi.CheckResponse(res); err != nil {
35646 return nil, err
35647 }
35648 ret := &MetrosListResponse{
35649 ServerResponse: googleapi.ServerResponse{
35650 Header: res.Header,
35651 HTTPStatusCode: res.StatusCode,
35652 },
35653 }
35654 target := &ret
35655 if err := gensupport.DecodeResponse(target, res); err != nil {
35656 return nil, err
35657 }
35658 return ret, nil
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685 }
35686
35687
35688
35689 type MobileAppsGetCall struct {
35690 s *Service
35691 profileId int64
35692 id string
35693 urlParams_ gensupport.URLParams
35694 ifNoneMatch_ string
35695 ctx_ context.Context
35696 header_ http.Header
35697 }
35698
35699
35700
35701
35702
35703 func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
35704 c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35705 c.profileId = profileId
35706 c.id = id
35707 return c
35708 }
35709
35710
35711
35712
35713 func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
35714 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35715 return c
35716 }
35717
35718
35719
35720
35721
35722
35723 func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
35724 c.ifNoneMatch_ = entityTag
35725 return c
35726 }
35727
35728
35729
35730
35731 func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
35732 c.ctx_ = ctx
35733 return c
35734 }
35735
35736
35737
35738 func (c *MobileAppsGetCall) Header() http.Header {
35739 if c.header_ == nil {
35740 c.header_ = make(http.Header)
35741 }
35742 return c.header_
35743 }
35744
35745 func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
35746 reqHeaders := make(http.Header)
35747 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
35748 for k, v := range c.header_ {
35749 reqHeaders[k] = v
35750 }
35751 reqHeaders.Set("User-Agent", c.s.userAgent())
35752 if c.ifNoneMatch_ != "" {
35753 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35754 }
35755 var body io.Reader = nil
35756 c.urlParams_.Set("alt", alt)
35757 c.urlParams_.Set("prettyPrint", "false")
35758 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps/{id}")
35759 urls += "?" + c.urlParams_.Encode()
35760 req, err := http.NewRequest("GET", urls, body)
35761 if err != nil {
35762 return nil, err
35763 }
35764 req.Header = reqHeaders
35765 googleapi.Expand(req.URL, map[string]string{
35766 "profileId": strconv.FormatInt(c.profileId, 10),
35767 "id": c.id,
35768 })
35769 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35770 }
35771
35772
35773
35774
35775
35776
35777
35778
35779 func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
35780 gensupport.SetOptions(c.urlParams_, opts...)
35781 res, err := c.doRequest("json")
35782 if res != nil && res.StatusCode == http.StatusNotModified {
35783 if res.Body != nil {
35784 res.Body.Close()
35785 }
35786 return nil, &googleapi.Error{
35787 Code: res.StatusCode,
35788 Header: res.Header,
35789 }
35790 }
35791 if err != nil {
35792 return nil, err
35793 }
35794 defer googleapi.CloseBody(res)
35795 if err := googleapi.CheckResponse(res); err != nil {
35796 return nil, err
35797 }
35798 ret := &MobileApp{
35799 ServerResponse: googleapi.ServerResponse{
35800 Header: res.Header,
35801 HTTPStatusCode: res.StatusCode,
35802 },
35803 }
35804 target := &ret
35805 if err := gensupport.DecodeResponse(target, res); err != nil {
35806 return nil, err
35807 }
35808 return ret, nil
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842 }
35843
35844
35845
35846 type MobileAppsListCall struct {
35847 s *Service
35848 profileId int64
35849 urlParams_ gensupport.URLParams
35850 ifNoneMatch_ string
35851 ctx_ context.Context
35852 header_ http.Header
35853 }
35854
35855
35856
35857
35858 func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
35859 c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35860 c.profileId = profileId
35861 return c
35862 }
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872 func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
35873 c.urlParams_.SetMulti("directories", append([]string{}, directories...))
35874 return c
35875 }
35876
35877
35878
35879 func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
35880 c.urlParams_.SetMulti("ids", append([]string{}, ids...))
35881 return c
35882 }
35883
35884
35885
35886 func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
35887 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35888 return c
35889 }
35890
35891
35892
35893 func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
35894 c.urlParams_.Set("pageToken", pageToken)
35895 return c
35896 }
35897
35898
35899
35900
35901
35902
35903
35904
35905 func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
35906 c.urlParams_.Set("searchString", searchString)
35907 return c
35908 }
35909
35910
35911
35912
35913 func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
35914 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35915 return c
35916 }
35917
35918
35919
35920
35921
35922
35923 func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
35924 c.ifNoneMatch_ = entityTag
35925 return c
35926 }
35927
35928
35929
35930
35931 func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
35932 c.ctx_ = ctx
35933 return c
35934 }
35935
35936
35937
35938 func (c *MobileAppsListCall) Header() http.Header {
35939 if c.header_ == nil {
35940 c.header_ = make(http.Header)
35941 }
35942 return c.header_
35943 }
35944
35945 func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
35946 reqHeaders := make(http.Header)
35947 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
35948 for k, v := range c.header_ {
35949 reqHeaders[k] = v
35950 }
35951 reqHeaders.Set("User-Agent", c.s.userAgent())
35952 if c.ifNoneMatch_ != "" {
35953 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35954 }
35955 var body io.Reader = nil
35956 c.urlParams_.Set("alt", alt)
35957 c.urlParams_.Set("prettyPrint", "false")
35958 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileApps")
35959 urls += "?" + c.urlParams_.Encode()
35960 req, err := http.NewRequest("GET", urls, body)
35961 if err != nil {
35962 return nil, err
35963 }
35964 req.Header = reqHeaders
35965 googleapi.Expand(req.URL, map[string]string{
35966 "profileId": strconv.FormatInt(c.profileId, 10),
35967 })
35968 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35969 }
35970
35971
35972
35973
35974
35975
35976
35977
35978 func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
35979 gensupport.SetOptions(c.urlParams_, opts...)
35980 res, err := c.doRequest("json")
35981 if res != nil && res.StatusCode == http.StatusNotModified {
35982 if res.Body != nil {
35983 res.Body.Close()
35984 }
35985 return nil, &googleapi.Error{
35986 Code: res.StatusCode,
35987 Header: res.Header,
35988 }
35989 }
35990 if err != nil {
35991 return nil, err
35992 }
35993 defer googleapi.CloseBody(res)
35994 if err := googleapi.CheckResponse(res); err != nil {
35995 return nil, err
35996 }
35997 ret := &MobileAppsListResponse{
35998 ServerResponse: googleapi.ServerResponse{
35999 Header: res.Header,
36000 HTTPStatusCode: res.StatusCode,
36001 },
36002 }
36003 target := &ret
36004 if err := gensupport.DecodeResponse(target, res); err != nil {
36005 return nil, err
36006 }
36007 return ret, nil
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075 }
36076
36077
36078
36079
36080 func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
36081 c.ctx_ = ctx
36082 defer c.PageToken(c.urlParams_.Get("pageToken"))
36083 for {
36084 x, err := c.Do()
36085 if err != nil {
36086 return err
36087 }
36088 if err := f(x); err != nil {
36089 return err
36090 }
36091 if x.NextPageToken == "" {
36092 return nil
36093 }
36094 c.PageToken(x.NextPageToken)
36095 }
36096 }
36097
36098
36099
36100 type MobileCarriersGetCall struct {
36101 s *Service
36102 profileId int64
36103 id int64
36104 urlParams_ gensupport.URLParams
36105 ifNoneMatch_ string
36106 ctx_ context.Context
36107 header_ http.Header
36108 }
36109
36110
36111
36112
36113
36114 func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
36115 c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36116 c.profileId = profileId
36117 c.id = id
36118 return c
36119 }
36120
36121
36122
36123
36124 func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
36125 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36126 return c
36127 }
36128
36129
36130
36131
36132
36133
36134 func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
36135 c.ifNoneMatch_ = entityTag
36136 return c
36137 }
36138
36139
36140
36141
36142 func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
36143 c.ctx_ = ctx
36144 return c
36145 }
36146
36147
36148
36149 func (c *MobileCarriersGetCall) Header() http.Header {
36150 if c.header_ == nil {
36151 c.header_ = make(http.Header)
36152 }
36153 return c.header_
36154 }
36155
36156 func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
36157 reqHeaders := make(http.Header)
36158 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36159 for k, v := range c.header_ {
36160 reqHeaders[k] = v
36161 }
36162 reqHeaders.Set("User-Agent", c.s.userAgent())
36163 if c.ifNoneMatch_ != "" {
36164 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36165 }
36166 var body io.Reader = nil
36167 c.urlParams_.Set("alt", alt)
36168 c.urlParams_.Set("prettyPrint", "false")
36169 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers/{id}")
36170 urls += "?" + c.urlParams_.Encode()
36171 req, err := http.NewRequest("GET", urls, body)
36172 if err != nil {
36173 return nil, err
36174 }
36175 req.Header = reqHeaders
36176 googleapi.Expand(req.URL, map[string]string{
36177 "profileId": strconv.FormatInt(c.profileId, 10),
36178 "id": strconv.FormatInt(c.id, 10),
36179 })
36180 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36181 }
36182
36183
36184
36185
36186
36187
36188
36189
36190 func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
36191 gensupport.SetOptions(c.urlParams_, opts...)
36192 res, err := c.doRequest("json")
36193 if res != nil && res.StatusCode == http.StatusNotModified {
36194 if res.Body != nil {
36195 res.Body.Close()
36196 }
36197 return nil, &googleapi.Error{
36198 Code: res.StatusCode,
36199 Header: res.Header,
36200 }
36201 }
36202 if err != nil {
36203 return nil, err
36204 }
36205 defer googleapi.CloseBody(res)
36206 if err := googleapi.CheckResponse(res); err != nil {
36207 return nil, err
36208 }
36209 ret := &MobileCarrier{
36210 ServerResponse: googleapi.ServerResponse{
36211 Header: res.Header,
36212 HTTPStatusCode: res.StatusCode,
36213 },
36214 }
36215 target := &ret
36216 if err := gensupport.DecodeResponse(target, res); err != nil {
36217 return nil, err
36218 }
36219 return ret, nil
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254 }
36255
36256
36257
36258 type MobileCarriersListCall struct {
36259 s *Service
36260 profileId int64
36261 urlParams_ gensupport.URLParams
36262 ifNoneMatch_ string
36263 ctx_ context.Context
36264 header_ http.Header
36265 }
36266
36267
36268
36269
36270 func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
36271 c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36272 c.profileId = profileId
36273 return c
36274 }
36275
36276
36277
36278
36279 func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
36280 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36281 return c
36282 }
36283
36284
36285
36286
36287
36288
36289 func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
36290 c.ifNoneMatch_ = entityTag
36291 return c
36292 }
36293
36294
36295
36296
36297 func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
36298 c.ctx_ = ctx
36299 return c
36300 }
36301
36302
36303
36304 func (c *MobileCarriersListCall) Header() http.Header {
36305 if c.header_ == nil {
36306 c.header_ = make(http.Header)
36307 }
36308 return c.header_
36309 }
36310
36311 func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
36312 reqHeaders := make(http.Header)
36313 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36314 for k, v := range c.header_ {
36315 reqHeaders[k] = v
36316 }
36317 reqHeaders.Set("User-Agent", c.s.userAgent())
36318 if c.ifNoneMatch_ != "" {
36319 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36320 }
36321 var body io.Reader = nil
36322 c.urlParams_.Set("alt", alt)
36323 c.urlParams_.Set("prettyPrint", "false")
36324 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/mobileCarriers")
36325 urls += "?" + c.urlParams_.Encode()
36326 req, err := http.NewRequest("GET", urls, body)
36327 if err != nil {
36328 return nil, err
36329 }
36330 req.Header = reqHeaders
36331 googleapi.Expand(req.URL, map[string]string{
36332 "profileId": strconv.FormatInt(c.profileId, 10),
36333 })
36334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36335 }
36336
36337
36338
36339
36340
36341
36342
36343
36344 func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
36345 gensupport.SetOptions(c.urlParams_, opts...)
36346 res, err := c.doRequest("json")
36347 if res != nil && res.StatusCode == http.StatusNotModified {
36348 if res.Body != nil {
36349 res.Body.Close()
36350 }
36351 return nil, &googleapi.Error{
36352 Code: res.StatusCode,
36353 Header: res.Header,
36354 }
36355 }
36356 if err != nil {
36357 return nil, err
36358 }
36359 defer googleapi.CloseBody(res)
36360 if err := googleapi.CheckResponse(res); err != nil {
36361 return nil, err
36362 }
36363 ret := &MobileCarriersListResponse{
36364 ServerResponse: googleapi.ServerResponse{
36365 Header: res.Header,
36366 HTTPStatusCode: res.StatusCode,
36367 },
36368 }
36369 target := &ret
36370 if err := gensupport.DecodeResponse(target, res); err != nil {
36371 return nil, err
36372 }
36373 return ret, nil
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400 }
36401
36402
36403
36404 type OperatingSystemVersionsGetCall struct {
36405 s *Service
36406 profileId int64
36407 id int64
36408 urlParams_ gensupport.URLParams
36409 ifNoneMatch_ string
36410 ctx_ context.Context
36411 header_ http.Header
36412 }
36413
36414
36415
36416
36417
36418 func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
36419 c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36420 c.profileId = profileId
36421 c.id = id
36422 return c
36423 }
36424
36425
36426
36427
36428 func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
36429 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36430 return c
36431 }
36432
36433
36434
36435
36436
36437
36438 func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
36439 c.ifNoneMatch_ = entityTag
36440 return c
36441 }
36442
36443
36444
36445
36446 func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
36447 c.ctx_ = ctx
36448 return c
36449 }
36450
36451
36452
36453 func (c *OperatingSystemVersionsGetCall) Header() http.Header {
36454 if c.header_ == nil {
36455 c.header_ = make(http.Header)
36456 }
36457 return c.header_
36458 }
36459
36460 func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
36461 reqHeaders := make(http.Header)
36462 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36463 for k, v := range c.header_ {
36464 reqHeaders[k] = v
36465 }
36466 reqHeaders.Set("User-Agent", c.s.userAgent())
36467 if c.ifNoneMatch_ != "" {
36468 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36469 }
36470 var body io.Reader = nil
36471 c.urlParams_.Set("alt", alt)
36472 c.urlParams_.Set("prettyPrint", "false")
36473 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions/{id}")
36474 urls += "?" + c.urlParams_.Encode()
36475 req, err := http.NewRequest("GET", urls, body)
36476 if err != nil {
36477 return nil, err
36478 }
36479 req.Header = reqHeaders
36480 googleapi.Expand(req.URL, map[string]string{
36481 "profileId": strconv.FormatInt(c.profileId, 10),
36482 "id": strconv.FormatInt(c.id, 10),
36483 })
36484 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36485 }
36486
36487
36488
36489
36490
36491
36492
36493
36494 func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
36495 gensupport.SetOptions(c.urlParams_, opts...)
36496 res, err := c.doRequest("json")
36497 if res != nil && res.StatusCode == http.StatusNotModified {
36498 if res.Body != nil {
36499 res.Body.Close()
36500 }
36501 return nil, &googleapi.Error{
36502 Code: res.StatusCode,
36503 Header: res.Header,
36504 }
36505 }
36506 if err != nil {
36507 return nil, err
36508 }
36509 defer googleapi.CloseBody(res)
36510 if err := googleapi.CheckResponse(res); err != nil {
36511 return nil, err
36512 }
36513 ret := &OperatingSystemVersion{
36514 ServerResponse: googleapi.ServerResponse{
36515 Header: res.Header,
36516 HTTPStatusCode: res.StatusCode,
36517 },
36518 }
36519 target := &ret
36520 if err := gensupport.DecodeResponse(target, res); err != nil {
36521 return nil, err
36522 }
36523 return ret, nil
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558 }
36559
36560
36561
36562 type OperatingSystemVersionsListCall struct {
36563 s *Service
36564 profileId int64
36565 urlParams_ gensupport.URLParams
36566 ifNoneMatch_ string
36567 ctx_ context.Context
36568 header_ http.Header
36569 }
36570
36571
36572
36573
36574 func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
36575 c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36576 c.profileId = profileId
36577 return c
36578 }
36579
36580
36581
36582
36583 func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
36584 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36585 return c
36586 }
36587
36588
36589
36590
36591
36592
36593 func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
36594 c.ifNoneMatch_ = entityTag
36595 return c
36596 }
36597
36598
36599
36600
36601 func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
36602 c.ctx_ = ctx
36603 return c
36604 }
36605
36606
36607
36608 func (c *OperatingSystemVersionsListCall) Header() http.Header {
36609 if c.header_ == nil {
36610 c.header_ = make(http.Header)
36611 }
36612 return c.header_
36613 }
36614
36615 func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
36616 reqHeaders := make(http.Header)
36617 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36618 for k, v := range c.header_ {
36619 reqHeaders[k] = v
36620 }
36621 reqHeaders.Set("User-Agent", c.s.userAgent())
36622 if c.ifNoneMatch_ != "" {
36623 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36624 }
36625 var body io.Reader = nil
36626 c.urlParams_.Set("alt", alt)
36627 c.urlParams_.Set("prettyPrint", "false")
36628 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystemVersions")
36629 urls += "?" + c.urlParams_.Encode()
36630 req, err := http.NewRequest("GET", urls, body)
36631 if err != nil {
36632 return nil, err
36633 }
36634 req.Header = reqHeaders
36635 googleapi.Expand(req.URL, map[string]string{
36636 "profileId": strconv.FormatInt(c.profileId, 10),
36637 })
36638 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36639 }
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649 func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
36650 gensupport.SetOptions(c.urlParams_, opts...)
36651 res, err := c.doRequest("json")
36652 if res != nil && res.StatusCode == http.StatusNotModified {
36653 if res.Body != nil {
36654 res.Body.Close()
36655 }
36656 return nil, &googleapi.Error{
36657 Code: res.StatusCode,
36658 Header: res.Header,
36659 }
36660 }
36661 if err != nil {
36662 return nil, err
36663 }
36664 defer googleapi.CloseBody(res)
36665 if err := googleapi.CheckResponse(res); err != nil {
36666 return nil, err
36667 }
36668 ret := &OperatingSystemVersionsListResponse{
36669 ServerResponse: googleapi.ServerResponse{
36670 Header: res.Header,
36671 HTTPStatusCode: res.StatusCode,
36672 },
36673 }
36674 target := &ret
36675 if err := gensupport.DecodeResponse(target, res); err != nil {
36676 return nil, err
36677 }
36678 return ret, nil
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705 }
36706
36707
36708
36709 type OperatingSystemsGetCall struct {
36710 s *Service
36711 profileId int64
36712 dartId int64
36713 urlParams_ gensupport.URLParams
36714 ifNoneMatch_ string
36715 ctx_ context.Context
36716 header_ http.Header
36717 }
36718
36719
36720
36721
36722
36723 func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
36724 c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36725 c.profileId = profileId
36726 c.dartId = dartId
36727 return c
36728 }
36729
36730
36731
36732
36733 func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
36734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36735 return c
36736 }
36737
36738
36739
36740
36741
36742
36743 func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
36744 c.ifNoneMatch_ = entityTag
36745 return c
36746 }
36747
36748
36749
36750
36751 func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
36752 c.ctx_ = ctx
36753 return c
36754 }
36755
36756
36757
36758 func (c *OperatingSystemsGetCall) Header() http.Header {
36759 if c.header_ == nil {
36760 c.header_ = make(http.Header)
36761 }
36762 return c.header_
36763 }
36764
36765 func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
36766 reqHeaders := make(http.Header)
36767 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36768 for k, v := range c.header_ {
36769 reqHeaders[k] = v
36770 }
36771 reqHeaders.Set("User-Agent", c.s.userAgent())
36772 if c.ifNoneMatch_ != "" {
36773 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36774 }
36775 var body io.Reader = nil
36776 c.urlParams_.Set("alt", alt)
36777 c.urlParams_.Set("prettyPrint", "false")
36778 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems/{dartId}")
36779 urls += "?" + c.urlParams_.Encode()
36780 req, err := http.NewRequest("GET", urls, body)
36781 if err != nil {
36782 return nil, err
36783 }
36784 req.Header = reqHeaders
36785 googleapi.Expand(req.URL, map[string]string{
36786 "profileId": strconv.FormatInt(c.profileId, 10),
36787 "dartId": strconv.FormatInt(c.dartId, 10),
36788 })
36789 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36790 }
36791
36792
36793
36794
36795
36796
36797
36798
36799 func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
36800 gensupport.SetOptions(c.urlParams_, opts...)
36801 res, err := c.doRequest("json")
36802 if res != nil && res.StatusCode == http.StatusNotModified {
36803 if res.Body != nil {
36804 res.Body.Close()
36805 }
36806 return nil, &googleapi.Error{
36807 Code: res.StatusCode,
36808 Header: res.Header,
36809 }
36810 }
36811 if err != nil {
36812 return nil, err
36813 }
36814 defer googleapi.CloseBody(res)
36815 if err := googleapi.CheckResponse(res); err != nil {
36816 return nil, err
36817 }
36818 ret := &OperatingSystem{
36819 ServerResponse: googleapi.ServerResponse{
36820 Header: res.Header,
36821 HTTPStatusCode: res.StatusCode,
36822 },
36823 }
36824 target := &ret
36825 if err := gensupport.DecodeResponse(target, res); err != nil {
36826 return nil, err
36827 }
36828 return ret, nil
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863 }
36864
36865
36866
36867 type OperatingSystemsListCall struct {
36868 s *Service
36869 profileId int64
36870 urlParams_ gensupport.URLParams
36871 ifNoneMatch_ string
36872 ctx_ context.Context
36873 header_ http.Header
36874 }
36875
36876
36877
36878
36879 func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
36880 c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36881 c.profileId = profileId
36882 return c
36883 }
36884
36885
36886
36887
36888 func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
36889 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36890 return c
36891 }
36892
36893
36894
36895
36896
36897
36898 func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
36899 c.ifNoneMatch_ = entityTag
36900 return c
36901 }
36902
36903
36904
36905
36906 func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
36907 c.ctx_ = ctx
36908 return c
36909 }
36910
36911
36912
36913 func (c *OperatingSystemsListCall) Header() http.Header {
36914 if c.header_ == nil {
36915 c.header_ = make(http.Header)
36916 }
36917 return c.header_
36918 }
36919
36920 func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
36921 reqHeaders := make(http.Header)
36922 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
36923 for k, v := range c.header_ {
36924 reqHeaders[k] = v
36925 }
36926 reqHeaders.Set("User-Agent", c.s.userAgent())
36927 if c.ifNoneMatch_ != "" {
36928 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36929 }
36930 var body io.Reader = nil
36931 c.urlParams_.Set("alt", alt)
36932 c.urlParams_.Set("prettyPrint", "false")
36933 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/operatingSystems")
36934 urls += "?" + c.urlParams_.Encode()
36935 req, err := http.NewRequest("GET", urls, body)
36936 if err != nil {
36937 return nil, err
36938 }
36939 req.Header = reqHeaders
36940 googleapi.Expand(req.URL, map[string]string{
36941 "profileId": strconv.FormatInt(c.profileId, 10),
36942 })
36943 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36944 }
36945
36946
36947
36948
36949
36950
36951
36952
36953 func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
36954 gensupport.SetOptions(c.urlParams_, opts...)
36955 res, err := c.doRequest("json")
36956 if res != nil && res.StatusCode == http.StatusNotModified {
36957 if res.Body != nil {
36958 res.Body.Close()
36959 }
36960 return nil, &googleapi.Error{
36961 Code: res.StatusCode,
36962 Header: res.Header,
36963 }
36964 }
36965 if err != nil {
36966 return nil, err
36967 }
36968 defer googleapi.CloseBody(res)
36969 if err := googleapi.CheckResponse(res); err != nil {
36970 return nil, err
36971 }
36972 ret := &OperatingSystemsListResponse{
36973 ServerResponse: googleapi.ServerResponse{
36974 Header: res.Header,
36975 HTTPStatusCode: res.StatusCode,
36976 },
36977 }
36978 target := &ret
36979 if err := gensupport.DecodeResponse(target, res); err != nil {
36980 return nil, err
36981 }
36982 return ret, nil
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009 }
37010
37011
37012
37013 type OrderDocumentsGetCall struct {
37014 s *Service
37015 profileId int64
37016 projectId int64
37017 id int64
37018 urlParams_ gensupport.URLParams
37019 ifNoneMatch_ string
37020 ctx_ context.Context
37021 header_ http.Header
37022 }
37023
37024
37025
37026
37027
37028
37029 func (r *OrderDocumentsService) Get(profileId int64, projectId int64, id int64) *OrderDocumentsGetCall {
37030 c := &OrderDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37031 c.profileId = profileId
37032 c.projectId = projectId
37033 c.id = id
37034 return c
37035 }
37036
37037
37038
37039
37040 func (c *OrderDocumentsGetCall) Fields(s ...googleapi.Field) *OrderDocumentsGetCall {
37041 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37042 return c
37043 }
37044
37045
37046
37047
37048
37049
37050 func (c *OrderDocumentsGetCall) IfNoneMatch(entityTag string) *OrderDocumentsGetCall {
37051 c.ifNoneMatch_ = entityTag
37052 return c
37053 }
37054
37055
37056
37057
37058 func (c *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
37059 c.ctx_ = ctx
37060 return c
37061 }
37062
37063
37064
37065 func (c *OrderDocumentsGetCall) Header() http.Header {
37066 if c.header_ == nil {
37067 c.header_ = make(http.Header)
37068 }
37069 return c.header_
37070 }
37071
37072 func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
37073 reqHeaders := make(http.Header)
37074 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
37075 for k, v := range c.header_ {
37076 reqHeaders[k] = v
37077 }
37078 reqHeaders.Set("User-Agent", c.s.userAgent())
37079 if c.ifNoneMatch_ != "" {
37080 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37081 }
37082 var body io.Reader = nil
37083 c.urlParams_.Set("alt", alt)
37084 c.urlParams_.Set("prettyPrint", "false")
37085 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}")
37086 urls += "?" + c.urlParams_.Encode()
37087 req, err := http.NewRequest("GET", urls, body)
37088 if err != nil {
37089 return nil, err
37090 }
37091 req.Header = reqHeaders
37092 googleapi.Expand(req.URL, map[string]string{
37093 "profileId": strconv.FormatInt(c.profileId, 10),
37094 "projectId": strconv.FormatInt(c.projectId, 10),
37095 "id": strconv.FormatInt(c.id, 10),
37096 })
37097 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37098 }
37099
37100
37101
37102
37103
37104
37105
37106
37107 func (c *OrderDocumentsGetCall) Do(opts ...googleapi.CallOption) (*OrderDocument, error) {
37108 gensupport.SetOptions(c.urlParams_, opts...)
37109 res, err := c.doRequest("json")
37110 if res != nil && res.StatusCode == http.StatusNotModified {
37111 if res.Body != nil {
37112 res.Body.Close()
37113 }
37114 return nil, &googleapi.Error{
37115 Code: res.StatusCode,
37116 Header: res.Header,
37117 }
37118 }
37119 if err != nil {
37120 return nil, err
37121 }
37122 defer googleapi.CloseBody(res)
37123 if err := googleapi.CheckResponse(res); err != nil {
37124 return nil, err
37125 }
37126 ret := &OrderDocument{
37127 ServerResponse: googleapi.ServerResponse{
37128 Header: res.Header,
37129 HTTPStatusCode: res.StatusCode,
37130 },
37131 }
37132 target := &ret
37133 if err := gensupport.DecodeResponse(target, res); err != nil {
37134 return nil, err
37135 }
37136 return ret, nil
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179 }
37180
37181
37182
37183 type OrderDocumentsListCall struct {
37184 s *Service
37185 profileId int64
37186 projectId int64
37187 urlParams_ gensupport.URLParams
37188 ifNoneMatch_ string
37189 ctx_ context.Context
37190 header_ http.Header
37191 }
37192
37193
37194
37195
37196
37197
37198 func (r *OrderDocumentsService) List(profileId int64, projectId int64) *OrderDocumentsListCall {
37199 c := &OrderDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37200 c.profileId = profileId
37201 c.projectId = projectId
37202 return c
37203 }
37204
37205
37206
37207 func (c *OrderDocumentsListCall) Approved(approved bool) *OrderDocumentsListCall {
37208 c.urlParams_.Set("approved", fmt.Sprint(approved))
37209 return c
37210 }
37211
37212
37213
37214 func (c *OrderDocumentsListCall) Ids(ids ...int64) *OrderDocumentsListCall {
37215 var ids_ []string
37216 for _, v := range ids {
37217 ids_ = append(ids_, fmt.Sprint(v))
37218 }
37219 c.urlParams_.SetMulti("ids", ids_)
37220 return c
37221 }
37222
37223
37224
37225 func (c *OrderDocumentsListCall) MaxResults(maxResults int64) *OrderDocumentsListCall {
37226 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37227 return c
37228 }
37229
37230
37231
37232 func (c *OrderDocumentsListCall) OrderId(orderId ...int64) *OrderDocumentsListCall {
37233 var orderId_ []string
37234 for _, v := range orderId {
37235 orderId_ = append(orderId_, fmt.Sprint(v))
37236 }
37237 c.urlParams_.SetMulti("orderId", orderId_)
37238 return c
37239 }
37240
37241
37242
37243 func (c *OrderDocumentsListCall) PageToken(pageToken string) *OrderDocumentsListCall {
37244 c.urlParams_.Set("pageToken", pageToken)
37245 return c
37246 }
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257 func (c *OrderDocumentsListCall) SearchString(searchString string) *OrderDocumentsListCall {
37258 c.urlParams_.Set("searchString", searchString)
37259 return c
37260 }
37261
37262
37263
37264 func (c *OrderDocumentsListCall) SiteId(siteId ...int64) *OrderDocumentsListCall {
37265 var siteId_ []string
37266 for _, v := range siteId {
37267 siteId_ = append(siteId_, fmt.Sprint(v))
37268 }
37269 c.urlParams_.SetMulti("siteId", siteId_)
37270 return c
37271 }
37272
37273
37274
37275
37276
37277
37278
37279
37280 func (c *OrderDocumentsListCall) SortField(sortField string) *OrderDocumentsListCall {
37281 c.urlParams_.Set("sortField", sortField)
37282 return c
37283 }
37284
37285
37286
37287
37288
37289
37290
37291
37292 func (c *OrderDocumentsListCall) SortOrder(sortOrder string) *OrderDocumentsListCall {
37293 c.urlParams_.Set("sortOrder", sortOrder)
37294 return c
37295 }
37296
37297
37298
37299
37300 func (c *OrderDocumentsListCall) Fields(s ...googleapi.Field) *OrderDocumentsListCall {
37301 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37302 return c
37303 }
37304
37305
37306
37307
37308
37309
37310 func (c *OrderDocumentsListCall) IfNoneMatch(entityTag string) *OrderDocumentsListCall {
37311 c.ifNoneMatch_ = entityTag
37312 return c
37313 }
37314
37315
37316
37317
37318 func (c *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
37319 c.ctx_ = ctx
37320 return c
37321 }
37322
37323
37324
37325 func (c *OrderDocumentsListCall) Header() http.Header {
37326 if c.header_ == nil {
37327 c.header_ = make(http.Header)
37328 }
37329 return c.header_
37330 }
37331
37332 func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
37333 reqHeaders := make(http.Header)
37334 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
37335 for k, v := range c.header_ {
37336 reqHeaders[k] = v
37337 }
37338 reqHeaders.Set("User-Agent", c.s.userAgent())
37339 if c.ifNoneMatch_ != "" {
37340 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37341 }
37342 var body io.Reader = nil
37343 c.urlParams_.Set("alt", alt)
37344 c.urlParams_.Set("prettyPrint", "false")
37345 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orderDocuments")
37346 urls += "?" + c.urlParams_.Encode()
37347 req, err := http.NewRequest("GET", urls, body)
37348 if err != nil {
37349 return nil, err
37350 }
37351 req.Header = reqHeaders
37352 googleapi.Expand(req.URL, map[string]string{
37353 "profileId": strconv.FormatInt(c.profileId, 10),
37354 "projectId": strconv.FormatInt(c.projectId, 10),
37355 })
37356 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37357 }
37358
37359
37360
37361
37362
37363
37364
37365
37366 func (c *OrderDocumentsListCall) Do(opts ...googleapi.CallOption) (*OrderDocumentsListResponse, error) {
37367 gensupport.SetOptions(c.urlParams_, opts...)
37368 res, err := c.doRequest("json")
37369 if res != nil && res.StatusCode == http.StatusNotModified {
37370 if res.Body != nil {
37371 res.Body.Close()
37372 }
37373 return nil, &googleapi.Error{
37374 Code: res.StatusCode,
37375 Header: res.Header,
37376 }
37377 }
37378 if err != nil {
37379 return nil, err
37380 }
37381 defer googleapi.CloseBody(res)
37382 if err := googleapi.CheckResponse(res); err != nil {
37383 return nil, err
37384 }
37385 ret := &OrderDocumentsListResponse{
37386 ServerResponse: googleapi.ServerResponse{
37387 Header: res.Header,
37388 HTTPStatusCode: res.StatusCode,
37389 },
37390 }
37391 target := &ret
37392 if err := gensupport.DecodeResponse(target, res); err != nil {
37393 return nil, err
37394 }
37395 return ret, nil
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503 }
37504
37505
37506
37507
37508 func (c *OrderDocumentsListCall) Pages(ctx context.Context, f func(*OrderDocumentsListResponse) error) error {
37509 c.ctx_ = ctx
37510 defer c.PageToken(c.urlParams_.Get("pageToken"))
37511 for {
37512 x, err := c.Do()
37513 if err != nil {
37514 return err
37515 }
37516 if err := f(x); err != nil {
37517 return err
37518 }
37519 if x.NextPageToken == "" {
37520 return nil
37521 }
37522 c.PageToken(x.NextPageToken)
37523 }
37524 }
37525
37526
37527
37528 type OrdersGetCall struct {
37529 s *Service
37530 profileId int64
37531 projectId int64
37532 id int64
37533 urlParams_ gensupport.URLParams
37534 ifNoneMatch_ string
37535 ctx_ context.Context
37536 header_ http.Header
37537 }
37538
37539
37540
37541
37542
37543
37544 func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
37545 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37546 c.profileId = profileId
37547 c.projectId = projectId
37548 c.id = id
37549 return c
37550 }
37551
37552
37553
37554
37555 func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
37556 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37557 return c
37558 }
37559
37560
37561
37562
37563
37564
37565 func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
37566 c.ifNoneMatch_ = entityTag
37567 return c
37568 }
37569
37570
37571
37572
37573 func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
37574 c.ctx_ = ctx
37575 return c
37576 }
37577
37578
37579
37580 func (c *OrdersGetCall) Header() http.Header {
37581 if c.header_ == nil {
37582 c.header_ = make(http.Header)
37583 }
37584 return c.header_
37585 }
37586
37587 func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
37588 reqHeaders := make(http.Header)
37589 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
37590 for k, v := range c.header_ {
37591 reqHeaders[k] = v
37592 }
37593 reqHeaders.Set("User-Agent", c.s.userAgent())
37594 if c.ifNoneMatch_ != "" {
37595 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37596 }
37597 var body io.Reader = nil
37598 c.urlParams_.Set("alt", alt)
37599 c.urlParams_.Set("prettyPrint", "false")
37600 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders/{id}")
37601 urls += "?" + c.urlParams_.Encode()
37602 req, err := http.NewRequest("GET", urls, body)
37603 if err != nil {
37604 return nil, err
37605 }
37606 req.Header = reqHeaders
37607 googleapi.Expand(req.URL, map[string]string{
37608 "profileId": strconv.FormatInt(c.profileId, 10),
37609 "projectId": strconv.FormatInt(c.projectId, 10),
37610 "id": strconv.FormatInt(c.id, 10),
37611 })
37612 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37613 }
37614
37615
37616
37617
37618
37619
37620
37621
37622 func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
37623 gensupport.SetOptions(c.urlParams_, opts...)
37624 res, err := c.doRequest("json")
37625 if res != nil && res.StatusCode == http.StatusNotModified {
37626 if res.Body != nil {
37627 res.Body.Close()
37628 }
37629 return nil, &googleapi.Error{
37630 Code: res.StatusCode,
37631 Header: res.Header,
37632 }
37633 }
37634 if err != nil {
37635 return nil, err
37636 }
37637 defer googleapi.CloseBody(res)
37638 if err := googleapi.CheckResponse(res); err != nil {
37639 return nil, err
37640 }
37641 ret := &Order{
37642 ServerResponse: googleapi.ServerResponse{
37643 Header: res.Header,
37644 HTTPStatusCode: res.StatusCode,
37645 },
37646 }
37647 target := &ret
37648 if err := gensupport.DecodeResponse(target, res); err != nil {
37649 return nil, err
37650 }
37651 return ret, nil
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694 }
37695
37696
37697
37698 type OrdersListCall struct {
37699 s *Service
37700 profileId int64
37701 projectId int64
37702 urlParams_ gensupport.URLParams
37703 ifNoneMatch_ string
37704 ctx_ context.Context
37705 header_ http.Header
37706 }
37707
37708
37709
37710
37711
37712
37713 func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
37714 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37715 c.profileId = profileId
37716 c.projectId = projectId
37717 return c
37718 }
37719
37720
37721
37722 func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
37723 var ids_ []string
37724 for _, v := range ids {
37725 ids_ = append(ids_, fmt.Sprint(v))
37726 }
37727 c.urlParams_.SetMulti("ids", ids_)
37728 return c
37729 }
37730
37731
37732
37733 func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
37734 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37735 return c
37736 }
37737
37738
37739
37740 func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
37741 c.urlParams_.Set("pageToken", pageToken)
37742 return c
37743 }
37744
37745
37746
37747
37748
37749
37750
37751
37752 func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
37753 c.urlParams_.Set("searchString", searchString)
37754 return c
37755 }
37756
37757
37758
37759 func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
37760 var siteId_ []string
37761 for _, v := range siteId {
37762 siteId_ = append(siteId_, fmt.Sprint(v))
37763 }
37764 c.urlParams_.SetMulti("siteId", siteId_)
37765 return c
37766 }
37767
37768
37769
37770
37771
37772
37773
37774
37775 func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
37776 c.urlParams_.Set("sortField", sortField)
37777 return c
37778 }
37779
37780
37781
37782
37783
37784
37785
37786
37787 func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
37788 c.urlParams_.Set("sortOrder", sortOrder)
37789 return c
37790 }
37791
37792
37793
37794
37795 func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
37796 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37797 return c
37798 }
37799
37800
37801
37802
37803
37804
37805 func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
37806 c.ifNoneMatch_ = entityTag
37807 return c
37808 }
37809
37810
37811
37812
37813 func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
37814 c.ctx_ = ctx
37815 return c
37816 }
37817
37818
37819
37820 func (c *OrdersListCall) Header() http.Header {
37821 if c.header_ == nil {
37822 c.header_ = make(http.Header)
37823 }
37824 return c.header_
37825 }
37826
37827 func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
37828 reqHeaders := make(http.Header)
37829 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
37830 for k, v := range c.header_ {
37831 reqHeaders[k] = v
37832 }
37833 reqHeaders.Set("User-Agent", c.s.userAgent())
37834 if c.ifNoneMatch_ != "" {
37835 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37836 }
37837 var body io.Reader = nil
37838 c.urlParams_.Set("alt", alt)
37839 c.urlParams_.Set("prettyPrint", "false")
37840 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{projectId}/orders")
37841 urls += "?" + c.urlParams_.Encode()
37842 req, err := http.NewRequest("GET", urls, body)
37843 if err != nil {
37844 return nil, err
37845 }
37846 req.Header = reqHeaders
37847 googleapi.Expand(req.URL, map[string]string{
37848 "profileId": strconv.FormatInt(c.profileId, 10),
37849 "projectId": strconv.FormatInt(c.projectId, 10),
37850 })
37851 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37852 }
37853
37854
37855
37856
37857
37858
37859
37860
37861 func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
37862 gensupport.SetOptions(c.urlParams_, opts...)
37863 res, err := c.doRequest("json")
37864 if res != nil && res.StatusCode == http.StatusNotModified {
37865 if res.Body != nil {
37866 res.Body.Close()
37867 }
37868 return nil, &googleapi.Error{
37869 Code: res.StatusCode,
37870 Header: res.Header,
37871 }
37872 }
37873 if err != nil {
37874 return nil, err
37875 }
37876 defer googleapi.CloseBody(res)
37877 if err := googleapi.CheckResponse(res); err != nil {
37878 return nil, err
37879 }
37880 ret := &OrdersListResponse{
37881 ServerResponse: googleapi.ServerResponse{
37882 Header: res.Header,
37883 HTTPStatusCode: res.StatusCode,
37884 },
37885 }
37886 target := &ret
37887 if err := gensupport.DecodeResponse(target, res); err != nil {
37888 return nil, err
37889 }
37890 return ret, nil
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986 }
37987
37988
37989
37990
37991 func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
37992 c.ctx_ = ctx
37993 defer c.PageToken(c.urlParams_.Get("pageToken"))
37994 for {
37995 x, err := c.Do()
37996 if err != nil {
37997 return err
37998 }
37999 if err := f(x); err != nil {
38000 return err
38001 }
38002 if x.NextPageToken == "" {
38003 return nil
38004 }
38005 c.PageToken(x.NextPageToken)
38006 }
38007 }
38008
38009
38010
38011 type PlacementGroupsGetCall struct {
38012 s *Service
38013 profileId int64
38014 id int64
38015 urlParams_ gensupport.URLParams
38016 ifNoneMatch_ string
38017 ctx_ context.Context
38018 header_ http.Header
38019 }
38020
38021
38022
38023
38024
38025 func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
38026 c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38027 c.profileId = profileId
38028 c.id = id
38029 return c
38030 }
38031
38032
38033
38034
38035 func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
38036 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38037 return c
38038 }
38039
38040
38041
38042
38043
38044
38045 func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
38046 c.ifNoneMatch_ = entityTag
38047 return c
38048 }
38049
38050
38051
38052
38053 func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
38054 c.ctx_ = ctx
38055 return c
38056 }
38057
38058
38059
38060 func (c *PlacementGroupsGetCall) Header() http.Header {
38061 if c.header_ == nil {
38062 c.header_ = make(http.Header)
38063 }
38064 return c.header_
38065 }
38066
38067 func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
38068 reqHeaders := make(http.Header)
38069 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
38070 for k, v := range c.header_ {
38071 reqHeaders[k] = v
38072 }
38073 reqHeaders.Set("User-Agent", c.s.userAgent())
38074 if c.ifNoneMatch_ != "" {
38075 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38076 }
38077 var body io.Reader = nil
38078 c.urlParams_.Set("alt", alt)
38079 c.urlParams_.Set("prettyPrint", "false")
38080 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups/{id}")
38081 urls += "?" + c.urlParams_.Encode()
38082 req, err := http.NewRequest("GET", urls, body)
38083 if err != nil {
38084 return nil, err
38085 }
38086 req.Header = reqHeaders
38087 googleapi.Expand(req.URL, map[string]string{
38088 "profileId": strconv.FormatInt(c.profileId, 10),
38089 "id": strconv.FormatInt(c.id, 10),
38090 })
38091 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38092 }
38093
38094
38095
38096
38097
38098
38099
38100
38101 func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38102 gensupport.SetOptions(c.urlParams_, opts...)
38103 res, err := c.doRequest("json")
38104 if res != nil && res.StatusCode == http.StatusNotModified {
38105 if res.Body != nil {
38106 res.Body.Close()
38107 }
38108 return nil, &googleapi.Error{
38109 Code: res.StatusCode,
38110 Header: res.Header,
38111 }
38112 }
38113 if err != nil {
38114 return nil, err
38115 }
38116 defer googleapi.CloseBody(res)
38117 if err := googleapi.CheckResponse(res); err != nil {
38118 return nil, err
38119 }
38120 ret := &PlacementGroup{
38121 ServerResponse: googleapi.ServerResponse{
38122 Header: res.Header,
38123 HTTPStatusCode: res.StatusCode,
38124 },
38125 }
38126 target := &ret
38127 if err := gensupport.DecodeResponse(target, res); err != nil {
38128 return nil, err
38129 }
38130 return ret, nil
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165 }
38166
38167
38168
38169 type PlacementGroupsInsertCall struct {
38170 s *Service
38171 profileId int64
38172 placementgroup *PlacementGroup
38173 urlParams_ gensupport.URLParams
38174 ctx_ context.Context
38175 header_ http.Header
38176 }
38177
38178
38179
38180
38181 func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
38182 c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38183 c.profileId = profileId
38184 c.placementgroup = placementgroup
38185 return c
38186 }
38187
38188
38189
38190
38191 func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
38192 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38193 return c
38194 }
38195
38196
38197
38198
38199 func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
38200 c.ctx_ = ctx
38201 return c
38202 }
38203
38204
38205
38206 func (c *PlacementGroupsInsertCall) Header() http.Header {
38207 if c.header_ == nil {
38208 c.header_ = make(http.Header)
38209 }
38210 return c.header_
38211 }
38212
38213 func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
38214 reqHeaders := make(http.Header)
38215 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
38216 for k, v := range c.header_ {
38217 reqHeaders[k] = v
38218 }
38219 reqHeaders.Set("User-Agent", c.s.userAgent())
38220 var body io.Reader = nil
38221 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38222 if err != nil {
38223 return nil, err
38224 }
38225 reqHeaders.Set("Content-Type", "application/json")
38226 c.urlParams_.Set("alt", alt)
38227 c.urlParams_.Set("prettyPrint", "false")
38228 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38229 urls += "?" + c.urlParams_.Encode()
38230 req, err := http.NewRequest("POST", urls, body)
38231 if err != nil {
38232 return nil, err
38233 }
38234 req.Header = reqHeaders
38235 googleapi.Expand(req.URL, map[string]string{
38236 "profileId": strconv.FormatInt(c.profileId, 10),
38237 })
38238 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38239 }
38240
38241
38242
38243
38244
38245
38246
38247
38248 func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38249 gensupport.SetOptions(c.urlParams_, opts...)
38250 res, err := c.doRequest("json")
38251 if res != nil && res.StatusCode == http.StatusNotModified {
38252 if res.Body != nil {
38253 res.Body.Close()
38254 }
38255 return nil, &googleapi.Error{
38256 Code: res.StatusCode,
38257 Header: res.Header,
38258 }
38259 }
38260 if err != nil {
38261 return nil, err
38262 }
38263 defer googleapi.CloseBody(res)
38264 if err := googleapi.CheckResponse(res); err != nil {
38265 return nil, err
38266 }
38267 ret := &PlacementGroup{
38268 ServerResponse: googleapi.ServerResponse{
38269 Header: res.Header,
38270 HTTPStatusCode: res.StatusCode,
38271 },
38272 }
38273 target := &ret
38274 if err := gensupport.DecodeResponse(target, res); err != nil {
38275 return nil, err
38276 }
38277 return ret, nil
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307 }
38308
38309
38310
38311 type PlacementGroupsListCall struct {
38312 s *Service
38313 profileId int64
38314 urlParams_ gensupport.URLParams
38315 ifNoneMatch_ string
38316 ctx_ context.Context
38317 header_ http.Header
38318 }
38319
38320
38321
38322
38323
38324 func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
38325 c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38326 c.profileId = profileId
38327 return c
38328 }
38329
38330
38331
38332 func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
38333 var advertiserIds_ []string
38334 for _, v := range advertiserIds {
38335 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
38336 }
38337 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
38338 return c
38339 }
38340
38341
38342
38343
38344 func (c *PlacementGroupsListCall) Archived(archived bool) *PlacementGroupsListCall {
38345 c.urlParams_.Set("archived", fmt.Sprint(archived))
38346 return c
38347 }
38348
38349
38350
38351 func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
38352 var campaignIds_ []string
38353 for _, v := range campaignIds {
38354 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
38355 }
38356 c.urlParams_.SetMulti("campaignIds", campaignIds_)
38357 return c
38358 }
38359
38360
38361
38362
38363 func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
38364 var contentCategoryIds_ []string
38365 for _, v := range contentCategoryIds {
38366 contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
38367 }
38368 c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
38369 return c
38370 }
38371
38372
38373
38374
38375 func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
38376 var directorySiteIds_ []string
38377 for _, v := range directorySiteIds {
38378 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
38379 }
38380 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
38381 return c
38382 }
38383
38384
38385
38386 func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
38387 var ids_ []string
38388 for _, v := range ids {
38389 ids_ = append(ids_, fmt.Sprint(v))
38390 }
38391 c.urlParams_.SetMulti("ids", ids_)
38392 return c
38393 }
38394
38395
38396
38397
38398 func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
38399 c.urlParams_.Set("maxEndDate", maxEndDate)
38400 return c
38401 }
38402
38403
38404
38405 func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
38406 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38407 return c
38408 }
38409
38410
38411
38412
38413 func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
38414 c.urlParams_.Set("maxStartDate", maxStartDate)
38415 return c
38416 }
38417
38418
38419
38420
38421 func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
38422 c.urlParams_.Set("minEndDate", minEndDate)
38423 return c
38424 }
38425
38426
38427
38428
38429 func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
38430 c.urlParams_.Set("minStartDate", minStartDate)
38431 return c
38432 }
38433
38434
38435
38436 func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
38437 c.urlParams_.Set("pageToken", pageToken)
38438 return c
38439 }
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453 func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
38454 c.urlParams_.Set("placementGroupType", placementGroupType)
38455 return c
38456 }
38457
38458
38459
38460
38461 func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
38462 var placementStrategyIds_ []string
38463 for _, v := range placementStrategyIds {
38464 placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
38465 }
38466 c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
38467 return c
38468 }
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481 func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
38482 c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
38483 return c
38484 }
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495 func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
38496 c.urlParams_.Set("searchString", searchString)
38497 return c
38498 }
38499
38500
38501
38502 func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
38503 var siteIds_ []string
38504 for _, v := range siteIds {
38505 siteIds_ = append(siteIds_, fmt.Sprint(v))
38506 }
38507 c.urlParams_.SetMulti("siteIds", siteIds_)
38508 return c
38509 }
38510
38511
38512
38513
38514
38515
38516
38517
38518 func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
38519 c.urlParams_.Set("sortField", sortField)
38520 return c
38521 }
38522
38523
38524
38525
38526
38527
38528
38529
38530 func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
38531 c.urlParams_.Set("sortOrder", sortOrder)
38532 return c
38533 }
38534
38535
38536
38537
38538 func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
38539 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38540 return c
38541 }
38542
38543
38544
38545
38546
38547
38548 func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
38549 c.ifNoneMatch_ = entityTag
38550 return c
38551 }
38552
38553
38554
38555
38556 func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
38557 c.ctx_ = ctx
38558 return c
38559 }
38560
38561
38562
38563 func (c *PlacementGroupsListCall) Header() http.Header {
38564 if c.header_ == nil {
38565 c.header_ = make(http.Header)
38566 }
38567 return c.header_
38568 }
38569
38570 func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
38571 reqHeaders := make(http.Header)
38572 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
38573 for k, v := range c.header_ {
38574 reqHeaders[k] = v
38575 }
38576 reqHeaders.Set("User-Agent", c.s.userAgent())
38577 if c.ifNoneMatch_ != "" {
38578 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38579 }
38580 var body io.Reader = nil
38581 c.urlParams_.Set("alt", alt)
38582 c.urlParams_.Set("prettyPrint", "false")
38583 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38584 urls += "?" + c.urlParams_.Encode()
38585 req, err := http.NewRequest("GET", urls, body)
38586 if err != nil {
38587 return nil, err
38588 }
38589 req.Header = reqHeaders
38590 googleapi.Expand(req.URL, map[string]string{
38591 "profileId": strconv.FormatInt(c.profileId, 10),
38592 })
38593 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38594 }
38595
38596
38597
38598
38599
38600
38601
38602
38603 func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
38604 gensupport.SetOptions(c.urlParams_, opts...)
38605 res, err := c.doRequest("json")
38606 if res != nil && res.StatusCode == http.StatusNotModified {
38607 if res.Body != nil {
38608 res.Body.Close()
38609 }
38610 return nil, &googleapi.Error{
38611 Code: res.StatusCode,
38612 Header: res.Header,
38613 }
38614 }
38615 if err != nil {
38616 return nil, err
38617 }
38618 defer googleapi.CloseBody(res)
38619 if err := googleapi.CheckResponse(res); err != nil {
38620 return nil, err
38621 }
38622 ret := &PlacementGroupsListResponse{
38623 ServerResponse: googleapi.ServerResponse{
38624 Header: res.Header,
38625 HTTPStatusCode: res.StatusCode,
38626 },
38627 }
38628 target := &ret
38629 if err := gensupport.DecodeResponse(target, res); err != nil {
38630 return nil, err
38631 }
38632 return ret, nil
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815 }
38816
38817
38818
38819
38820 func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
38821 c.ctx_ = ctx
38822 defer c.PageToken(c.urlParams_.Get("pageToken"))
38823 for {
38824 x, err := c.Do()
38825 if err != nil {
38826 return err
38827 }
38828 if err := f(x); err != nil {
38829 return err
38830 }
38831 if x.NextPageToken == "" {
38832 return nil
38833 }
38834 c.PageToken(x.NextPageToken)
38835 }
38836 }
38837
38838
38839
38840 type PlacementGroupsPatchCall struct {
38841 s *Service
38842 profileId int64
38843 placementgroup *PlacementGroup
38844 urlParams_ gensupport.URLParams
38845 ctx_ context.Context
38846 header_ http.Header
38847 }
38848
38849
38850
38851
38852
38853
38854 func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
38855 c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38856 c.profileId = profileId
38857 c.urlParams_.Set("id", fmt.Sprint(id))
38858 c.placementgroup = placementgroup
38859 return c
38860 }
38861
38862
38863
38864
38865 func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
38866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38867 return c
38868 }
38869
38870
38871
38872
38873 func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
38874 c.ctx_ = ctx
38875 return c
38876 }
38877
38878
38879
38880 func (c *PlacementGroupsPatchCall) Header() http.Header {
38881 if c.header_ == nil {
38882 c.header_ = make(http.Header)
38883 }
38884 return c.header_
38885 }
38886
38887 func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
38888 reqHeaders := make(http.Header)
38889 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
38890 for k, v := range c.header_ {
38891 reqHeaders[k] = v
38892 }
38893 reqHeaders.Set("User-Agent", c.s.userAgent())
38894 var body io.Reader = nil
38895 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
38896 if err != nil {
38897 return nil, err
38898 }
38899 reqHeaders.Set("Content-Type", "application/json")
38900 c.urlParams_.Set("alt", alt)
38901 c.urlParams_.Set("prettyPrint", "false")
38902 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
38903 urls += "?" + c.urlParams_.Encode()
38904 req, err := http.NewRequest("PATCH", urls, body)
38905 if err != nil {
38906 return nil, err
38907 }
38908 req.Header = reqHeaders
38909 googleapi.Expand(req.URL, map[string]string{
38910 "profileId": strconv.FormatInt(c.profileId, 10),
38911 })
38912 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38913 }
38914
38915
38916
38917
38918
38919
38920
38921
38922 func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
38923 gensupport.SetOptions(c.urlParams_, opts...)
38924 res, err := c.doRequest("json")
38925 if res != nil && res.StatusCode == http.StatusNotModified {
38926 if res.Body != nil {
38927 res.Body.Close()
38928 }
38929 return nil, &googleapi.Error{
38930 Code: res.StatusCode,
38931 Header: res.Header,
38932 }
38933 }
38934 if err != nil {
38935 return nil, err
38936 }
38937 defer googleapi.CloseBody(res)
38938 if err := googleapi.CheckResponse(res); err != nil {
38939 return nil, err
38940 }
38941 ret := &PlacementGroup{
38942 ServerResponse: googleapi.ServerResponse{
38943 Header: res.Header,
38944 HTTPStatusCode: res.StatusCode,
38945 },
38946 }
38947 target := &ret
38948 if err := gensupport.DecodeResponse(target, res); err != nil {
38949 return nil, err
38950 }
38951 return ret, nil
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989 }
38990
38991
38992
38993 type PlacementGroupsUpdateCall struct {
38994 s *Service
38995 profileId int64
38996 placementgroup *PlacementGroup
38997 urlParams_ gensupport.URLParams
38998 ctx_ context.Context
38999 header_ http.Header
39000 }
39001
39002
39003
39004
39005 func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
39006 c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39007 c.profileId = profileId
39008 c.placementgroup = placementgroup
39009 return c
39010 }
39011
39012
39013
39014
39015 func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
39016 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39017 return c
39018 }
39019
39020
39021
39022
39023 func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
39024 c.ctx_ = ctx
39025 return c
39026 }
39027
39028
39029
39030 func (c *PlacementGroupsUpdateCall) Header() http.Header {
39031 if c.header_ == nil {
39032 c.header_ = make(http.Header)
39033 }
39034 return c.header_
39035 }
39036
39037 func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
39038 reqHeaders := make(http.Header)
39039 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39040 for k, v := range c.header_ {
39041 reqHeaders[k] = v
39042 }
39043 reqHeaders.Set("User-Agent", c.s.userAgent())
39044 var body io.Reader = nil
39045 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
39046 if err != nil {
39047 return nil, err
39048 }
39049 reqHeaders.Set("Content-Type", "application/json")
39050 c.urlParams_.Set("alt", alt)
39051 c.urlParams_.Set("prettyPrint", "false")
39052 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementGroups")
39053 urls += "?" + c.urlParams_.Encode()
39054 req, err := http.NewRequest("PUT", urls, body)
39055 if err != nil {
39056 return nil, err
39057 }
39058 req.Header = reqHeaders
39059 googleapi.Expand(req.URL, map[string]string{
39060 "profileId": strconv.FormatInt(c.profileId, 10),
39061 })
39062 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39063 }
39064
39065
39066
39067
39068
39069
39070
39071
39072 func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
39073 gensupport.SetOptions(c.urlParams_, opts...)
39074 res, err := c.doRequest("json")
39075 if res != nil && res.StatusCode == http.StatusNotModified {
39076 if res.Body != nil {
39077 res.Body.Close()
39078 }
39079 return nil, &googleapi.Error{
39080 Code: res.StatusCode,
39081 Header: res.Header,
39082 }
39083 }
39084 if err != nil {
39085 return nil, err
39086 }
39087 defer googleapi.CloseBody(res)
39088 if err := googleapi.CheckResponse(res); err != nil {
39089 return nil, err
39090 }
39091 ret := &PlacementGroup{
39092 ServerResponse: googleapi.ServerResponse{
39093 Header: res.Header,
39094 HTTPStatusCode: res.StatusCode,
39095 },
39096 }
39097 target := &ret
39098 if err := gensupport.DecodeResponse(target, res); err != nil {
39099 return nil, err
39100 }
39101 return ret, nil
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131 }
39132
39133
39134
39135 type PlacementStrategiesDeleteCall struct {
39136 s *Service
39137 profileId int64
39138 id int64
39139 urlParams_ gensupport.URLParams
39140 ctx_ context.Context
39141 header_ http.Header
39142 }
39143
39144
39145
39146
39147
39148 func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
39149 c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39150 c.profileId = profileId
39151 c.id = id
39152 return c
39153 }
39154
39155
39156
39157
39158 func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
39159 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39160 return c
39161 }
39162
39163
39164
39165
39166 func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
39167 c.ctx_ = ctx
39168 return c
39169 }
39170
39171
39172
39173 func (c *PlacementStrategiesDeleteCall) Header() http.Header {
39174 if c.header_ == nil {
39175 c.header_ = make(http.Header)
39176 }
39177 return c.header_
39178 }
39179
39180 func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
39181 reqHeaders := make(http.Header)
39182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39183 for k, v := range c.header_ {
39184 reqHeaders[k] = v
39185 }
39186 reqHeaders.Set("User-Agent", c.s.userAgent())
39187 var body io.Reader = nil
39188 c.urlParams_.Set("alt", alt)
39189 c.urlParams_.Set("prettyPrint", "false")
39190 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
39191 urls += "?" + c.urlParams_.Encode()
39192 req, err := http.NewRequest("DELETE", urls, body)
39193 if err != nil {
39194 return nil, err
39195 }
39196 req.Header = reqHeaders
39197 googleapi.Expand(req.URL, map[string]string{
39198 "profileId": strconv.FormatInt(c.profileId, 10),
39199 "id": strconv.FormatInt(c.id, 10),
39200 })
39201 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39202 }
39203
39204
39205 func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
39206 gensupport.SetOptions(c.urlParams_, opts...)
39207 res, err := c.doRequest("json")
39208 if err != nil {
39209 return err
39210 }
39211 defer googleapi.CloseBody(res)
39212 if err := googleapi.CheckResponse(res); err != nil {
39213 return err
39214 }
39215 return nil
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247 }
39248
39249
39250
39251 type PlacementStrategiesGetCall struct {
39252 s *Service
39253 profileId int64
39254 id int64
39255 urlParams_ gensupport.URLParams
39256 ifNoneMatch_ string
39257 ctx_ context.Context
39258 header_ http.Header
39259 }
39260
39261
39262
39263
39264
39265 func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
39266 c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39267 c.profileId = profileId
39268 c.id = id
39269 return c
39270 }
39271
39272
39273
39274
39275 func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
39276 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39277 return c
39278 }
39279
39280
39281
39282
39283
39284
39285 func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
39286 c.ifNoneMatch_ = entityTag
39287 return c
39288 }
39289
39290
39291
39292
39293 func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
39294 c.ctx_ = ctx
39295 return c
39296 }
39297
39298
39299
39300 func (c *PlacementStrategiesGetCall) Header() http.Header {
39301 if c.header_ == nil {
39302 c.header_ = make(http.Header)
39303 }
39304 return c.header_
39305 }
39306
39307 func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
39308 reqHeaders := make(http.Header)
39309 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39310 for k, v := range c.header_ {
39311 reqHeaders[k] = v
39312 }
39313 reqHeaders.Set("User-Agent", c.s.userAgent())
39314 if c.ifNoneMatch_ != "" {
39315 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39316 }
39317 var body io.Reader = nil
39318 c.urlParams_.Set("alt", alt)
39319 c.urlParams_.Set("prettyPrint", "false")
39320 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies/{id}")
39321 urls += "?" + c.urlParams_.Encode()
39322 req, err := http.NewRequest("GET", urls, body)
39323 if err != nil {
39324 return nil, err
39325 }
39326 req.Header = reqHeaders
39327 googleapi.Expand(req.URL, map[string]string{
39328 "profileId": strconv.FormatInt(c.profileId, 10),
39329 "id": strconv.FormatInt(c.id, 10),
39330 })
39331 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39332 }
39333
39334
39335
39336
39337
39338
39339
39340
39341 func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39342 gensupport.SetOptions(c.urlParams_, opts...)
39343 res, err := c.doRequest("json")
39344 if res != nil && res.StatusCode == http.StatusNotModified {
39345 if res.Body != nil {
39346 res.Body.Close()
39347 }
39348 return nil, &googleapi.Error{
39349 Code: res.StatusCode,
39350 Header: res.Header,
39351 }
39352 }
39353 if err != nil {
39354 return nil, err
39355 }
39356 defer googleapi.CloseBody(res)
39357 if err := googleapi.CheckResponse(res); err != nil {
39358 return nil, err
39359 }
39360 ret := &PlacementStrategy{
39361 ServerResponse: googleapi.ServerResponse{
39362 Header: res.Header,
39363 HTTPStatusCode: res.StatusCode,
39364 },
39365 }
39366 target := &ret
39367 if err := gensupport.DecodeResponse(target, res); err != nil {
39368 return nil, err
39369 }
39370 return ret, nil
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405 }
39406
39407
39408
39409 type PlacementStrategiesInsertCall struct {
39410 s *Service
39411 profileId int64
39412 placementstrategy *PlacementStrategy
39413 urlParams_ gensupport.URLParams
39414 ctx_ context.Context
39415 header_ http.Header
39416 }
39417
39418
39419
39420
39421 func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
39422 c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39423 c.profileId = profileId
39424 c.placementstrategy = placementstrategy
39425 return c
39426 }
39427
39428
39429
39430
39431 func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
39432 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39433 return c
39434 }
39435
39436
39437
39438
39439 func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
39440 c.ctx_ = ctx
39441 return c
39442 }
39443
39444
39445
39446 func (c *PlacementStrategiesInsertCall) Header() http.Header {
39447 if c.header_ == nil {
39448 c.header_ = make(http.Header)
39449 }
39450 return c.header_
39451 }
39452
39453 func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
39454 reqHeaders := make(http.Header)
39455 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39456 for k, v := range c.header_ {
39457 reqHeaders[k] = v
39458 }
39459 reqHeaders.Set("User-Agent", c.s.userAgent())
39460 var body io.Reader = nil
39461 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39462 if err != nil {
39463 return nil, err
39464 }
39465 reqHeaders.Set("Content-Type", "application/json")
39466 c.urlParams_.Set("alt", alt)
39467 c.urlParams_.Set("prettyPrint", "false")
39468 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39469 urls += "?" + c.urlParams_.Encode()
39470 req, err := http.NewRequest("POST", urls, body)
39471 if err != nil {
39472 return nil, err
39473 }
39474 req.Header = reqHeaders
39475 googleapi.Expand(req.URL, map[string]string{
39476 "profileId": strconv.FormatInt(c.profileId, 10),
39477 })
39478 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39479 }
39480
39481
39482
39483
39484
39485
39486
39487
39488 func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39489 gensupport.SetOptions(c.urlParams_, opts...)
39490 res, err := c.doRequest("json")
39491 if res != nil && res.StatusCode == http.StatusNotModified {
39492 if res.Body != nil {
39493 res.Body.Close()
39494 }
39495 return nil, &googleapi.Error{
39496 Code: res.StatusCode,
39497 Header: res.Header,
39498 }
39499 }
39500 if err != nil {
39501 return nil, err
39502 }
39503 defer googleapi.CloseBody(res)
39504 if err := googleapi.CheckResponse(res); err != nil {
39505 return nil, err
39506 }
39507 ret := &PlacementStrategy{
39508 ServerResponse: googleapi.ServerResponse{
39509 Header: res.Header,
39510 HTTPStatusCode: res.StatusCode,
39511 },
39512 }
39513 target := &ret
39514 if err := gensupport.DecodeResponse(target, res); err != nil {
39515 return nil, err
39516 }
39517 return ret, nil
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547 }
39548
39549
39550
39551 type PlacementStrategiesListCall struct {
39552 s *Service
39553 profileId int64
39554 urlParams_ gensupport.URLParams
39555 ifNoneMatch_ string
39556 ctx_ context.Context
39557 header_ http.Header
39558 }
39559
39560
39561
39562
39563
39564 func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
39565 c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39566 c.profileId = profileId
39567 return c
39568 }
39569
39570
39571
39572 func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
39573 var ids_ []string
39574 for _, v := range ids {
39575 ids_ = append(ids_, fmt.Sprint(v))
39576 }
39577 c.urlParams_.SetMulti("ids", ids_)
39578 return c
39579 }
39580
39581
39582
39583 func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
39584 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39585 return c
39586 }
39587
39588
39589
39590 func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
39591 c.urlParams_.Set("pageToken", pageToken)
39592 return c
39593 }
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604 func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
39605 c.urlParams_.Set("searchString", searchString)
39606 return c
39607 }
39608
39609
39610
39611
39612
39613
39614
39615
39616 func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
39617 c.urlParams_.Set("sortField", sortField)
39618 return c
39619 }
39620
39621
39622
39623
39624
39625
39626
39627
39628 func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
39629 c.urlParams_.Set("sortOrder", sortOrder)
39630 return c
39631 }
39632
39633
39634
39635
39636 func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
39637 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39638 return c
39639 }
39640
39641
39642
39643
39644
39645
39646 func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
39647 c.ifNoneMatch_ = entityTag
39648 return c
39649 }
39650
39651
39652
39653
39654 func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
39655 c.ctx_ = ctx
39656 return c
39657 }
39658
39659
39660
39661 func (c *PlacementStrategiesListCall) Header() http.Header {
39662 if c.header_ == nil {
39663 c.header_ = make(http.Header)
39664 }
39665 return c.header_
39666 }
39667
39668 func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
39669 reqHeaders := make(http.Header)
39670 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39671 for k, v := range c.header_ {
39672 reqHeaders[k] = v
39673 }
39674 reqHeaders.Set("User-Agent", c.s.userAgent())
39675 if c.ifNoneMatch_ != "" {
39676 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
39677 }
39678 var body io.Reader = nil
39679 c.urlParams_.Set("alt", alt)
39680 c.urlParams_.Set("prettyPrint", "false")
39681 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39682 urls += "?" + c.urlParams_.Encode()
39683 req, err := http.NewRequest("GET", urls, body)
39684 if err != nil {
39685 return nil, err
39686 }
39687 req.Header = reqHeaders
39688 googleapi.Expand(req.URL, map[string]string{
39689 "profileId": strconv.FormatInt(c.profileId, 10),
39690 })
39691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39692 }
39693
39694
39695
39696
39697
39698
39699
39700
39701 func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
39702 gensupport.SetOptions(c.urlParams_, opts...)
39703 res, err := c.doRequest("json")
39704 if res != nil && res.StatusCode == http.StatusNotModified {
39705 if res.Body != nil {
39706 res.Body.Close()
39707 }
39708 return nil, &googleapi.Error{
39709 Code: res.StatusCode,
39710 Header: res.Header,
39711 }
39712 }
39713 if err != nil {
39714 return nil, err
39715 }
39716 defer googleapi.CloseBody(res)
39717 if err := googleapi.CheckResponse(res); err != nil {
39718 return nil, err
39719 }
39720 ret := &PlacementStrategiesListResponse{
39721 ServerResponse: googleapi.ServerResponse{
39722 Header: res.Header,
39723 HTTPStatusCode: res.StatusCode,
39724 },
39725 }
39726 target := &ret
39727 if err := gensupport.DecodeResponse(target, res); err != nil {
39728 return nil, err
39729 }
39730 return ret, nil
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811 }
39812
39813
39814
39815
39816 func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
39817 c.ctx_ = ctx
39818 defer c.PageToken(c.urlParams_.Get("pageToken"))
39819 for {
39820 x, err := c.Do()
39821 if err != nil {
39822 return err
39823 }
39824 if err := f(x); err != nil {
39825 return err
39826 }
39827 if x.NextPageToken == "" {
39828 return nil
39829 }
39830 c.PageToken(x.NextPageToken)
39831 }
39832 }
39833
39834
39835
39836 type PlacementStrategiesPatchCall struct {
39837 s *Service
39838 profileId int64
39839 placementstrategy *PlacementStrategy
39840 urlParams_ gensupport.URLParams
39841 ctx_ context.Context
39842 header_ http.Header
39843 }
39844
39845
39846
39847
39848
39849
39850 func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
39851 c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39852 c.profileId = profileId
39853 c.urlParams_.Set("id", fmt.Sprint(id))
39854 c.placementstrategy = placementstrategy
39855 return c
39856 }
39857
39858
39859
39860
39861 func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
39862 c.urlParams_.Set("fields", googleapi.CombineFields(s))
39863 return c
39864 }
39865
39866
39867
39868
39869 func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
39870 c.ctx_ = ctx
39871 return c
39872 }
39873
39874
39875
39876 func (c *PlacementStrategiesPatchCall) Header() http.Header {
39877 if c.header_ == nil {
39878 c.header_ = make(http.Header)
39879 }
39880 return c.header_
39881 }
39882
39883 func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
39884 reqHeaders := make(http.Header)
39885 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
39886 for k, v := range c.header_ {
39887 reqHeaders[k] = v
39888 }
39889 reqHeaders.Set("User-Agent", c.s.userAgent())
39890 var body io.Reader = nil
39891 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
39892 if err != nil {
39893 return nil, err
39894 }
39895 reqHeaders.Set("Content-Type", "application/json")
39896 c.urlParams_.Set("alt", alt)
39897 c.urlParams_.Set("prettyPrint", "false")
39898 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
39899 urls += "?" + c.urlParams_.Encode()
39900 req, err := http.NewRequest("PATCH", urls, body)
39901 if err != nil {
39902 return nil, err
39903 }
39904 req.Header = reqHeaders
39905 googleapi.Expand(req.URL, map[string]string{
39906 "profileId": strconv.FormatInt(c.profileId, 10),
39907 })
39908 return gensupport.SendRequest(c.ctx_, c.s.client, req)
39909 }
39910
39911
39912
39913
39914
39915
39916
39917
39918 func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
39919 gensupport.SetOptions(c.urlParams_, opts...)
39920 res, err := c.doRequest("json")
39921 if res != nil && res.StatusCode == http.StatusNotModified {
39922 if res.Body != nil {
39923 res.Body.Close()
39924 }
39925 return nil, &googleapi.Error{
39926 Code: res.StatusCode,
39927 Header: res.Header,
39928 }
39929 }
39930 if err != nil {
39931 return nil, err
39932 }
39933 defer googleapi.CloseBody(res)
39934 if err := googleapi.CheckResponse(res); err != nil {
39935 return nil, err
39936 }
39937 ret := &PlacementStrategy{
39938 ServerResponse: googleapi.ServerResponse{
39939 Header: res.Header,
39940 HTTPStatusCode: res.StatusCode,
39941 },
39942 }
39943 target := &ret
39944 if err := gensupport.DecodeResponse(target, res); err != nil {
39945 return nil, err
39946 }
39947 return ret, nil
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985 }
39986
39987
39988
39989 type PlacementStrategiesUpdateCall struct {
39990 s *Service
39991 profileId int64
39992 placementstrategy *PlacementStrategy
39993 urlParams_ gensupport.URLParams
39994 ctx_ context.Context
39995 header_ http.Header
39996 }
39997
39998
39999
40000
40001 func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
40002 c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40003 c.profileId = profileId
40004 c.placementstrategy = placementstrategy
40005 return c
40006 }
40007
40008
40009
40010
40011 func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
40012 c.urlParams_.Set("fields", googleapi.CombineFields(s))
40013 return c
40014 }
40015
40016
40017
40018
40019 func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
40020 c.ctx_ = ctx
40021 return c
40022 }
40023
40024
40025
40026 func (c *PlacementStrategiesUpdateCall) Header() http.Header {
40027 if c.header_ == nil {
40028 c.header_ = make(http.Header)
40029 }
40030 return c.header_
40031 }
40032
40033 func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
40034 reqHeaders := make(http.Header)
40035 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
40036 for k, v := range c.header_ {
40037 reqHeaders[k] = v
40038 }
40039 reqHeaders.Set("User-Agent", c.s.userAgent())
40040 var body io.Reader = nil
40041 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
40042 if err != nil {
40043 return nil, err
40044 }
40045 reqHeaders.Set("Content-Type", "application/json")
40046 c.urlParams_.Set("alt", alt)
40047 c.urlParams_.Set("prettyPrint", "false")
40048 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placementStrategies")
40049 urls += "?" + c.urlParams_.Encode()
40050 req, err := http.NewRequest("PUT", urls, body)
40051 if err != nil {
40052 return nil, err
40053 }
40054 req.Header = reqHeaders
40055 googleapi.Expand(req.URL, map[string]string{
40056 "profileId": strconv.FormatInt(c.profileId, 10),
40057 })
40058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
40059 }
40060
40061
40062
40063
40064
40065
40066
40067
40068 func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
40069 gensupport.SetOptions(c.urlParams_, opts...)
40070 res, err := c.doRequest("json")
40071 if res != nil && res.StatusCode == http.StatusNotModified {
40072 if res.Body != nil {
40073 res.Body.Close()
40074 }
40075 return nil, &googleapi.Error{
40076 Code: res.StatusCode,
40077 Header: res.Header,
40078 }
40079 }
40080 if err != nil {
40081 return nil, err
40082 }
40083 defer googleapi.CloseBody(res)
40084 if err := googleapi.CheckResponse(res); err != nil {
40085 return nil, err
40086 }
40087 ret := &PlacementStrategy{
40088 ServerResponse: googleapi.ServerResponse{
40089 Header: res.Header,
40090 HTTPStatusCode: res.StatusCode,
40091 },
40092 }
40093 target := &ret
40094 if err := gensupport.DecodeResponse(target, res); err != nil {
40095 return nil, err
40096 }
40097 return ret, nil
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127 }
40128
40129
40130
40131 type PlacementsGeneratetagsCall struct {
40132 s *Service
40133 profileId int64
40134 urlParams_ gensupport.URLParams
40135 ctx_ context.Context
40136 header_ http.Header
40137 }
40138
40139
40140
40141
40142 func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
40143 c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40144 c.profileId = profileId
40145 return c
40146 }
40147
40148
40149
40150 func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
40151 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
40152 return c
40153 }
40154
40155
40156
40157 func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
40158 var placementIds_ []string
40159 for _, v := range placementIds {
40160 placementIds_ = append(placementIds_, fmt.Sprint(v))
40161 }
40162 c.urlParams_.SetMulti("placementIds", placementIds_)
40163 return c
40164 }
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192 func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
40193 c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
40194 return c
40195 }
40196
40197
40198
40199
40200 func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
40201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
40202 return c
40203 }
40204
40205
40206
40207
40208 func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
40209 c.ctx_ = ctx
40210 return c
40211 }
40212
40213
40214
40215 func (c *PlacementsGeneratetagsCall) Header() http.Header {
40216 if c.header_ == nil {
40217 c.header_ = make(http.Header)
40218 }
40219 return c.header_
40220 }
40221
40222 func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
40223 reqHeaders := make(http.Header)
40224 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
40225 for k, v := range c.header_ {
40226 reqHeaders[k] = v
40227 }
40228 reqHeaders.Set("User-Agent", c.s.userAgent())
40229 var body io.Reader = nil
40230 c.urlParams_.Set("alt", alt)
40231 c.urlParams_.Set("prettyPrint", "false")
40232 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/generatetags")
40233 urls += "?" + c.urlParams_.Encode()
40234 req, err := http.NewRequest("POST", urls, body)
40235 if err != nil {
40236 return nil, err
40237 }
40238 req.Header = reqHeaders
40239 googleapi.Expand(req.URL, map[string]string{
40240 "profileId": strconv.FormatInt(c.profileId, 10),
40241 })
40242 return gensupport.SendRequest(c.ctx_, c.s.client, req)
40243 }
40244
40245
40246
40247
40248
40249
40250
40251
40252 func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
40253 gensupport.SetOptions(c.urlParams_, opts...)
40254 res, err := c.doRequest("json")
40255 if res != nil && res.StatusCode == http.StatusNotModified {
40256 if res.Body != nil {
40257 res.Body.Close()
40258 }
40259 return nil, &googleapi.Error{
40260 Code: res.StatusCode,
40261 Header: res.Header,
40262 }
40263 }
40264 if err != nil {
40265 return nil, err
40266 }
40267 defer googleapi.CloseBody(res)
40268 if err := googleapi.CheckResponse(res); err != nil {
40269 return nil, err
40270 }
40271 ret := &PlacementsGenerateTagsResponse{
40272 ServerResponse: googleapi.ServerResponse{
40273 Header: res.Header,
40274 HTTPStatusCode: res.StatusCode,
40275 },
40276 }
40277 target := &ret
40278 if err := gensupport.DecodeResponse(target, res); err != nil {
40279 return nil, err
40280 }
40281 return ret, nil
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371 }
40372
40373
40374
40375 type PlacementsGetCall struct {
40376 s *Service
40377 profileId int64
40378 id int64
40379 urlParams_ gensupport.URLParams
40380 ifNoneMatch_ string
40381 ctx_ context.Context
40382 header_ http.Header
40383 }
40384
40385
40386
40387
40388
40389 func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
40390 c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40391 c.profileId = profileId
40392 c.id = id
40393 return c
40394 }
40395
40396
40397
40398
40399 func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
40400 c.urlParams_.Set("fields", googleapi.CombineFields(s))
40401 return c
40402 }
40403
40404
40405
40406
40407
40408
40409 func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
40410 c.ifNoneMatch_ = entityTag
40411 return c
40412 }
40413
40414
40415
40416
40417 func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
40418 c.ctx_ = ctx
40419 return c
40420 }
40421
40422
40423
40424 func (c *PlacementsGetCall) Header() http.Header {
40425 if c.header_ == nil {
40426 c.header_ = make(http.Header)
40427 }
40428 return c.header_
40429 }
40430
40431 func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
40432 reqHeaders := make(http.Header)
40433 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
40434 for k, v := range c.header_ {
40435 reqHeaders[k] = v
40436 }
40437 reqHeaders.Set("User-Agent", c.s.userAgent())
40438 if c.ifNoneMatch_ != "" {
40439 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40440 }
40441 var body io.Reader = nil
40442 c.urlParams_.Set("alt", alt)
40443 c.urlParams_.Set("prettyPrint", "false")
40444 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements/{id}")
40445 urls += "?" + c.urlParams_.Encode()
40446 req, err := http.NewRequest("GET", urls, body)
40447 if err != nil {
40448 return nil, err
40449 }
40450 req.Header = reqHeaders
40451 googleapi.Expand(req.URL, map[string]string{
40452 "profileId": strconv.FormatInt(c.profileId, 10),
40453 "id": strconv.FormatInt(c.id, 10),
40454 })
40455 return gensupport.SendRequest(c.ctx_, c.s.client, req)
40456 }
40457
40458
40459
40460
40461
40462
40463
40464
40465 func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40466 gensupport.SetOptions(c.urlParams_, opts...)
40467 res, err := c.doRequest("json")
40468 if res != nil && res.StatusCode == http.StatusNotModified {
40469 if res.Body != nil {
40470 res.Body.Close()
40471 }
40472 return nil, &googleapi.Error{
40473 Code: res.StatusCode,
40474 Header: res.Header,
40475 }
40476 }
40477 if err != nil {
40478 return nil, err
40479 }
40480 defer googleapi.CloseBody(res)
40481 if err := googleapi.CheckResponse(res); err != nil {
40482 return nil, err
40483 }
40484 ret := &Placement{
40485 ServerResponse: googleapi.ServerResponse{
40486 Header: res.Header,
40487 HTTPStatusCode: res.StatusCode,
40488 },
40489 }
40490 target := &ret
40491 if err := gensupport.DecodeResponse(target, res); err != nil {
40492 return nil, err
40493 }
40494 return ret, nil
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529 }
40530
40531
40532
40533 type PlacementsInsertCall struct {
40534 s *Service
40535 profileId int64
40536 placement *Placement
40537 urlParams_ gensupport.URLParams
40538 ctx_ context.Context
40539 header_ http.Header
40540 }
40541
40542
40543
40544
40545 func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
40546 c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40547 c.profileId = profileId
40548 c.placement = placement
40549 return c
40550 }
40551
40552
40553
40554
40555 func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
40556 c.urlParams_.Set("fields", googleapi.CombineFields(s))
40557 return c
40558 }
40559
40560
40561
40562
40563 func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
40564 c.ctx_ = ctx
40565 return c
40566 }
40567
40568
40569
40570 func (c *PlacementsInsertCall) Header() http.Header {
40571 if c.header_ == nil {
40572 c.header_ = make(http.Header)
40573 }
40574 return c.header_
40575 }
40576
40577 func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
40578 reqHeaders := make(http.Header)
40579 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
40580 for k, v := range c.header_ {
40581 reqHeaders[k] = v
40582 }
40583 reqHeaders.Set("User-Agent", c.s.userAgent())
40584 var body io.Reader = nil
40585 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
40586 if err != nil {
40587 return nil, err
40588 }
40589 reqHeaders.Set("Content-Type", "application/json")
40590 c.urlParams_.Set("alt", alt)
40591 c.urlParams_.Set("prettyPrint", "false")
40592 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40593 urls += "?" + c.urlParams_.Encode()
40594 req, err := http.NewRequest("POST", urls, body)
40595 if err != nil {
40596 return nil, err
40597 }
40598 req.Header = reqHeaders
40599 googleapi.Expand(req.URL, map[string]string{
40600 "profileId": strconv.FormatInt(c.profileId, 10),
40601 })
40602 return gensupport.SendRequest(c.ctx_, c.s.client, req)
40603 }
40604
40605
40606
40607
40608
40609
40610
40611
40612 func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
40613 gensupport.SetOptions(c.urlParams_, opts...)
40614 res, err := c.doRequest("json")
40615 if res != nil && res.StatusCode == http.StatusNotModified {
40616 if res.Body != nil {
40617 res.Body.Close()
40618 }
40619 return nil, &googleapi.Error{
40620 Code: res.StatusCode,
40621 Header: res.Header,
40622 }
40623 }
40624 if err != nil {
40625 return nil, err
40626 }
40627 defer googleapi.CloseBody(res)
40628 if err := googleapi.CheckResponse(res); err != nil {
40629 return nil, err
40630 }
40631 ret := &Placement{
40632 ServerResponse: googleapi.ServerResponse{
40633 Header: res.Header,
40634 HTTPStatusCode: res.StatusCode,
40635 },
40636 }
40637 target := &ret
40638 if err := gensupport.DecodeResponse(target, res); err != nil {
40639 return nil, err
40640 }
40641 return ret, nil
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671 }
40672
40673
40674
40675 type PlacementsListCall struct {
40676 s *Service
40677 profileId int64
40678 urlParams_ gensupport.URLParams
40679 ifNoneMatch_ string
40680 ctx_ context.Context
40681 header_ http.Header
40682 }
40683
40684
40685
40686
40687
40688 func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
40689 c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40690 c.profileId = profileId
40691 return c
40692 }
40693
40694
40695
40696 func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
40697 var advertiserIds_ []string
40698 for _, v := range advertiserIds {
40699 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
40700 }
40701 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
40702 return c
40703 }
40704
40705
40706
40707
40708 func (c *PlacementsListCall) Archived(archived bool) *PlacementsListCall {
40709 c.urlParams_.Set("archived", fmt.Sprint(archived))
40710 return c
40711 }
40712
40713
40714
40715 func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
40716 var campaignIds_ []string
40717 for _, v := range campaignIds {
40718 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
40719 }
40720 c.urlParams_.SetMulti("campaignIds", campaignIds_)
40721 return c
40722 }
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740 func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
40741 c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
40742 return c
40743 }
40744
40745
40746
40747
40748 func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
40749 var contentCategoryIds_ []string
40750 for _, v := range contentCategoryIds {
40751 contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
40752 }
40753 c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
40754 return c
40755 }
40756
40757
40758
40759
40760 func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
40761 var directorySiteIds_ []string
40762 for _, v := range directorySiteIds {
40763 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
40764 }
40765 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
40766 return c
40767 }
40768
40769
40770
40771 func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
40772 var groupIds_ []string
40773 for _, v := range groupIds {
40774 groupIds_ = append(groupIds_, fmt.Sprint(v))
40775 }
40776 c.urlParams_.SetMulti("groupIds", groupIds_)
40777 return c
40778 }
40779
40780
40781
40782 func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
40783 var ids_ []string
40784 for _, v := range ids {
40785 ids_ = append(ids_, fmt.Sprint(v))
40786 }
40787 c.urlParams_.SetMulti("ids", ids_)
40788 return c
40789 }
40790
40791
40792
40793
40794 func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
40795 c.urlParams_.Set("maxEndDate", maxEndDate)
40796 return c
40797 }
40798
40799
40800
40801 func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
40802 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40803 return c
40804 }
40805
40806
40807
40808
40809 func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
40810 c.urlParams_.Set("maxStartDate", maxStartDate)
40811 return c
40812 }
40813
40814
40815
40816
40817 func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
40818 c.urlParams_.Set("minEndDate", minEndDate)
40819 return c
40820 }
40821
40822
40823
40824
40825 func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
40826 c.urlParams_.Set("minStartDate", minStartDate)
40827 return c
40828 }
40829
40830
40831
40832 func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
40833 c.urlParams_.Set("pageToken", pageToken)
40834 return c
40835 }
40836
40837
40838
40839
40840
40841
40842
40843
40844 func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
40845 c.urlParams_.Set("paymentSource", paymentSource)
40846 return c
40847 }
40848
40849
40850
40851
40852 func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
40853 var placementStrategyIds_ []string
40854 for _, v := range placementStrategyIds {
40855 placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
40856 }
40857 c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
40858 return c
40859 }
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872 func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
40873 c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
40874 return c
40875 }
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885 func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
40886 c.urlParams_.Set("searchString", searchString)
40887 return c
40888 }
40889
40890
40891
40892 func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
40893 var siteIds_ []string
40894 for _, v := range siteIds {
40895 siteIds_ = append(siteIds_, fmt.Sprint(v))
40896 }
40897 c.urlParams_.SetMulti("siteIds", siteIds_)
40898 return c
40899 }
40900
40901
40902
40903 func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
40904 var sizeIds_ []string
40905 for _, v := range sizeIds {
40906 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
40907 }
40908 c.urlParams_.SetMulti("sizeIds", sizeIds_)
40909 return c
40910 }
40911
40912
40913
40914
40915
40916
40917
40918
40919 func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
40920 c.urlParams_.Set("sortField", sortField)
40921 return c
40922 }
40923
40924
40925
40926
40927
40928
40929
40930
40931 func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
40932 c.urlParams_.Set("sortOrder", sortOrder)
40933 return c
40934 }
40935
40936
40937
40938
40939 func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
40940 c.urlParams_.Set("fields", googleapi.CombineFields(s))
40941 return c
40942 }
40943
40944
40945
40946
40947
40948
40949 func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
40950 c.ifNoneMatch_ = entityTag
40951 return c
40952 }
40953
40954
40955
40956
40957 func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
40958 c.ctx_ = ctx
40959 return c
40960 }
40961
40962
40963
40964 func (c *PlacementsListCall) Header() http.Header {
40965 if c.header_ == nil {
40966 c.header_ = make(http.Header)
40967 }
40968 return c.header_
40969 }
40970
40971 func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
40972 reqHeaders := make(http.Header)
40973 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
40974 for k, v := range c.header_ {
40975 reqHeaders[k] = v
40976 }
40977 reqHeaders.Set("User-Agent", c.s.userAgent())
40978 if c.ifNoneMatch_ != "" {
40979 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
40980 }
40981 var body io.Reader = nil
40982 c.urlParams_.Set("alt", alt)
40983 c.urlParams_.Set("prettyPrint", "false")
40984 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
40985 urls += "?" + c.urlParams_.Encode()
40986 req, err := http.NewRequest("GET", urls, body)
40987 if err != nil {
40988 return nil, err
40989 }
40990 req.Header = reqHeaders
40991 googleapi.Expand(req.URL, map[string]string{
40992 "profileId": strconv.FormatInt(c.profileId, 10),
40993 })
40994 return gensupport.SendRequest(c.ctx_, c.s.client, req)
40995 }
40996
40997
40998
40999
41000
41001
41002
41003
41004 func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
41005 gensupport.SetOptions(c.urlParams_, opts...)
41006 res, err := c.doRequest("json")
41007 if res != nil && res.StatusCode == http.StatusNotModified {
41008 if res.Body != nil {
41009 res.Body.Close()
41010 }
41011 return nil, &googleapi.Error{
41012 Code: res.StatusCode,
41013 Header: res.Header,
41014 }
41015 }
41016 if err != nil {
41017 return nil, err
41018 }
41019 defer googleapi.CloseBody(res)
41020 if err := googleapi.CheckResponse(res); err != nil {
41021 return nil, err
41022 }
41023 ret := &PlacementsListResponse{
41024 ServerResponse: googleapi.ServerResponse{
41025 Header: res.Header,
41026 HTTPStatusCode: res.StatusCode,
41027 },
41028 }
41029 target := &ret
41030 if err := gensupport.DecodeResponse(target, res); err != nil {
41031 return nil, err
41032 }
41033 return ret, nil
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252 }
41253
41254
41255
41256
41257 func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
41258 c.ctx_ = ctx
41259 defer c.PageToken(c.urlParams_.Get("pageToken"))
41260 for {
41261 x, err := c.Do()
41262 if err != nil {
41263 return err
41264 }
41265 if err := f(x); err != nil {
41266 return err
41267 }
41268 if x.NextPageToken == "" {
41269 return nil
41270 }
41271 c.PageToken(x.NextPageToken)
41272 }
41273 }
41274
41275
41276
41277 type PlacementsPatchCall struct {
41278 s *Service
41279 profileId int64
41280 placement *Placement
41281 urlParams_ gensupport.URLParams
41282 ctx_ context.Context
41283 header_ http.Header
41284 }
41285
41286
41287
41288
41289
41290
41291 func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
41292 c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41293 c.profileId = profileId
41294 c.urlParams_.Set("id", fmt.Sprint(id))
41295 c.placement = placement
41296 return c
41297 }
41298
41299
41300
41301
41302 func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
41303 c.urlParams_.Set("fields", googleapi.CombineFields(s))
41304 return c
41305 }
41306
41307
41308
41309
41310 func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
41311 c.ctx_ = ctx
41312 return c
41313 }
41314
41315
41316
41317 func (c *PlacementsPatchCall) Header() http.Header {
41318 if c.header_ == nil {
41319 c.header_ = make(http.Header)
41320 }
41321 return c.header_
41322 }
41323
41324 func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
41325 reqHeaders := make(http.Header)
41326 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
41327 for k, v := range c.header_ {
41328 reqHeaders[k] = v
41329 }
41330 reqHeaders.Set("User-Agent", c.s.userAgent())
41331 var body io.Reader = nil
41332 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
41333 if err != nil {
41334 return nil, err
41335 }
41336 reqHeaders.Set("Content-Type", "application/json")
41337 c.urlParams_.Set("alt", alt)
41338 c.urlParams_.Set("prettyPrint", "false")
41339 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
41340 urls += "?" + c.urlParams_.Encode()
41341 req, err := http.NewRequest("PATCH", urls, body)
41342 if err != nil {
41343 return nil, err
41344 }
41345 req.Header = reqHeaders
41346 googleapi.Expand(req.URL, map[string]string{
41347 "profileId": strconv.FormatInt(c.profileId, 10),
41348 })
41349 return gensupport.SendRequest(c.ctx_, c.s.client, req)
41350 }
41351
41352
41353
41354
41355
41356
41357
41358
41359 func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41360 gensupport.SetOptions(c.urlParams_, opts...)
41361 res, err := c.doRequest("json")
41362 if res != nil && res.StatusCode == http.StatusNotModified {
41363 if res.Body != nil {
41364 res.Body.Close()
41365 }
41366 return nil, &googleapi.Error{
41367 Code: res.StatusCode,
41368 Header: res.Header,
41369 }
41370 }
41371 if err != nil {
41372 return nil, err
41373 }
41374 defer googleapi.CloseBody(res)
41375 if err := googleapi.CheckResponse(res); err != nil {
41376 return nil, err
41377 }
41378 ret := &Placement{
41379 ServerResponse: googleapi.ServerResponse{
41380 Header: res.Header,
41381 HTTPStatusCode: res.StatusCode,
41382 },
41383 }
41384 target := &ret
41385 if err := gensupport.DecodeResponse(target, res); err != nil {
41386 return nil, err
41387 }
41388 return ret, nil
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426 }
41427
41428
41429
41430 type PlacementsUpdateCall struct {
41431 s *Service
41432 profileId int64
41433 placement *Placement
41434 urlParams_ gensupport.URLParams
41435 ctx_ context.Context
41436 header_ http.Header
41437 }
41438
41439
41440
41441
41442 func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
41443 c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41444 c.profileId = profileId
41445 c.placement = placement
41446 return c
41447 }
41448
41449
41450
41451
41452 func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
41453 c.urlParams_.Set("fields", googleapi.CombineFields(s))
41454 return c
41455 }
41456
41457
41458
41459
41460 func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
41461 c.ctx_ = ctx
41462 return c
41463 }
41464
41465
41466
41467 func (c *PlacementsUpdateCall) Header() http.Header {
41468 if c.header_ == nil {
41469 c.header_ = make(http.Header)
41470 }
41471 return c.header_
41472 }
41473
41474 func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
41475 reqHeaders := make(http.Header)
41476 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
41477 for k, v := range c.header_ {
41478 reqHeaders[k] = v
41479 }
41480 reqHeaders.Set("User-Agent", c.s.userAgent())
41481 var body io.Reader = nil
41482 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
41483 if err != nil {
41484 return nil, err
41485 }
41486 reqHeaders.Set("Content-Type", "application/json")
41487 c.urlParams_.Set("alt", alt)
41488 c.urlParams_.Set("prettyPrint", "false")
41489 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/placements")
41490 urls += "?" + c.urlParams_.Encode()
41491 req, err := http.NewRequest("PUT", urls, body)
41492 if err != nil {
41493 return nil, err
41494 }
41495 req.Header = reqHeaders
41496 googleapi.Expand(req.URL, map[string]string{
41497 "profileId": strconv.FormatInt(c.profileId, 10),
41498 })
41499 return gensupport.SendRequest(c.ctx_, c.s.client, req)
41500 }
41501
41502
41503
41504
41505
41506
41507
41508
41509 func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
41510 gensupport.SetOptions(c.urlParams_, opts...)
41511 res, err := c.doRequest("json")
41512 if res != nil && res.StatusCode == http.StatusNotModified {
41513 if res.Body != nil {
41514 res.Body.Close()
41515 }
41516 return nil, &googleapi.Error{
41517 Code: res.StatusCode,
41518 Header: res.Header,
41519 }
41520 }
41521 if err != nil {
41522 return nil, err
41523 }
41524 defer googleapi.CloseBody(res)
41525 if err := googleapi.CheckResponse(res); err != nil {
41526 return nil, err
41527 }
41528 ret := &Placement{
41529 ServerResponse: googleapi.ServerResponse{
41530 Header: res.Header,
41531 HTTPStatusCode: res.StatusCode,
41532 },
41533 }
41534 target := &ret
41535 if err := gensupport.DecodeResponse(target, res); err != nil {
41536 return nil, err
41537 }
41538 return ret, nil
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568 }
41569
41570
41571
41572 type PlatformTypesGetCall struct {
41573 s *Service
41574 profileId int64
41575 id int64
41576 urlParams_ gensupport.URLParams
41577 ifNoneMatch_ string
41578 ctx_ context.Context
41579 header_ http.Header
41580 }
41581
41582
41583
41584
41585
41586 func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
41587 c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41588 c.profileId = profileId
41589 c.id = id
41590 return c
41591 }
41592
41593
41594
41595
41596 func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
41597 c.urlParams_.Set("fields", googleapi.CombineFields(s))
41598 return c
41599 }
41600
41601
41602
41603
41604
41605
41606 func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
41607 c.ifNoneMatch_ = entityTag
41608 return c
41609 }
41610
41611
41612
41613
41614 func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
41615 c.ctx_ = ctx
41616 return c
41617 }
41618
41619
41620
41621 func (c *PlatformTypesGetCall) Header() http.Header {
41622 if c.header_ == nil {
41623 c.header_ = make(http.Header)
41624 }
41625 return c.header_
41626 }
41627
41628 func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
41629 reqHeaders := make(http.Header)
41630 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
41631 for k, v := range c.header_ {
41632 reqHeaders[k] = v
41633 }
41634 reqHeaders.Set("User-Agent", c.s.userAgent())
41635 if c.ifNoneMatch_ != "" {
41636 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41637 }
41638 var body io.Reader = nil
41639 c.urlParams_.Set("alt", alt)
41640 c.urlParams_.Set("prettyPrint", "false")
41641 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes/{id}")
41642 urls += "?" + c.urlParams_.Encode()
41643 req, err := http.NewRequest("GET", urls, body)
41644 if err != nil {
41645 return nil, err
41646 }
41647 req.Header = reqHeaders
41648 googleapi.Expand(req.URL, map[string]string{
41649 "profileId": strconv.FormatInt(c.profileId, 10),
41650 "id": strconv.FormatInt(c.id, 10),
41651 })
41652 return gensupport.SendRequest(c.ctx_, c.s.client, req)
41653 }
41654
41655
41656
41657
41658
41659
41660
41661
41662 func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
41663 gensupport.SetOptions(c.urlParams_, opts...)
41664 res, err := c.doRequest("json")
41665 if res != nil && res.StatusCode == http.StatusNotModified {
41666 if res.Body != nil {
41667 res.Body.Close()
41668 }
41669 return nil, &googleapi.Error{
41670 Code: res.StatusCode,
41671 Header: res.Header,
41672 }
41673 }
41674 if err != nil {
41675 return nil, err
41676 }
41677 defer googleapi.CloseBody(res)
41678 if err := googleapi.CheckResponse(res); err != nil {
41679 return nil, err
41680 }
41681 ret := &PlatformType{
41682 ServerResponse: googleapi.ServerResponse{
41683 Header: res.Header,
41684 HTTPStatusCode: res.StatusCode,
41685 },
41686 }
41687 target := &ret
41688 if err := gensupport.DecodeResponse(target, res); err != nil {
41689 return nil, err
41690 }
41691 return ret, nil
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726 }
41727
41728
41729
41730 type PlatformTypesListCall struct {
41731 s *Service
41732 profileId int64
41733 urlParams_ gensupport.URLParams
41734 ifNoneMatch_ string
41735 ctx_ context.Context
41736 header_ http.Header
41737 }
41738
41739
41740
41741
41742 func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
41743 c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41744 c.profileId = profileId
41745 return c
41746 }
41747
41748
41749
41750
41751 func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
41752 c.urlParams_.Set("fields", googleapi.CombineFields(s))
41753 return c
41754 }
41755
41756
41757
41758
41759
41760
41761 func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
41762 c.ifNoneMatch_ = entityTag
41763 return c
41764 }
41765
41766
41767
41768
41769 func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
41770 c.ctx_ = ctx
41771 return c
41772 }
41773
41774
41775
41776 func (c *PlatformTypesListCall) Header() http.Header {
41777 if c.header_ == nil {
41778 c.header_ = make(http.Header)
41779 }
41780 return c.header_
41781 }
41782
41783 func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
41784 reqHeaders := make(http.Header)
41785 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
41786 for k, v := range c.header_ {
41787 reqHeaders[k] = v
41788 }
41789 reqHeaders.Set("User-Agent", c.s.userAgent())
41790 if c.ifNoneMatch_ != "" {
41791 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41792 }
41793 var body io.Reader = nil
41794 c.urlParams_.Set("alt", alt)
41795 c.urlParams_.Set("prettyPrint", "false")
41796 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/platformTypes")
41797 urls += "?" + c.urlParams_.Encode()
41798 req, err := http.NewRequest("GET", urls, body)
41799 if err != nil {
41800 return nil, err
41801 }
41802 req.Header = reqHeaders
41803 googleapi.Expand(req.URL, map[string]string{
41804 "profileId": strconv.FormatInt(c.profileId, 10),
41805 })
41806 return gensupport.SendRequest(c.ctx_, c.s.client, req)
41807 }
41808
41809
41810
41811
41812
41813
41814
41815
41816 func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
41817 gensupport.SetOptions(c.urlParams_, opts...)
41818 res, err := c.doRequest("json")
41819 if res != nil && res.StatusCode == http.StatusNotModified {
41820 if res.Body != nil {
41821 res.Body.Close()
41822 }
41823 return nil, &googleapi.Error{
41824 Code: res.StatusCode,
41825 Header: res.Header,
41826 }
41827 }
41828 if err != nil {
41829 return nil, err
41830 }
41831 defer googleapi.CloseBody(res)
41832 if err := googleapi.CheckResponse(res); err != nil {
41833 return nil, err
41834 }
41835 ret := &PlatformTypesListResponse{
41836 ServerResponse: googleapi.ServerResponse{
41837 Header: res.Header,
41838 HTTPStatusCode: res.StatusCode,
41839 },
41840 }
41841 target := &ret
41842 if err := gensupport.DecodeResponse(target, res); err != nil {
41843 return nil, err
41844 }
41845 return ret, nil
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872 }
41873
41874
41875
41876 type PostalCodesGetCall struct {
41877 s *Service
41878 profileId int64
41879 code string
41880 urlParams_ gensupport.URLParams
41881 ifNoneMatch_ string
41882 ctx_ context.Context
41883 header_ http.Header
41884 }
41885
41886
41887
41888
41889
41890 func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
41891 c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41892 c.profileId = profileId
41893 c.code = code
41894 return c
41895 }
41896
41897
41898
41899
41900 func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
41901 c.urlParams_.Set("fields", googleapi.CombineFields(s))
41902 return c
41903 }
41904
41905
41906
41907
41908
41909
41910 func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
41911 c.ifNoneMatch_ = entityTag
41912 return c
41913 }
41914
41915
41916
41917
41918 func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
41919 c.ctx_ = ctx
41920 return c
41921 }
41922
41923
41924
41925 func (c *PostalCodesGetCall) Header() http.Header {
41926 if c.header_ == nil {
41927 c.header_ = make(http.Header)
41928 }
41929 return c.header_
41930 }
41931
41932 func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
41933 reqHeaders := make(http.Header)
41934 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
41935 for k, v := range c.header_ {
41936 reqHeaders[k] = v
41937 }
41938 reqHeaders.Set("User-Agent", c.s.userAgent())
41939 if c.ifNoneMatch_ != "" {
41940 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41941 }
41942 var body io.Reader = nil
41943 c.urlParams_.Set("alt", alt)
41944 c.urlParams_.Set("prettyPrint", "false")
41945 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes/{code}")
41946 urls += "?" + c.urlParams_.Encode()
41947 req, err := http.NewRequest("GET", urls, body)
41948 if err != nil {
41949 return nil, err
41950 }
41951 req.Header = reqHeaders
41952 googleapi.Expand(req.URL, map[string]string{
41953 "profileId": strconv.FormatInt(c.profileId, 10),
41954 "code": c.code,
41955 })
41956 return gensupport.SendRequest(c.ctx_, c.s.client, req)
41957 }
41958
41959
41960
41961
41962
41963
41964
41965
41966 func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
41967 gensupport.SetOptions(c.urlParams_, opts...)
41968 res, err := c.doRequest("json")
41969 if res != nil && res.StatusCode == http.StatusNotModified {
41970 if res.Body != nil {
41971 res.Body.Close()
41972 }
41973 return nil, &googleapi.Error{
41974 Code: res.StatusCode,
41975 Header: res.Header,
41976 }
41977 }
41978 if err != nil {
41979 return nil, err
41980 }
41981 defer googleapi.CloseBody(res)
41982 if err := googleapi.CheckResponse(res); err != nil {
41983 return nil, err
41984 }
41985 ret := &PostalCode{
41986 ServerResponse: googleapi.ServerResponse{
41987 Header: res.Header,
41988 HTTPStatusCode: res.StatusCode,
41989 },
41990 }
41991 target := &ret
41992 if err := gensupport.DecodeResponse(target, res); err != nil {
41993 return nil, err
41994 }
41995 return ret, nil
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029 }
42030
42031
42032
42033 type PostalCodesListCall struct {
42034 s *Service
42035 profileId int64
42036 urlParams_ gensupport.URLParams
42037 ifNoneMatch_ string
42038 ctx_ context.Context
42039 header_ http.Header
42040 }
42041
42042
42043
42044
42045 func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
42046 c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42047 c.profileId = profileId
42048 return c
42049 }
42050
42051
42052
42053
42054 func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
42055 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42056 return c
42057 }
42058
42059
42060
42061
42062
42063
42064 func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
42065 c.ifNoneMatch_ = entityTag
42066 return c
42067 }
42068
42069
42070
42071
42072 func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
42073 c.ctx_ = ctx
42074 return c
42075 }
42076
42077
42078
42079 func (c *PostalCodesListCall) Header() http.Header {
42080 if c.header_ == nil {
42081 c.header_ = make(http.Header)
42082 }
42083 return c.header_
42084 }
42085
42086 func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
42087 reqHeaders := make(http.Header)
42088 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42089 for k, v := range c.header_ {
42090 reqHeaders[k] = v
42091 }
42092 reqHeaders.Set("User-Agent", c.s.userAgent())
42093 if c.ifNoneMatch_ != "" {
42094 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42095 }
42096 var body io.Reader = nil
42097 c.urlParams_.Set("alt", alt)
42098 c.urlParams_.Set("prettyPrint", "false")
42099 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/postalCodes")
42100 urls += "?" + c.urlParams_.Encode()
42101 req, err := http.NewRequest("GET", urls, body)
42102 if err != nil {
42103 return nil, err
42104 }
42105 req.Header = reqHeaders
42106 googleapi.Expand(req.URL, map[string]string{
42107 "profileId": strconv.FormatInt(c.profileId, 10),
42108 })
42109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
42110 }
42111
42112
42113
42114
42115
42116
42117
42118
42119 func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
42120 gensupport.SetOptions(c.urlParams_, opts...)
42121 res, err := c.doRequest("json")
42122 if res != nil && res.StatusCode == http.StatusNotModified {
42123 if res.Body != nil {
42124 res.Body.Close()
42125 }
42126 return nil, &googleapi.Error{
42127 Code: res.StatusCode,
42128 Header: res.Header,
42129 }
42130 }
42131 if err != nil {
42132 return nil, err
42133 }
42134 defer googleapi.CloseBody(res)
42135 if err := googleapi.CheckResponse(res); err != nil {
42136 return nil, err
42137 }
42138 ret := &PostalCodesListResponse{
42139 ServerResponse: googleapi.ServerResponse{
42140 Header: res.Header,
42141 HTTPStatusCode: res.StatusCode,
42142 },
42143 }
42144 target := &ret
42145 if err := gensupport.DecodeResponse(target, res); err != nil {
42146 return nil, err
42147 }
42148 return ret, nil
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175 }
42176
42177
42178
42179 type ProjectsGetCall struct {
42180 s *Service
42181 profileId int64
42182 id int64
42183 urlParams_ gensupport.URLParams
42184 ifNoneMatch_ string
42185 ctx_ context.Context
42186 header_ http.Header
42187 }
42188
42189
42190
42191
42192
42193 func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
42194 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42195 c.profileId = profileId
42196 c.id = id
42197 return c
42198 }
42199
42200
42201
42202
42203 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
42204 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42205 return c
42206 }
42207
42208
42209
42210
42211
42212
42213 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
42214 c.ifNoneMatch_ = entityTag
42215 return c
42216 }
42217
42218
42219
42220
42221 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
42222 c.ctx_ = ctx
42223 return c
42224 }
42225
42226
42227
42228 func (c *ProjectsGetCall) Header() http.Header {
42229 if c.header_ == nil {
42230 c.header_ = make(http.Header)
42231 }
42232 return c.header_
42233 }
42234
42235 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
42236 reqHeaders := make(http.Header)
42237 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42238 for k, v := range c.header_ {
42239 reqHeaders[k] = v
42240 }
42241 reqHeaders.Set("User-Agent", c.s.userAgent())
42242 if c.ifNoneMatch_ != "" {
42243 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42244 }
42245 var body io.Reader = nil
42246 c.urlParams_.Set("alt", alt)
42247 c.urlParams_.Set("prettyPrint", "false")
42248 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects/{id}")
42249 urls += "?" + c.urlParams_.Encode()
42250 req, err := http.NewRequest("GET", urls, body)
42251 if err != nil {
42252 return nil, err
42253 }
42254 req.Header = reqHeaders
42255 googleapi.Expand(req.URL, map[string]string{
42256 "profileId": strconv.FormatInt(c.profileId, 10),
42257 "id": strconv.FormatInt(c.id, 10),
42258 })
42259 return gensupport.SendRequest(c.ctx_, c.s.client, req)
42260 }
42261
42262
42263
42264
42265
42266
42267
42268
42269 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
42270 gensupport.SetOptions(c.urlParams_, opts...)
42271 res, err := c.doRequest("json")
42272 if res != nil && res.StatusCode == http.StatusNotModified {
42273 if res.Body != nil {
42274 res.Body.Close()
42275 }
42276 return nil, &googleapi.Error{
42277 Code: res.StatusCode,
42278 Header: res.Header,
42279 }
42280 }
42281 if err != nil {
42282 return nil, err
42283 }
42284 defer googleapi.CloseBody(res)
42285 if err := googleapi.CheckResponse(res); err != nil {
42286 return nil, err
42287 }
42288 ret := &Project{
42289 ServerResponse: googleapi.ServerResponse{
42290 Header: res.Header,
42291 HTTPStatusCode: res.StatusCode,
42292 },
42293 }
42294 target := &ret
42295 if err := gensupport.DecodeResponse(target, res); err != nil {
42296 return nil, err
42297 }
42298 return ret, nil
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333 }
42334
42335
42336
42337 type ProjectsListCall struct {
42338 s *Service
42339 profileId int64
42340 urlParams_ gensupport.URLParams
42341 ifNoneMatch_ string
42342 ctx_ context.Context
42343 header_ http.Header
42344 }
42345
42346
42347
42348
42349
42350 func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
42351 c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42352 c.profileId = profileId
42353 return c
42354 }
42355
42356
42357
42358 func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
42359 var advertiserIds_ []string
42360 for _, v := range advertiserIds {
42361 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
42362 }
42363 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
42364 return c
42365 }
42366
42367
42368
42369 func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
42370 var ids_ []string
42371 for _, v := range ids {
42372 ids_ = append(ids_, fmt.Sprint(v))
42373 }
42374 c.urlParams_.SetMulti("ids", ids_)
42375 return c
42376 }
42377
42378
42379
42380 func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
42381 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42382 return c
42383 }
42384
42385
42386
42387 func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
42388 c.urlParams_.Set("pageToken", pageToken)
42389 return c
42390 }
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400 func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
42401 c.urlParams_.Set("searchString", searchString)
42402 return c
42403 }
42404
42405
42406
42407
42408
42409
42410
42411
42412 func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
42413 c.urlParams_.Set("sortField", sortField)
42414 return c
42415 }
42416
42417
42418
42419
42420
42421
42422
42423
42424 func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
42425 c.urlParams_.Set("sortOrder", sortOrder)
42426 return c
42427 }
42428
42429
42430
42431
42432 func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
42433 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42434 return c
42435 }
42436
42437
42438
42439
42440
42441
42442 func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
42443 c.ifNoneMatch_ = entityTag
42444 return c
42445 }
42446
42447
42448
42449
42450 func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
42451 c.ctx_ = ctx
42452 return c
42453 }
42454
42455
42456
42457 func (c *ProjectsListCall) Header() http.Header {
42458 if c.header_ == nil {
42459 c.header_ = make(http.Header)
42460 }
42461 return c.header_
42462 }
42463
42464 func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
42465 reqHeaders := make(http.Header)
42466 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42467 for k, v := range c.header_ {
42468 reqHeaders[k] = v
42469 }
42470 reqHeaders.Set("User-Agent", c.s.userAgent())
42471 if c.ifNoneMatch_ != "" {
42472 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42473 }
42474 var body io.Reader = nil
42475 c.urlParams_.Set("alt", alt)
42476 c.urlParams_.Set("prettyPrint", "false")
42477 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/projects")
42478 urls += "?" + c.urlParams_.Encode()
42479 req, err := http.NewRequest("GET", urls, body)
42480 if err != nil {
42481 return nil, err
42482 }
42483 req.Header = reqHeaders
42484 googleapi.Expand(req.URL, map[string]string{
42485 "profileId": strconv.FormatInt(c.profileId, 10),
42486 })
42487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
42488 }
42489
42490
42491
42492
42493
42494
42495
42496
42497 func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
42498 gensupport.SetOptions(c.urlParams_, opts...)
42499 res, err := c.doRequest("json")
42500 if res != nil && res.StatusCode == http.StatusNotModified {
42501 if res.Body != nil {
42502 res.Body.Close()
42503 }
42504 return nil, &googleapi.Error{
42505 Code: res.StatusCode,
42506 Header: res.Header,
42507 }
42508 }
42509 if err != nil {
42510 return nil, err
42511 }
42512 defer googleapi.CloseBody(res)
42513 if err := googleapi.CheckResponse(res); err != nil {
42514 return nil, err
42515 }
42516 ret := &ProjectsListResponse{
42517 ServerResponse: googleapi.ServerResponse{
42518 Header: res.Header,
42519 HTTPStatusCode: res.StatusCode,
42520 },
42521 }
42522 target := &ret
42523 if err := gensupport.DecodeResponse(target, res); err != nil {
42524 return nil, err
42525 }
42526 return ret, nil
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614 }
42615
42616
42617
42618
42619 func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
42620 c.ctx_ = ctx
42621 defer c.PageToken(c.urlParams_.Get("pageToken"))
42622 for {
42623 x, err := c.Do()
42624 if err != nil {
42625 return err
42626 }
42627 if err := f(x); err != nil {
42628 return err
42629 }
42630 if x.NextPageToken == "" {
42631 return nil
42632 }
42633 c.PageToken(x.NextPageToken)
42634 }
42635 }
42636
42637
42638
42639 type RegionsListCall struct {
42640 s *Service
42641 profileId int64
42642 urlParams_ gensupport.URLParams
42643 ifNoneMatch_ string
42644 ctx_ context.Context
42645 header_ http.Header
42646 }
42647
42648
42649
42650
42651 func (r *RegionsService) List(profileId int64) *RegionsListCall {
42652 c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42653 c.profileId = profileId
42654 return c
42655 }
42656
42657
42658
42659
42660 func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
42661 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42662 return c
42663 }
42664
42665
42666
42667
42668
42669
42670 func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
42671 c.ifNoneMatch_ = entityTag
42672 return c
42673 }
42674
42675
42676
42677
42678 func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
42679 c.ctx_ = ctx
42680 return c
42681 }
42682
42683
42684
42685 func (c *RegionsListCall) Header() http.Header {
42686 if c.header_ == nil {
42687 c.header_ = make(http.Header)
42688 }
42689 return c.header_
42690 }
42691
42692 func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
42693 reqHeaders := make(http.Header)
42694 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42695 for k, v := range c.header_ {
42696 reqHeaders[k] = v
42697 }
42698 reqHeaders.Set("User-Agent", c.s.userAgent())
42699 if c.ifNoneMatch_ != "" {
42700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42701 }
42702 var body io.Reader = nil
42703 c.urlParams_.Set("alt", alt)
42704 c.urlParams_.Set("prettyPrint", "false")
42705 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/regions")
42706 urls += "?" + c.urlParams_.Encode()
42707 req, err := http.NewRequest("GET", urls, body)
42708 if err != nil {
42709 return nil, err
42710 }
42711 req.Header = reqHeaders
42712 googleapi.Expand(req.URL, map[string]string{
42713 "profileId": strconv.FormatInt(c.profileId, 10),
42714 })
42715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
42716 }
42717
42718
42719
42720
42721
42722
42723
42724
42725 func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
42726 gensupport.SetOptions(c.urlParams_, opts...)
42727 res, err := c.doRequest("json")
42728 if res != nil && res.StatusCode == http.StatusNotModified {
42729 if res.Body != nil {
42730 res.Body.Close()
42731 }
42732 return nil, &googleapi.Error{
42733 Code: res.StatusCode,
42734 Header: res.Header,
42735 }
42736 }
42737 if err != nil {
42738 return nil, err
42739 }
42740 defer googleapi.CloseBody(res)
42741 if err := googleapi.CheckResponse(res); err != nil {
42742 return nil, err
42743 }
42744 ret := &RegionsListResponse{
42745 ServerResponse: googleapi.ServerResponse{
42746 Header: res.Header,
42747 HTTPStatusCode: res.StatusCode,
42748 },
42749 }
42750 target := &ret
42751 if err := gensupport.DecodeResponse(target, res); err != nil {
42752 return nil, err
42753 }
42754 return ret, nil
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781 }
42782
42783
42784
42785 type RemarketingListSharesGetCall struct {
42786 s *Service
42787 profileId int64
42788 remarketingListId int64
42789 urlParams_ gensupport.URLParams
42790 ifNoneMatch_ string
42791 ctx_ context.Context
42792 header_ http.Header
42793 }
42794
42795
42796
42797
42798
42799 func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
42800 c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42801 c.profileId = profileId
42802 c.remarketingListId = remarketingListId
42803 return c
42804 }
42805
42806
42807
42808
42809 func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
42810 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42811 return c
42812 }
42813
42814
42815
42816
42817
42818
42819 func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
42820 c.ifNoneMatch_ = entityTag
42821 return c
42822 }
42823
42824
42825
42826
42827 func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
42828 c.ctx_ = ctx
42829 return c
42830 }
42831
42832
42833
42834 func (c *RemarketingListSharesGetCall) Header() http.Header {
42835 if c.header_ == nil {
42836 c.header_ = make(http.Header)
42837 }
42838 return c.header_
42839 }
42840
42841 func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
42842 reqHeaders := make(http.Header)
42843 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42844 for k, v := range c.header_ {
42845 reqHeaders[k] = v
42846 }
42847 reqHeaders.Set("User-Agent", c.s.userAgent())
42848 if c.ifNoneMatch_ != "" {
42849 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42850 }
42851 var body io.Reader = nil
42852 c.urlParams_.Set("alt", alt)
42853 c.urlParams_.Set("prettyPrint", "false")
42854 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares/{remarketingListId}")
42855 urls += "?" + c.urlParams_.Encode()
42856 req, err := http.NewRequest("GET", urls, body)
42857 if err != nil {
42858 return nil, err
42859 }
42860 req.Header = reqHeaders
42861 googleapi.Expand(req.URL, map[string]string{
42862 "profileId": strconv.FormatInt(c.profileId, 10),
42863 "remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
42864 })
42865 return gensupport.SendRequest(c.ctx_, c.s.client, req)
42866 }
42867
42868
42869
42870
42871
42872
42873
42874
42875 func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
42876 gensupport.SetOptions(c.urlParams_, opts...)
42877 res, err := c.doRequest("json")
42878 if res != nil && res.StatusCode == http.StatusNotModified {
42879 if res.Body != nil {
42880 res.Body.Close()
42881 }
42882 return nil, &googleapi.Error{
42883 Code: res.StatusCode,
42884 Header: res.Header,
42885 }
42886 }
42887 if err != nil {
42888 return nil, err
42889 }
42890 defer googleapi.CloseBody(res)
42891 if err := googleapi.CheckResponse(res); err != nil {
42892 return nil, err
42893 }
42894 ret := &RemarketingListShare{
42895 ServerResponse: googleapi.ServerResponse{
42896 Header: res.Header,
42897 HTTPStatusCode: res.StatusCode,
42898 },
42899 }
42900 target := &ret
42901 if err := gensupport.DecodeResponse(target, res); err != nil {
42902 return nil, err
42903 }
42904 return ret, nil
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939 }
42940
42941
42942
42943 type RemarketingListSharesPatchCall struct {
42944 s *Service
42945 profileId int64
42946 remarketinglistshare *RemarketingListShare
42947 urlParams_ gensupport.URLParams
42948 ctx_ context.Context
42949 header_ http.Header
42950 }
42951
42952
42953
42954
42955
42956
42957 func (r *RemarketingListSharesService) Patch(profileId int64, id int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
42958 c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42959 c.profileId = profileId
42960 c.urlParams_.Set("id", fmt.Sprint(id))
42961 c.remarketinglistshare = remarketinglistshare
42962 return c
42963 }
42964
42965
42966
42967
42968 func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
42969 c.urlParams_.Set("fields", googleapi.CombineFields(s))
42970 return c
42971 }
42972
42973
42974
42975
42976 func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
42977 c.ctx_ = ctx
42978 return c
42979 }
42980
42981
42982
42983 func (c *RemarketingListSharesPatchCall) Header() http.Header {
42984 if c.header_ == nil {
42985 c.header_ = make(http.Header)
42986 }
42987 return c.header_
42988 }
42989
42990 func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
42991 reqHeaders := make(http.Header)
42992 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
42993 for k, v := range c.header_ {
42994 reqHeaders[k] = v
42995 }
42996 reqHeaders.Set("User-Agent", c.s.userAgent())
42997 var body io.Reader = nil
42998 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
42999 if err != nil {
43000 return nil, err
43001 }
43002 reqHeaders.Set("Content-Type", "application/json")
43003 c.urlParams_.Set("alt", alt)
43004 c.urlParams_.Set("prettyPrint", "false")
43005 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
43006 urls += "?" + c.urlParams_.Encode()
43007 req, err := http.NewRequest("PATCH", urls, body)
43008 if err != nil {
43009 return nil, err
43010 }
43011 req.Header = reqHeaders
43012 googleapi.Expand(req.URL, map[string]string{
43013 "profileId": strconv.FormatInt(c.profileId, 10),
43014 })
43015 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43016 }
43017
43018
43019
43020
43021
43022
43023
43024
43025 func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
43026 gensupport.SetOptions(c.urlParams_, opts...)
43027 res, err := c.doRequest("json")
43028 if res != nil && res.StatusCode == http.StatusNotModified {
43029 if res.Body != nil {
43030 res.Body.Close()
43031 }
43032 return nil, &googleapi.Error{
43033 Code: res.StatusCode,
43034 Header: res.Header,
43035 }
43036 }
43037 if err != nil {
43038 return nil, err
43039 }
43040 defer googleapi.CloseBody(res)
43041 if err := googleapi.CheckResponse(res); err != nil {
43042 return nil, err
43043 }
43044 ret := &RemarketingListShare{
43045 ServerResponse: googleapi.ServerResponse{
43046 Header: res.Header,
43047 HTTPStatusCode: res.StatusCode,
43048 },
43049 }
43050 target := &ret
43051 if err := gensupport.DecodeResponse(target, res); err != nil {
43052 return nil, err
43053 }
43054 return ret, nil
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080
43081
43082
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092 }
43093
43094
43095
43096 type RemarketingListSharesUpdateCall struct {
43097 s *Service
43098 profileId int64
43099 remarketinglistshare *RemarketingListShare
43100 urlParams_ gensupport.URLParams
43101 ctx_ context.Context
43102 header_ http.Header
43103 }
43104
43105
43106
43107
43108 func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
43109 c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43110 c.profileId = profileId
43111 c.remarketinglistshare = remarketinglistshare
43112 return c
43113 }
43114
43115
43116
43117
43118 func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
43119 c.urlParams_.Set("fields", googleapi.CombineFields(s))
43120 return c
43121 }
43122
43123
43124
43125
43126 func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
43127 c.ctx_ = ctx
43128 return c
43129 }
43130
43131
43132
43133 func (c *RemarketingListSharesUpdateCall) Header() http.Header {
43134 if c.header_ == nil {
43135 c.header_ = make(http.Header)
43136 }
43137 return c.header_
43138 }
43139
43140 func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
43141 reqHeaders := make(http.Header)
43142 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
43143 for k, v := range c.header_ {
43144 reqHeaders[k] = v
43145 }
43146 reqHeaders.Set("User-Agent", c.s.userAgent())
43147 var body io.Reader = nil
43148 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
43149 if err != nil {
43150 return nil, err
43151 }
43152 reqHeaders.Set("Content-Type", "application/json")
43153 c.urlParams_.Set("alt", alt)
43154 c.urlParams_.Set("prettyPrint", "false")
43155 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingListShares")
43156 urls += "?" + c.urlParams_.Encode()
43157 req, err := http.NewRequest("PUT", urls, body)
43158 if err != nil {
43159 return nil, err
43160 }
43161 req.Header = reqHeaders
43162 googleapi.Expand(req.URL, map[string]string{
43163 "profileId": strconv.FormatInt(c.profileId, 10),
43164 })
43165 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43166 }
43167
43168
43169
43170
43171
43172
43173
43174
43175 func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
43176 gensupport.SetOptions(c.urlParams_, opts...)
43177 res, err := c.doRequest("json")
43178 if res != nil && res.StatusCode == http.StatusNotModified {
43179 if res.Body != nil {
43180 res.Body.Close()
43181 }
43182 return nil, &googleapi.Error{
43183 Code: res.StatusCode,
43184 Header: res.Header,
43185 }
43186 }
43187 if err != nil {
43188 return nil, err
43189 }
43190 defer googleapi.CloseBody(res)
43191 if err := googleapi.CheckResponse(res); err != nil {
43192 return nil, err
43193 }
43194 ret := &RemarketingListShare{
43195 ServerResponse: googleapi.ServerResponse{
43196 Header: res.Header,
43197 HTTPStatusCode: res.StatusCode,
43198 },
43199 }
43200 target := &ret
43201 if err := gensupport.DecodeResponse(target, res); err != nil {
43202 return nil, err
43203 }
43204 return ret, nil
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234 }
43235
43236
43237
43238 type RemarketingListsGetCall struct {
43239 s *Service
43240 profileId int64
43241 id int64
43242 urlParams_ gensupport.URLParams
43243 ifNoneMatch_ string
43244 ctx_ context.Context
43245 header_ http.Header
43246 }
43247
43248
43249
43250
43251
43252 func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
43253 c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43254 c.profileId = profileId
43255 c.id = id
43256 return c
43257 }
43258
43259
43260
43261
43262 func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
43263 c.urlParams_.Set("fields", googleapi.CombineFields(s))
43264 return c
43265 }
43266
43267
43268
43269
43270
43271
43272 func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
43273 c.ifNoneMatch_ = entityTag
43274 return c
43275 }
43276
43277
43278
43279
43280 func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
43281 c.ctx_ = ctx
43282 return c
43283 }
43284
43285
43286
43287 func (c *RemarketingListsGetCall) Header() http.Header {
43288 if c.header_ == nil {
43289 c.header_ = make(http.Header)
43290 }
43291 return c.header_
43292 }
43293
43294 func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
43295 reqHeaders := make(http.Header)
43296 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
43297 for k, v := range c.header_ {
43298 reqHeaders[k] = v
43299 }
43300 reqHeaders.Set("User-Agent", c.s.userAgent())
43301 if c.ifNoneMatch_ != "" {
43302 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43303 }
43304 var body io.Reader = nil
43305 c.urlParams_.Set("alt", alt)
43306 c.urlParams_.Set("prettyPrint", "false")
43307 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists/{id}")
43308 urls += "?" + c.urlParams_.Encode()
43309 req, err := http.NewRequest("GET", urls, body)
43310 if err != nil {
43311 return nil, err
43312 }
43313 req.Header = reqHeaders
43314 googleapi.Expand(req.URL, map[string]string{
43315 "profileId": strconv.FormatInt(c.profileId, 10),
43316 "id": strconv.FormatInt(c.id, 10),
43317 })
43318 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43319 }
43320
43321
43322
43323
43324
43325
43326
43327
43328 func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43329 gensupport.SetOptions(c.urlParams_, opts...)
43330 res, err := c.doRequest("json")
43331 if res != nil && res.StatusCode == http.StatusNotModified {
43332 if res.Body != nil {
43333 res.Body.Close()
43334 }
43335 return nil, &googleapi.Error{
43336 Code: res.StatusCode,
43337 Header: res.Header,
43338 }
43339 }
43340 if err != nil {
43341 return nil, err
43342 }
43343 defer googleapi.CloseBody(res)
43344 if err := googleapi.CheckResponse(res); err != nil {
43345 return nil, err
43346 }
43347 ret := &RemarketingList{
43348 ServerResponse: googleapi.ServerResponse{
43349 Header: res.Header,
43350 HTTPStatusCode: res.StatusCode,
43351 },
43352 }
43353 target := &ret
43354 if err := gensupport.DecodeResponse(target, res); err != nil {
43355 return nil, err
43356 }
43357 return ret, nil
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
43386
43387
43388
43389
43390
43391
43392 }
43393
43394
43395
43396 type RemarketingListsInsertCall struct {
43397 s *Service
43398 profileId int64
43399 remarketinglist *RemarketingList
43400 urlParams_ gensupport.URLParams
43401 ctx_ context.Context
43402 header_ http.Header
43403 }
43404
43405
43406
43407
43408 func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
43409 c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43410 c.profileId = profileId
43411 c.remarketinglist = remarketinglist
43412 return c
43413 }
43414
43415
43416
43417
43418 func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
43419 c.urlParams_.Set("fields", googleapi.CombineFields(s))
43420 return c
43421 }
43422
43423
43424
43425
43426 func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
43427 c.ctx_ = ctx
43428 return c
43429 }
43430
43431
43432
43433 func (c *RemarketingListsInsertCall) Header() http.Header {
43434 if c.header_ == nil {
43435 c.header_ = make(http.Header)
43436 }
43437 return c.header_
43438 }
43439
43440 func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
43441 reqHeaders := make(http.Header)
43442 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
43443 for k, v := range c.header_ {
43444 reqHeaders[k] = v
43445 }
43446 reqHeaders.Set("User-Agent", c.s.userAgent())
43447 var body io.Reader = nil
43448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43449 if err != nil {
43450 return nil, err
43451 }
43452 reqHeaders.Set("Content-Type", "application/json")
43453 c.urlParams_.Set("alt", alt)
43454 c.urlParams_.Set("prettyPrint", "false")
43455 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43456 urls += "?" + c.urlParams_.Encode()
43457 req, err := http.NewRequest("POST", urls, body)
43458 if err != nil {
43459 return nil, err
43460 }
43461 req.Header = reqHeaders
43462 googleapi.Expand(req.URL, map[string]string{
43463 "profileId": strconv.FormatInt(c.profileId, 10),
43464 })
43465 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43466 }
43467
43468
43469
43470
43471
43472
43473
43474
43475 func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43476 gensupport.SetOptions(c.urlParams_, opts...)
43477 res, err := c.doRequest("json")
43478 if res != nil && res.StatusCode == http.StatusNotModified {
43479 if res.Body != nil {
43480 res.Body.Close()
43481 }
43482 return nil, &googleapi.Error{
43483 Code: res.StatusCode,
43484 Header: res.Header,
43485 }
43486 }
43487 if err != nil {
43488 return nil, err
43489 }
43490 defer googleapi.CloseBody(res)
43491 if err := googleapi.CheckResponse(res); err != nil {
43492 return nil, err
43493 }
43494 ret := &RemarketingList{
43495 ServerResponse: googleapi.ServerResponse{
43496 Header: res.Header,
43497 HTTPStatusCode: res.StatusCode,
43498 },
43499 }
43500 target := &ret
43501 if err := gensupport.DecodeResponse(target, res); err != nil {
43502 return nil, err
43503 }
43504 return ret, nil
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534 }
43535
43536
43537
43538 type RemarketingListsListCall struct {
43539 s *Service
43540 profileId int64
43541 urlParams_ gensupport.URLParams
43542 ifNoneMatch_ string
43543 ctx_ context.Context
43544 header_ http.Header
43545 }
43546
43547
43548
43549
43550
43551
43552
43553 func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
43554 c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43555 c.profileId = profileId
43556 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
43557 return c
43558 }
43559
43560
43561
43562 func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
43563 c.urlParams_.Set("active", fmt.Sprint(active))
43564 return c
43565 }
43566
43567
43568
43569
43570 func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
43571 c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
43572 return c
43573 }
43574
43575
43576
43577 func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
43578 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43579 return c
43580 }
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590 func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
43591 c.urlParams_.Set("name", name)
43592 return c
43593 }
43594
43595
43596
43597 func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
43598 c.urlParams_.Set("pageToken", pageToken)
43599 return c
43600 }
43601
43602
43603
43604
43605
43606
43607
43608
43609 func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
43610 c.urlParams_.Set("sortField", sortField)
43611 return c
43612 }
43613
43614
43615
43616
43617
43618
43619
43620
43621 func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
43622 c.urlParams_.Set("sortOrder", sortOrder)
43623 return c
43624 }
43625
43626
43627
43628
43629 func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
43630 c.urlParams_.Set("fields", googleapi.CombineFields(s))
43631 return c
43632 }
43633
43634
43635
43636
43637
43638
43639 func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
43640 c.ifNoneMatch_ = entityTag
43641 return c
43642 }
43643
43644
43645
43646
43647 func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
43648 c.ctx_ = ctx
43649 return c
43650 }
43651
43652
43653
43654 func (c *RemarketingListsListCall) Header() http.Header {
43655 if c.header_ == nil {
43656 c.header_ = make(http.Header)
43657 }
43658 return c.header_
43659 }
43660
43661 func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
43662 reqHeaders := make(http.Header)
43663 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
43664 for k, v := range c.header_ {
43665 reqHeaders[k] = v
43666 }
43667 reqHeaders.Set("User-Agent", c.s.userAgent())
43668 if c.ifNoneMatch_ != "" {
43669 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43670 }
43671 var body io.Reader = nil
43672 c.urlParams_.Set("alt", alt)
43673 c.urlParams_.Set("prettyPrint", "false")
43674 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43675 urls += "?" + c.urlParams_.Encode()
43676 req, err := http.NewRequest("GET", urls, body)
43677 if err != nil {
43678 return nil, err
43679 }
43680 req.Header = reqHeaders
43681 googleapi.Expand(req.URL, map[string]string{
43682 "profileId": strconv.FormatInt(c.profileId, 10),
43683 })
43684 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43685 }
43686
43687
43688
43689
43690
43691
43692
43693
43694 func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
43695 gensupport.SetOptions(c.urlParams_, opts...)
43696 res, err := c.doRequest("json")
43697 if res != nil && res.StatusCode == http.StatusNotModified {
43698 if res.Body != nil {
43699 res.Body.Close()
43700 }
43701 return nil, &googleapi.Error{
43702 Code: res.StatusCode,
43703 Header: res.Header,
43704 }
43705 }
43706 if err != nil {
43707 return nil, err
43708 }
43709 defer googleapi.CloseBody(res)
43710 if err := googleapi.CheckResponse(res); err != nil {
43711 return nil, err
43712 }
43713 ret := &RemarketingListsListResponse{
43714 ServerResponse: googleapi.ServerResponse{
43715 Header: res.Header,
43716 HTTPStatusCode: res.StatusCode,
43717 },
43718 }
43719 target := &ret
43720 if err := gensupport.DecodeResponse(target, res); err != nil {
43721 return nil, err
43722 }
43723 return ret, nil
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
43749
43750
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760
43761
43762
43763
43764
43765
43766
43767
43768
43769
43770
43771
43772
43773
43774
43775
43776
43777
43778
43779
43780
43781
43782
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816 }
43817
43818
43819
43820
43821 func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
43822 c.ctx_ = ctx
43823 defer c.PageToken(c.urlParams_.Get("pageToken"))
43824 for {
43825 x, err := c.Do()
43826 if err != nil {
43827 return err
43828 }
43829 if err := f(x); err != nil {
43830 return err
43831 }
43832 if x.NextPageToken == "" {
43833 return nil
43834 }
43835 c.PageToken(x.NextPageToken)
43836 }
43837 }
43838
43839
43840
43841 type RemarketingListsPatchCall struct {
43842 s *Service
43843 profileId int64
43844 remarketinglist *RemarketingList
43845 urlParams_ gensupport.URLParams
43846 ctx_ context.Context
43847 header_ http.Header
43848 }
43849
43850
43851
43852
43853
43854
43855 func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
43856 c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43857 c.profileId = profileId
43858 c.urlParams_.Set("id", fmt.Sprint(id))
43859 c.remarketinglist = remarketinglist
43860 return c
43861 }
43862
43863
43864
43865
43866 func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
43867 c.urlParams_.Set("fields", googleapi.CombineFields(s))
43868 return c
43869 }
43870
43871
43872
43873
43874 func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
43875 c.ctx_ = ctx
43876 return c
43877 }
43878
43879
43880
43881 func (c *RemarketingListsPatchCall) Header() http.Header {
43882 if c.header_ == nil {
43883 c.header_ = make(http.Header)
43884 }
43885 return c.header_
43886 }
43887
43888 func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
43889 reqHeaders := make(http.Header)
43890 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
43891 for k, v := range c.header_ {
43892 reqHeaders[k] = v
43893 }
43894 reqHeaders.Set("User-Agent", c.s.userAgent())
43895 var body io.Reader = nil
43896 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
43897 if err != nil {
43898 return nil, err
43899 }
43900 reqHeaders.Set("Content-Type", "application/json")
43901 c.urlParams_.Set("alt", alt)
43902 c.urlParams_.Set("prettyPrint", "false")
43903 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
43904 urls += "?" + c.urlParams_.Encode()
43905 req, err := http.NewRequest("PATCH", urls, body)
43906 if err != nil {
43907 return nil, err
43908 }
43909 req.Header = reqHeaders
43910 googleapi.Expand(req.URL, map[string]string{
43911 "profileId": strconv.FormatInt(c.profileId, 10),
43912 })
43913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
43914 }
43915
43916
43917
43918
43919
43920
43921
43922
43923 func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
43924 gensupport.SetOptions(c.urlParams_, opts...)
43925 res, err := c.doRequest("json")
43926 if res != nil && res.StatusCode == http.StatusNotModified {
43927 if res.Body != nil {
43928 res.Body.Close()
43929 }
43930 return nil, &googleapi.Error{
43931 Code: res.StatusCode,
43932 Header: res.Header,
43933 }
43934 }
43935 if err != nil {
43936 return nil, err
43937 }
43938 defer googleapi.CloseBody(res)
43939 if err := googleapi.CheckResponse(res); err != nil {
43940 return nil, err
43941 }
43942 ret := &RemarketingList{
43943 ServerResponse: googleapi.ServerResponse{
43944 Header: res.Header,
43945 HTTPStatusCode: res.StatusCode,
43946 },
43947 }
43948 target := &ret
43949 if err := gensupport.DecodeResponse(target, res); err != nil {
43950 return nil, err
43951 }
43952 return ret, nil
43953
43954
43955
43956
43957
43958
43959
43960
43961
43962
43963
43964
43965
43966
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977
43978
43979
43980
43981
43982
43983
43984
43985
43986
43987
43988
43989
43990 }
43991
43992
43993
43994 type RemarketingListsUpdateCall struct {
43995 s *Service
43996 profileId int64
43997 remarketinglist *RemarketingList
43998 urlParams_ gensupport.URLParams
43999 ctx_ context.Context
44000 header_ http.Header
44001 }
44002
44003
44004
44005
44006 func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
44007 c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44008 c.profileId = profileId
44009 c.remarketinglist = remarketinglist
44010 return c
44011 }
44012
44013
44014
44015
44016 func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
44017 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44018 return c
44019 }
44020
44021
44022
44023
44024 func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
44025 c.ctx_ = ctx
44026 return c
44027 }
44028
44029
44030
44031 func (c *RemarketingListsUpdateCall) Header() http.Header {
44032 if c.header_ == nil {
44033 c.header_ = make(http.Header)
44034 }
44035 return c.header_
44036 }
44037
44038 func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
44039 reqHeaders := make(http.Header)
44040 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44041 for k, v := range c.header_ {
44042 reqHeaders[k] = v
44043 }
44044 reqHeaders.Set("User-Agent", c.s.userAgent())
44045 var body io.Reader = nil
44046 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
44047 if err != nil {
44048 return nil, err
44049 }
44050 reqHeaders.Set("Content-Type", "application/json")
44051 c.urlParams_.Set("alt", alt)
44052 c.urlParams_.Set("prettyPrint", "false")
44053 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/remarketingLists")
44054 urls += "?" + c.urlParams_.Encode()
44055 req, err := http.NewRequest("PUT", urls, body)
44056 if err != nil {
44057 return nil, err
44058 }
44059 req.Header = reqHeaders
44060 googleapi.Expand(req.URL, map[string]string{
44061 "profileId": strconv.FormatInt(c.profileId, 10),
44062 })
44063 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44064 }
44065
44066
44067
44068
44069
44070
44071
44072
44073 func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
44074 gensupport.SetOptions(c.urlParams_, opts...)
44075 res, err := c.doRequest("json")
44076 if res != nil && res.StatusCode == http.StatusNotModified {
44077 if res.Body != nil {
44078 res.Body.Close()
44079 }
44080 return nil, &googleapi.Error{
44081 Code: res.StatusCode,
44082 Header: res.Header,
44083 }
44084 }
44085 if err != nil {
44086 return nil, err
44087 }
44088 defer googleapi.CloseBody(res)
44089 if err := googleapi.CheckResponse(res); err != nil {
44090 return nil, err
44091 }
44092 ret := &RemarketingList{
44093 ServerResponse: googleapi.ServerResponse{
44094 Header: res.Header,
44095 HTTPStatusCode: res.StatusCode,
44096 },
44097 }
44098 target := &ret
44099 if err := gensupport.DecodeResponse(target, res); err != nil {
44100 return nil, err
44101 }
44102 return ret, nil
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132 }
44133
44134
44135
44136 type ReportsDeleteCall struct {
44137 s *Service
44138 profileId int64
44139 reportId int64
44140 urlParams_ gensupport.URLParams
44141 ctx_ context.Context
44142 header_ http.Header
44143 }
44144
44145
44146
44147
44148
44149 func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
44150 c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44151 c.profileId = profileId
44152 c.reportId = reportId
44153 return c
44154 }
44155
44156
44157
44158
44159 func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
44160 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44161 return c
44162 }
44163
44164
44165
44166
44167 func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
44168 c.ctx_ = ctx
44169 return c
44170 }
44171
44172
44173
44174 func (c *ReportsDeleteCall) Header() http.Header {
44175 if c.header_ == nil {
44176 c.header_ = make(http.Header)
44177 }
44178 return c.header_
44179 }
44180
44181 func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
44182 reqHeaders := make(http.Header)
44183 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44184 for k, v := range c.header_ {
44185 reqHeaders[k] = v
44186 }
44187 reqHeaders.Set("User-Agent", c.s.userAgent())
44188 var body io.Reader = nil
44189 c.urlParams_.Set("alt", alt)
44190 c.urlParams_.Set("prettyPrint", "false")
44191 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44192 urls += "?" + c.urlParams_.Encode()
44193 req, err := http.NewRequest("DELETE", urls, body)
44194 if err != nil {
44195 return nil, err
44196 }
44197 req.Header = reqHeaders
44198 googleapi.Expand(req.URL, map[string]string{
44199 "profileId": strconv.FormatInt(c.profileId, 10),
44200 "reportId": strconv.FormatInt(c.reportId, 10),
44201 })
44202 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44203 }
44204
44205
44206 func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
44207 gensupport.SetOptions(c.urlParams_, opts...)
44208 res, err := c.doRequest("json")
44209 if err != nil {
44210 return err
44211 }
44212 defer googleapi.CloseBody(res)
44213 if err := googleapi.CheckResponse(res); err != nil {
44214 return err
44215 }
44216 return nil
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248 }
44249
44250
44251
44252 type ReportsGetCall struct {
44253 s *Service
44254 profileId int64
44255 reportId int64
44256 urlParams_ gensupport.URLParams
44257 ifNoneMatch_ string
44258 ctx_ context.Context
44259 header_ http.Header
44260 }
44261
44262
44263
44264
44265
44266 func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
44267 c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44268 c.profileId = profileId
44269 c.reportId = reportId
44270 return c
44271 }
44272
44273
44274
44275
44276 func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
44277 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44278 return c
44279 }
44280
44281
44282
44283
44284
44285
44286 func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
44287 c.ifNoneMatch_ = entityTag
44288 return c
44289 }
44290
44291
44292
44293
44294 func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
44295 c.ctx_ = ctx
44296 return c
44297 }
44298
44299
44300
44301 func (c *ReportsGetCall) Header() http.Header {
44302 if c.header_ == nil {
44303 c.header_ = make(http.Header)
44304 }
44305 return c.header_
44306 }
44307
44308 func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
44309 reqHeaders := make(http.Header)
44310 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44311 for k, v := range c.header_ {
44312 reqHeaders[k] = v
44313 }
44314 reqHeaders.Set("User-Agent", c.s.userAgent())
44315 if c.ifNoneMatch_ != "" {
44316 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44317 }
44318 var body io.Reader = nil
44319 c.urlParams_.Set("alt", alt)
44320 c.urlParams_.Set("prettyPrint", "false")
44321 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44322 urls += "?" + c.urlParams_.Encode()
44323 req, err := http.NewRequest("GET", urls, body)
44324 if err != nil {
44325 return nil, err
44326 }
44327 req.Header = reqHeaders
44328 googleapi.Expand(req.URL, map[string]string{
44329 "profileId": strconv.FormatInt(c.profileId, 10),
44330 "reportId": strconv.FormatInt(c.reportId, 10),
44331 })
44332 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44333 }
44334
44335
44336
44337
44338
44339
44340
44341
44342 func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44343 gensupport.SetOptions(c.urlParams_, opts...)
44344 res, err := c.doRequest("json")
44345 if res != nil && res.StatusCode == http.StatusNotModified {
44346 if res.Body != nil {
44347 res.Body.Close()
44348 }
44349 return nil, &googleapi.Error{
44350 Code: res.StatusCode,
44351 Header: res.Header,
44352 }
44353 }
44354 if err != nil {
44355 return nil, err
44356 }
44357 defer googleapi.CloseBody(res)
44358 if err := googleapi.CheckResponse(res); err != nil {
44359 return nil, err
44360 }
44361 ret := &Report{
44362 ServerResponse: googleapi.ServerResponse{
44363 Header: res.Header,
44364 HTTPStatusCode: res.StatusCode,
44365 },
44366 }
44367 target := &ret
44368 if err := gensupport.DecodeResponse(target, res); err != nil {
44369 return nil, err
44370 }
44371 return ret, nil
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406 }
44407
44408
44409
44410 type ReportsInsertCall struct {
44411 s *Service
44412 profileId int64
44413 report *Report
44414 urlParams_ gensupport.URLParams
44415 ctx_ context.Context
44416 header_ http.Header
44417 }
44418
44419
44420
44421
44422 func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
44423 c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44424 c.profileId = profileId
44425 c.report = report
44426 return c
44427 }
44428
44429
44430
44431
44432 func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
44433 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44434 return c
44435 }
44436
44437
44438
44439
44440 func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
44441 c.ctx_ = ctx
44442 return c
44443 }
44444
44445
44446
44447 func (c *ReportsInsertCall) Header() http.Header {
44448 if c.header_ == nil {
44449 c.header_ = make(http.Header)
44450 }
44451 return c.header_
44452 }
44453
44454 func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
44455 reqHeaders := make(http.Header)
44456 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44457 for k, v := range c.header_ {
44458 reqHeaders[k] = v
44459 }
44460 reqHeaders.Set("User-Agent", c.s.userAgent())
44461 var body io.Reader = nil
44462 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44463 if err != nil {
44464 return nil, err
44465 }
44466 reqHeaders.Set("Content-Type", "application/json")
44467 c.urlParams_.Set("alt", alt)
44468 c.urlParams_.Set("prettyPrint", "false")
44469 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44470 urls += "?" + c.urlParams_.Encode()
44471 req, err := http.NewRequest("POST", urls, body)
44472 if err != nil {
44473 return nil, err
44474 }
44475 req.Header = reqHeaders
44476 googleapi.Expand(req.URL, map[string]string{
44477 "profileId": strconv.FormatInt(c.profileId, 10),
44478 })
44479 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44480 }
44481
44482
44483
44484
44485
44486
44487
44488
44489 func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44490 gensupport.SetOptions(c.urlParams_, opts...)
44491 res, err := c.doRequest("json")
44492 if res != nil && res.StatusCode == http.StatusNotModified {
44493 if res.Body != nil {
44494 res.Body.Close()
44495 }
44496 return nil, &googleapi.Error{
44497 Code: res.StatusCode,
44498 Header: res.Header,
44499 }
44500 }
44501 if err != nil {
44502 return nil, err
44503 }
44504 defer googleapi.CloseBody(res)
44505 if err := googleapi.CheckResponse(res); err != nil {
44506 return nil, err
44507 }
44508 ret := &Report{
44509 ServerResponse: googleapi.ServerResponse{
44510 Header: res.Header,
44511 HTTPStatusCode: res.StatusCode,
44512 },
44513 }
44514 target := &ret
44515 if err := gensupport.DecodeResponse(target, res); err != nil {
44516 return nil, err
44517 }
44518 return ret, nil
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548 }
44549
44550
44551
44552 type ReportsListCall struct {
44553 s *Service
44554 profileId int64
44555 urlParams_ gensupport.URLParams
44556 ifNoneMatch_ string
44557 ctx_ context.Context
44558 header_ http.Header
44559 }
44560
44561
44562
44563
44564 func (r *ReportsService) List(profileId int64) *ReportsListCall {
44565 c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44566 c.profileId = profileId
44567 return c
44568 }
44569
44570
44571
44572 func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
44573 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44574 return c
44575 }
44576
44577
44578
44579 func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
44580 c.urlParams_.Set("pageToken", pageToken)
44581 return c
44582 }
44583
44584
44585
44586
44587
44588
44589
44590
44591 func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
44592 c.urlParams_.Set("scope", scope)
44593 return c
44594 }
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604 func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
44605 c.urlParams_.Set("sortField", sortField)
44606 return c
44607 }
44608
44609
44610
44611
44612
44613
44614
44615
44616 func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
44617 c.urlParams_.Set("sortOrder", sortOrder)
44618 return c
44619 }
44620
44621
44622
44623
44624 func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
44625 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44626 return c
44627 }
44628
44629
44630
44631
44632
44633
44634 func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
44635 c.ifNoneMatch_ = entityTag
44636 return c
44637 }
44638
44639
44640
44641
44642 func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
44643 c.ctx_ = ctx
44644 return c
44645 }
44646
44647
44648
44649 func (c *ReportsListCall) Header() http.Header {
44650 if c.header_ == nil {
44651 c.header_ = make(http.Header)
44652 }
44653 return c.header_
44654 }
44655
44656 func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
44657 reqHeaders := make(http.Header)
44658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44659 for k, v := range c.header_ {
44660 reqHeaders[k] = v
44661 }
44662 reqHeaders.Set("User-Agent", c.s.userAgent())
44663 if c.ifNoneMatch_ != "" {
44664 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44665 }
44666 var body io.Reader = nil
44667 c.urlParams_.Set("alt", alt)
44668 c.urlParams_.Set("prettyPrint", "false")
44669 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
44670 urls += "?" + c.urlParams_.Encode()
44671 req, err := http.NewRequest("GET", urls, body)
44672 if err != nil {
44673 return nil, err
44674 }
44675 req.Header = reqHeaders
44676 googleapi.Expand(req.URL, map[string]string{
44677 "profileId": strconv.FormatInt(c.profileId, 10),
44678 })
44679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44680 }
44681
44682
44683
44684
44685
44686
44687
44688
44689 func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
44690 gensupport.SetOptions(c.urlParams_, opts...)
44691 res, err := c.doRequest("json")
44692 if res != nil && res.StatusCode == http.StatusNotModified {
44693 if res.Body != nil {
44694 res.Body.Close()
44695 }
44696 return nil, &googleapi.Error{
44697 Code: res.StatusCode,
44698 Header: res.Header,
44699 }
44700 }
44701 if err != nil {
44702 return nil, err
44703 }
44704 defer googleapi.CloseBody(res)
44705 if err := googleapi.CheckResponse(res); err != nil {
44706 return nil, err
44707 }
44708 ret := &ReportList{
44709 ServerResponse: googleapi.ServerResponse{
44710 Header: res.Header,
44711 HTTPStatusCode: res.StatusCode,
44712 },
44713 }
44714 target := &ret
44715 if err := gensupport.DecodeResponse(target, res); err != nil {
44716 return nil, err
44717 }
44718 return ret, nil
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803 }
44804
44805
44806
44807
44808 func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
44809 c.ctx_ = ctx
44810 defer c.PageToken(c.urlParams_.Get("pageToken"))
44811 for {
44812 x, err := c.Do()
44813 if err != nil {
44814 return err
44815 }
44816 if err := f(x); err != nil {
44817 return err
44818 }
44819 if x.NextPageToken == "" {
44820 return nil
44821 }
44822 c.PageToken(x.NextPageToken)
44823 }
44824 }
44825
44826
44827
44828 type ReportsPatchCall struct {
44829 s *Service
44830 profileId int64
44831 reportId int64
44832 report *Report
44833 urlParams_ gensupport.URLParams
44834 ctx_ context.Context
44835 header_ http.Header
44836 }
44837
44838
44839
44840
44841
44842
44843 func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
44844 c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44845 c.profileId = profileId
44846 c.reportId = reportId
44847 c.report = report
44848 return c
44849 }
44850
44851
44852
44853
44854 func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
44855 c.urlParams_.Set("fields", googleapi.CombineFields(s))
44856 return c
44857 }
44858
44859
44860
44861
44862 func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
44863 c.ctx_ = ctx
44864 return c
44865 }
44866
44867
44868
44869 func (c *ReportsPatchCall) Header() http.Header {
44870 if c.header_ == nil {
44871 c.header_ = make(http.Header)
44872 }
44873 return c.header_
44874 }
44875
44876 func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
44877 reqHeaders := make(http.Header)
44878 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
44879 for k, v := range c.header_ {
44880 reqHeaders[k] = v
44881 }
44882 reqHeaders.Set("User-Agent", c.s.userAgent())
44883 var body io.Reader = nil
44884 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
44885 if err != nil {
44886 return nil, err
44887 }
44888 reqHeaders.Set("Content-Type", "application/json")
44889 c.urlParams_.Set("alt", alt)
44890 c.urlParams_.Set("prettyPrint", "false")
44891 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
44892 urls += "?" + c.urlParams_.Encode()
44893 req, err := http.NewRequest("PATCH", urls, body)
44894 if err != nil {
44895 return nil, err
44896 }
44897 req.Header = reqHeaders
44898 googleapi.Expand(req.URL, map[string]string{
44899 "profileId": strconv.FormatInt(c.profileId, 10),
44900 "reportId": strconv.FormatInt(c.reportId, 10),
44901 })
44902 return gensupport.SendRequest(c.ctx_, c.s.client, req)
44903 }
44904
44905
44906
44907
44908
44909
44910
44911
44912 func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
44913 gensupport.SetOptions(c.urlParams_, opts...)
44914 res, err := c.doRequest("json")
44915 if res != nil && res.StatusCode == http.StatusNotModified {
44916 if res.Body != nil {
44917 res.Body.Close()
44918 }
44919 return nil, &googleapi.Error{
44920 Code: res.StatusCode,
44921 Header: res.Header,
44922 }
44923 }
44924 if err != nil {
44925 return nil, err
44926 }
44927 defer googleapi.CloseBody(res)
44928 if err := googleapi.CheckResponse(res); err != nil {
44929 return nil, err
44930 }
44931 ret := &Report{
44932 ServerResponse: googleapi.ServerResponse{
44933 Header: res.Header,
44934 HTTPStatusCode: res.StatusCode,
44935 },
44936 }
44937 target := &ret
44938 if err := gensupport.DecodeResponse(target, res); err != nil {
44939 return nil, err
44940 }
44941 return ret, nil
44942
44943
44944
44945
44946
44947
44948
44949
44950
44951
44952
44953
44954
44955
44956
44957
44958
44959
44960
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970
44971
44972
44973
44974
44975
44976
44977
44978
44979 }
44980
44981
44982
44983 type ReportsRunCall struct {
44984 s *Service
44985 profileId int64
44986 reportId int64
44987 urlParams_ gensupport.URLParams
44988 ctx_ context.Context
44989 header_ http.Header
44990 }
44991
44992
44993
44994
44995
44996 func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
44997 c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44998 c.profileId = profileId
44999 c.reportId = reportId
45000 return c
45001 }
45002
45003
45004
45005 func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
45006 c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
45007 return c
45008 }
45009
45010
45011
45012
45013 func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
45014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45015 return c
45016 }
45017
45018
45019
45020
45021 func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
45022 c.ctx_ = ctx
45023 return c
45024 }
45025
45026
45027
45028 func (c *ReportsRunCall) Header() http.Header {
45029 if c.header_ == nil {
45030 c.header_ = make(http.Header)
45031 }
45032 return c.header_
45033 }
45034
45035 func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
45036 reqHeaders := make(http.Header)
45037 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45038 for k, v := range c.header_ {
45039 reqHeaders[k] = v
45040 }
45041 reqHeaders.Set("User-Agent", c.s.userAgent())
45042 var body io.Reader = nil
45043 c.urlParams_.Set("alt", alt)
45044 c.urlParams_.Set("prettyPrint", "false")
45045 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
45046 urls += "?" + c.urlParams_.Encode()
45047 req, err := http.NewRequest("POST", urls, body)
45048 if err != nil {
45049 return nil, err
45050 }
45051 req.Header = reqHeaders
45052 googleapi.Expand(req.URL, map[string]string{
45053 "profileId": strconv.FormatInt(c.profileId, 10),
45054 "reportId": strconv.FormatInt(c.reportId, 10),
45055 })
45056 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45057 }
45058
45059
45060
45061
45062
45063
45064
45065
45066 func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
45067 gensupport.SetOptions(c.urlParams_, opts...)
45068 res, err := c.doRequest("json")
45069 if res != nil && res.StatusCode == http.StatusNotModified {
45070 if res.Body != nil {
45071 res.Body.Close()
45072 }
45073 return nil, &googleapi.Error{
45074 Code: res.StatusCode,
45075 Header: res.Header,
45076 }
45077 }
45078 if err != nil {
45079 return nil, err
45080 }
45081 defer googleapi.CloseBody(res)
45082 if err := googleapi.CheckResponse(res); err != nil {
45083 return nil, err
45084 }
45085 ret := &File{
45086 ServerResponse: googleapi.ServerResponse{
45087 Header: res.Header,
45088 HTTPStatusCode: res.StatusCode,
45089 },
45090 }
45091 target := &ret
45092 if err := gensupport.DecodeResponse(target, res); err != nil {
45093 return nil, err
45094 }
45095 return ret, nil
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136 }
45137
45138
45139
45140 type ReportsUpdateCall struct {
45141 s *Service
45142 profileId int64
45143 reportId int64
45144 report *Report
45145 urlParams_ gensupport.URLParams
45146 ctx_ context.Context
45147 header_ http.Header
45148 }
45149
45150
45151
45152
45153
45154 func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
45155 c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45156 c.profileId = profileId
45157 c.reportId = reportId
45158 c.report = report
45159 return c
45160 }
45161
45162
45163
45164
45165 func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
45166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45167 return c
45168 }
45169
45170
45171
45172
45173 func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
45174 c.ctx_ = ctx
45175 return c
45176 }
45177
45178
45179
45180 func (c *ReportsUpdateCall) Header() http.Header {
45181 if c.header_ == nil {
45182 c.header_ = make(http.Header)
45183 }
45184 return c.header_
45185 }
45186
45187 func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
45188 reqHeaders := make(http.Header)
45189 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45190 for k, v := range c.header_ {
45191 reqHeaders[k] = v
45192 }
45193 reqHeaders.Set("User-Agent", c.s.userAgent())
45194 var body io.Reader = nil
45195 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
45196 if err != nil {
45197 return nil, err
45198 }
45199 reqHeaders.Set("Content-Type", "application/json")
45200 c.urlParams_.Set("alt", alt)
45201 c.urlParams_.Set("prettyPrint", "false")
45202 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
45203 urls += "?" + c.urlParams_.Encode()
45204 req, err := http.NewRequest("PUT", urls, body)
45205 if err != nil {
45206 return nil, err
45207 }
45208 req.Header = reqHeaders
45209 googleapi.Expand(req.URL, map[string]string{
45210 "profileId": strconv.FormatInt(c.profileId, 10),
45211 "reportId": strconv.FormatInt(c.reportId, 10),
45212 })
45213 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45214 }
45215
45216
45217
45218
45219
45220
45221
45222
45223 func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
45224 gensupport.SetOptions(c.urlParams_, opts...)
45225 res, err := c.doRequest("json")
45226 if res != nil && res.StatusCode == http.StatusNotModified {
45227 if res.Body != nil {
45228 res.Body.Close()
45229 }
45230 return nil, &googleapi.Error{
45231 Code: res.StatusCode,
45232 Header: res.Header,
45233 }
45234 }
45235 if err != nil {
45236 return nil, err
45237 }
45238 defer googleapi.CloseBody(res)
45239 if err := googleapi.CheckResponse(res); err != nil {
45240 return nil, err
45241 }
45242 ret := &Report{
45243 ServerResponse: googleapi.ServerResponse{
45244 Header: res.Header,
45245 HTTPStatusCode: res.StatusCode,
45246 },
45247 }
45248 target := &ret
45249 if err := gensupport.DecodeResponse(target, res); err != nil {
45250 return nil, err
45251 }
45252 return ret, nil
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290 }
45291
45292
45293
45294 type ReportsCompatibleFieldsQueryCall struct {
45295 s *Service
45296 profileId int64
45297 report *Report
45298 urlParams_ gensupport.URLParams
45299 ctx_ context.Context
45300 header_ http.Header
45301 }
45302
45303
45304
45305
45306
45307
45308 func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
45309 c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45310 c.profileId = profileId
45311 c.report = report
45312 return c
45313 }
45314
45315
45316
45317
45318 func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
45319 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45320 return c
45321 }
45322
45323
45324
45325
45326 func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
45327 c.ctx_ = ctx
45328 return c
45329 }
45330
45331
45332
45333 func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
45334 if c.header_ == nil {
45335 c.header_ = make(http.Header)
45336 }
45337 return c.header_
45338 }
45339
45340 func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
45341 reqHeaders := make(http.Header)
45342 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45343 for k, v := range c.header_ {
45344 reqHeaders[k] = v
45345 }
45346 reqHeaders.Set("User-Agent", c.s.userAgent())
45347 var body io.Reader = nil
45348 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
45349 if err != nil {
45350 return nil, err
45351 }
45352 reqHeaders.Set("Content-Type", "application/json")
45353 c.urlParams_.Set("alt", alt)
45354 c.urlParams_.Set("prettyPrint", "false")
45355 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
45356 urls += "?" + c.urlParams_.Encode()
45357 req, err := http.NewRequest("POST", urls, body)
45358 if err != nil {
45359 return nil, err
45360 }
45361 req.Header = reqHeaders
45362 googleapi.Expand(req.URL, map[string]string{
45363 "profileId": strconv.FormatInt(c.profileId, 10),
45364 })
45365 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45366 }
45367
45368
45369
45370
45371
45372
45373
45374
45375 func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
45376 gensupport.SetOptions(c.urlParams_, opts...)
45377 res, err := c.doRequest("json")
45378 if res != nil && res.StatusCode == http.StatusNotModified {
45379 if res.Body != nil {
45380 res.Body.Close()
45381 }
45382 return nil, &googleapi.Error{
45383 Code: res.StatusCode,
45384 Header: res.Header,
45385 }
45386 }
45387 if err != nil {
45388 return nil, err
45389 }
45390 defer googleapi.CloseBody(res)
45391 if err := googleapi.CheckResponse(res); err != nil {
45392 return nil, err
45393 }
45394 ret := &CompatibleFields{
45395 ServerResponse: googleapi.ServerResponse{
45396 Header: res.Header,
45397 HTTPStatusCode: res.StatusCode,
45398 },
45399 }
45400 target := &ret
45401 if err := gensupport.DecodeResponse(target, res); err != nil {
45402 return nil, err
45403 }
45404 return ret, nil
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434 }
45435
45436
45437
45438 type ReportsFilesGetCall struct {
45439 s *Service
45440 profileId int64
45441 reportId int64
45442 fileId int64
45443 urlParams_ gensupport.URLParams
45444 ifNoneMatch_ string
45445 ctx_ context.Context
45446 header_ http.Header
45447 }
45448
45449
45450
45451
45452
45453
45454
45455 func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
45456 c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45457 c.profileId = profileId
45458 c.reportId = reportId
45459 c.fileId = fileId
45460 return c
45461 }
45462
45463
45464
45465
45466 func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
45467 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45468 return c
45469 }
45470
45471
45472
45473
45474
45475
45476 func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
45477 c.ifNoneMatch_ = entityTag
45478 return c
45479 }
45480
45481
45482
45483
45484 func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
45485 c.ctx_ = ctx
45486 return c
45487 }
45488
45489
45490
45491 func (c *ReportsFilesGetCall) Header() http.Header {
45492 if c.header_ == nil {
45493 c.header_ = make(http.Header)
45494 }
45495 return c.header_
45496 }
45497
45498 func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
45499 reqHeaders := make(http.Header)
45500 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45501 for k, v := range c.header_ {
45502 reqHeaders[k] = v
45503 }
45504 reqHeaders.Set("User-Agent", c.s.userAgent())
45505 if c.ifNoneMatch_ != "" {
45506 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45507 }
45508 var body io.Reader = nil
45509 c.urlParams_.Set("alt", alt)
45510 c.urlParams_.Set("prettyPrint", "false")
45511 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
45512 urls += "?" + c.urlParams_.Encode()
45513 req, err := http.NewRequest("GET", urls, body)
45514 if err != nil {
45515 return nil, err
45516 }
45517 req.Header = reqHeaders
45518 googleapi.Expand(req.URL, map[string]string{
45519 "profileId": strconv.FormatInt(c.profileId, 10),
45520 "reportId": strconv.FormatInt(c.reportId, 10),
45521 "fileId": strconv.FormatInt(c.fileId, 10),
45522 })
45523 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45524 }
45525
45526
45527
45528
45529 func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
45530 gensupport.SetOptions(c.urlParams_, opts...)
45531 res, err := c.doRequest("media")
45532 if err != nil {
45533 return nil, err
45534 }
45535 if err := googleapi.CheckResponse(res); err != nil {
45536 res.Body.Close()
45537 return nil, err
45538 }
45539 return res, nil
45540 }
45541
45542
45543
45544
45545
45546
45547
45548
45549 func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
45550 gensupport.SetOptions(c.urlParams_, opts...)
45551 res, err := c.doRequest("json")
45552 if res != nil && res.StatusCode == http.StatusNotModified {
45553 if res.Body != nil {
45554 res.Body.Close()
45555 }
45556 return nil, &googleapi.Error{
45557 Code: res.StatusCode,
45558 Header: res.Header,
45559 }
45560 }
45561 if err != nil {
45562 return nil, err
45563 }
45564 defer googleapi.CloseBody(res)
45565 if err := googleapi.CheckResponse(res); err != nil {
45566 return nil, err
45567 }
45568 ret := &File{
45569 ServerResponse: googleapi.ServerResponse{
45570 Header: res.Header,
45571 HTTPStatusCode: res.StatusCode,
45572 },
45573 }
45574 target := &ret
45575 if err := gensupport.DecodeResponse(target, res); err != nil {
45576 return nil, err
45577 }
45578 return ret, nil
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
45609
45610
45611
45612
45613
45614
45615
45616
45617
45618
45619
45620
45621
45622 }
45623
45624
45625
45626 type ReportsFilesListCall struct {
45627 s *Service
45628 profileId int64
45629 reportId int64
45630 urlParams_ gensupport.URLParams
45631 ifNoneMatch_ string
45632 ctx_ context.Context
45633 header_ http.Header
45634 }
45635
45636
45637
45638
45639
45640 func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
45641 c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45642 c.profileId = profileId
45643 c.reportId = reportId
45644 return c
45645 }
45646
45647
45648
45649 func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
45650 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45651 return c
45652 }
45653
45654
45655
45656 func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
45657 c.urlParams_.Set("pageToken", pageToken)
45658 return c
45659 }
45660
45661
45662
45663
45664
45665
45666
45667
45668 func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
45669 c.urlParams_.Set("sortField", sortField)
45670 return c
45671 }
45672
45673
45674
45675
45676
45677
45678
45679
45680 func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
45681 c.urlParams_.Set("sortOrder", sortOrder)
45682 return c
45683 }
45684
45685
45686
45687
45688 func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
45689 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45690 return c
45691 }
45692
45693
45694
45695
45696
45697
45698 func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
45699 c.ifNoneMatch_ = entityTag
45700 return c
45701 }
45702
45703
45704
45705
45706 func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
45707 c.ctx_ = ctx
45708 return c
45709 }
45710
45711
45712
45713 func (c *ReportsFilesListCall) Header() http.Header {
45714 if c.header_ == nil {
45715 c.header_ = make(http.Header)
45716 }
45717 return c.header_
45718 }
45719
45720 func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
45721 reqHeaders := make(http.Header)
45722 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45723 for k, v := range c.header_ {
45724 reqHeaders[k] = v
45725 }
45726 reqHeaders.Set("User-Agent", c.s.userAgent())
45727 if c.ifNoneMatch_ != "" {
45728 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45729 }
45730 var body io.Reader = nil
45731 c.urlParams_.Set("alt", alt)
45732 c.urlParams_.Set("prettyPrint", "false")
45733 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
45734 urls += "?" + c.urlParams_.Encode()
45735 req, err := http.NewRequest("GET", urls, body)
45736 if err != nil {
45737 return nil, err
45738 }
45739 req.Header = reqHeaders
45740 googleapi.Expand(req.URL, map[string]string{
45741 "profileId": strconv.FormatInt(c.profileId, 10),
45742 "reportId": strconv.FormatInt(c.reportId, 10),
45743 })
45744 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45745 }
45746
45747
45748
45749
45750
45751
45752
45753
45754 func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
45755 gensupport.SetOptions(c.urlParams_, opts...)
45756 res, err := c.doRequest("json")
45757 if res != nil && res.StatusCode == http.StatusNotModified {
45758 if res.Body != nil {
45759 res.Body.Close()
45760 }
45761 return nil, &googleapi.Error{
45762 Code: res.StatusCode,
45763 Header: res.Header,
45764 }
45765 }
45766 if err != nil {
45767 return nil, err
45768 }
45769 defer googleapi.CloseBody(res)
45770 if err := googleapi.CheckResponse(res); err != nil {
45771 return nil, err
45772 }
45773 ret := &FileList{
45774 ServerResponse: googleapi.ServerResponse{
45775 Header: res.Header,
45776 HTTPStatusCode: res.StatusCode,
45777 },
45778 }
45779 target := &ret
45780 if err := gensupport.DecodeResponse(target, res); err != nil {
45781 return nil, err
45782 }
45783 return ret, nil
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807
45808
45809
45810
45811
45812
45813
45814
45815
45816
45817
45818
45819
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860 }
45861
45862
45863
45864
45865 func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
45866 c.ctx_ = ctx
45867 defer c.PageToken(c.urlParams_.Get("pageToken"))
45868 for {
45869 x, err := c.Do()
45870 if err != nil {
45871 return err
45872 }
45873 if err := f(x); err != nil {
45874 return err
45875 }
45876 if x.NextPageToken == "" {
45877 return nil
45878 }
45879 c.PageToken(x.NextPageToken)
45880 }
45881 }
45882
45883
45884
45885 type SitesGetCall struct {
45886 s *Service
45887 profileId int64
45888 id int64
45889 urlParams_ gensupport.URLParams
45890 ifNoneMatch_ string
45891 ctx_ context.Context
45892 header_ http.Header
45893 }
45894
45895
45896
45897
45898
45899 func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
45900 c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45901 c.profileId = profileId
45902 c.id = id
45903 return c
45904 }
45905
45906
45907
45908
45909 func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
45910 c.urlParams_.Set("fields", googleapi.CombineFields(s))
45911 return c
45912 }
45913
45914
45915
45916
45917
45918
45919 func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
45920 c.ifNoneMatch_ = entityTag
45921 return c
45922 }
45923
45924
45925
45926
45927 func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
45928 c.ctx_ = ctx
45929 return c
45930 }
45931
45932
45933
45934 func (c *SitesGetCall) Header() http.Header {
45935 if c.header_ == nil {
45936 c.header_ = make(http.Header)
45937 }
45938 return c.header_
45939 }
45940
45941 func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
45942 reqHeaders := make(http.Header)
45943 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
45944 for k, v := range c.header_ {
45945 reqHeaders[k] = v
45946 }
45947 reqHeaders.Set("User-Agent", c.s.userAgent())
45948 if c.ifNoneMatch_ != "" {
45949 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45950 }
45951 var body io.Reader = nil
45952 c.urlParams_.Set("alt", alt)
45953 c.urlParams_.Set("prettyPrint", "false")
45954 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites/{id}")
45955 urls += "?" + c.urlParams_.Encode()
45956 req, err := http.NewRequest("GET", urls, body)
45957 if err != nil {
45958 return nil, err
45959 }
45960 req.Header = reqHeaders
45961 googleapi.Expand(req.URL, map[string]string{
45962 "profileId": strconv.FormatInt(c.profileId, 10),
45963 "id": strconv.FormatInt(c.id, 10),
45964 })
45965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
45966 }
45967
45968
45969
45970
45971
45972
45973
45974
45975 func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
45976 gensupport.SetOptions(c.urlParams_, opts...)
45977 res, err := c.doRequest("json")
45978 if res != nil && res.StatusCode == http.StatusNotModified {
45979 if res.Body != nil {
45980 res.Body.Close()
45981 }
45982 return nil, &googleapi.Error{
45983 Code: res.StatusCode,
45984 Header: res.Header,
45985 }
45986 }
45987 if err != nil {
45988 return nil, err
45989 }
45990 defer googleapi.CloseBody(res)
45991 if err := googleapi.CheckResponse(res); err != nil {
45992 return nil, err
45993 }
45994 ret := &Site{
45995 ServerResponse: googleapi.ServerResponse{
45996 Header: res.Header,
45997 HTTPStatusCode: res.StatusCode,
45998 },
45999 }
46000 target := &ret
46001 if err := gensupport.DecodeResponse(target, res); err != nil {
46002 return nil, err
46003 }
46004 return ret, nil
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039 }
46040
46041
46042
46043 type SitesInsertCall struct {
46044 s *Service
46045 profileId int64
46046 site *Site
46047 urlParams_ gensupport.URLParams
46048 ctx_ context.Context
46049 header_ http.Header
46050 }
46051
46052
46053
46054
46055 func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
46056 c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46057 c.profileId = profileId
46058 c.site = site
46059 return c
46060 }
46061
46062
46063
46064
46065 func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
46066 c.urlParams_.Set("fields", googleapi.CombineFields(s))
46067 return c
46068 }
46069
46070
46071
46072
46073 func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
46074 c.ctx_ = ctx
46075 return c
46076 }
46077
46078
46079
46080 func (c *SitesInsertCall) Header() http.Header {
46081 if c.header_ == nil {
46082 c.header_ = make(http.Header)
46083 }
46084 return c.header_
46085 }
46086
46087 func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
46088 reqHeaders := make(http.Header)
46089 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
46090 for k, v := range c.header_ {
46091 reqHeaders[k] = v
46092 }
46093 reqHeaders.Set("User-Agent", c.s.userAgent())
46094 var body io.Reader = nil
46095 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46096 if err != nil {
46097 return nil, err
46098 }
46099 reqHeaders.Set("Content-Type", "application/json")
46100 c.urlParams_.Set("alt", alt)
46101 c.urlParams_.Set("prettyPrint", "false")
46102 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46103 urls += "?" + c.urlParams_.Encode()
46104 req, err := http.NewRequest("POST", urls, body)
46105 if err != nil {
46106 return nil, err
46107 }
46108 req.Header = reqHeaders
46109 googleapi.Expand(req.URL, map[string]string{
46110 "profileId": strconv.FormatInt(c.profileId, 10),
46111 })
46112 return gensupport.SendRequest(c.ctx_, c.s.client, req)
46113 }
46114
46115
46116
46117
46118
46119
46120
46121
46122 func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46123 gensupport.SetOptions(c.urlParams_, opts...)
46124 res, err := c.doRequest("json")
46125 if res != nil && res.StatusCode == http.StatusNotModified {
46126 if res.Body != nil {
46127 res.Body.Close()
46128 }
46129 return nil, &googleapi.Error{
46130 Code: res.StatusCode,
46131 Header: res.Header,
46132 }
46133 }
46134 if err != nil {
46135 return nil, err
46136 }
46137 defer googleapi.CloseBody(res)
46138 if err := googleapi.CheckResponse(res); err != nil {
46139 return nil, err
46140 }
46141 ret := &Site{
46142 ServerResponse: googleapi.ServerResponse{
46143 Header: res.Header,
46144 HTTPStatusCode: res.StatusCode,
46145 },
46146 }
46147 target := &ret
46148 if err := gensupport.DecodeResponse(target, res); err != nil {
46149 return nil, err
46150 }
46151 return ret, nil
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181 }
46182
46183
46184
46185 type SitesListCall struct {
46186 s *Service
46187 profileId int64
46188 urlParams_ gensupport.URLParams
46189 ifNoneMatch_ string
46190 ctx_ context.Context
46191 header_ http.Header
46192 }
46193
46194
46195
46196
46197
46198 func (r *SitesService) List(profileId int64) *SitesListCall {
46199 c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46200 c.profileId = profileId
46201 return c
46202 }
46203
46204
46205
46206
46207 func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
46208 c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
46209 return c
46210 }
46211
46212
46213
46214
46215 func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
46216 c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
46217 return c
46218 }
46219
46220
46221
46222
46223 func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
46224 c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
46225 return c
46226 }
46227
46228
46229
46230 func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
46231 c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
46232 return c
46233 }
46234
46235
46236
46237 func (c *SitesListCall) Approved(approved bool) *SitesListCall {
46238 c.urlParams_.Set("approved", fmt.Sprint(approved))
46239 return c
46240 }
46241
46242
46243
46244 func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
46245 var campaignIds_ []string
46246 for _, v := range campaignIds {
46247 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
46248 }
46249 c.urlParams_.SetMulti("campaignIds", campaignIds_)
46250 return c
46251 }
46252
46253
46254
46255 func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
46256 var directorySiteIds_ []string
46257 for _, v := range directorySiteIds {
46258 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
46259 }
46260 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
46261 return c
46262 }
46263
46264
46265
46266 func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
46267 var ids_ []string
46268 for _, v := range ids {
46269 ids_ = append(ids_, fmt.Sprint(v))
46270 }
46271 c.urlParams_.SetMulti("ids", ids_)
46272 return c
46273 }
46274
46275
46276
46277 func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
46278 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46279 return c
46280 }
46281
46282
46283
46284 func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
46285 c.urlParams_.Set("pageToken", pageToken)
46286 return c
46287 }
46288
46289
46290
46291
46292
46293
46294
46295
46296 func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
46297 c.urlParams_.Set("searchString", searchString)
46298 return c
46299 }
46300
46301
46302
46303
46304
46305
46306
46307
46308 func (c *SitesListCall) SortField(sortField string) *SitesListCall {
46309 c.urlParams_.Set("sortField", sortField)
46310 return c
46311 }
46312
46313
46314
46315
46316
46317
46318
46319
46320 func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
46321 c.urlParams_.Set("sortOrder", sortOrder)
46322 return c
46323 }
46324
46325
46326
46327 func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
46328 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
46329 return c
46330 }
46331
46332
46333
46334 func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
46335 c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
46336 return c
46337 }
46338
46339
46340
46341
46342 func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
46343 c.urlParams_.Set("fields", googleapi.CombineFields(s))
46344 return c
46345 }
46346
46347
46348
46349
46350
46351
46352 func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
46353 c.ifNoneMatch_ = entityTag
46354 return c
46355 }
46356
46357
46358
46359
46360 func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
46361 c.ctx_ = ctx
46362 return c
46363 }
46364
46365
46366
46367 func (c *SitesListCall) Header() http.Header {
46368 if c.header_ == nil {
46369 c.header_ = make(http.Header)
46370 }
46371 return c.header_
46372 }
46373
46374 func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
46375 reqHeaders := make(http.Header)
46376 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
46377 for k, v := range c.header_ {
46378 reqHeaders[k] = v
46379 }
46380 reqHeaders.Set("User-Agent", c.s.userAgent())
46381 if c.ifNoneMatch_ != "" {
46382 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46383 }
46384 var body io.Reader = nil
46385 c.urlParams_.Set("alt", alt)
46386 c.urlParams_.Set("prettyPrint", "false")
46387 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46388 urls += "?" + c.urlParams_.Encode()
46389 req, err := http.NewRequest("GET", urls, body)
46390 if err != nil {
46391 return nil, err
46392 }
46393 req.Header = reqHeaders
46394 googleapi.Expand(req.URL, map[string]string{
46395 "profileId": strconv.FormatInt(c.profileId, 10),
46396 })
46397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
46398 }
46399
46400
46401
46402
46403
46404
46405
46406
46407 func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
46408 gensupport.SetOptions(c.urlParams_, opts...)
46409 res, err := c.doRequest("json")
46410 if res != nil && res.StatusCode == http.StatusNotModified {
46411 if res.Body != nil {
46412 res.Body.Close()
46413 }
46414 return nil, &googleapi.Error{
46415 Code: res.StatusCode,
46416 Header: res.Header,
46417 }
46418 }
46419 if err != nil {
46420 return nil, err
46421 }
46422 defer googleapi.CloseBody(res)
46423 if err := googleapi.CheckResponse(res); err != nil {
46424 return nil, err
46425 }
46426 ret := &SitesListResponse{
46427 ServerResponse: googleapi.ServerResponse{
46428 Header: res.Header,
46429 HTTPStatusCode: res.StatusCode,
46430 },
46431 }
46432 target := &ret
46433 if err := gensupport.DecodeResponse(target, res); err != nil {
46434 return nil, err
46435 }
46436 return ret, nil
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495
46496
46497
46498
46499
46500
46501
46502
46503
46504
46505
46506
46507
46508
46509
46510
46511
46512
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567 }
46568
46569
46570
46571
46572 func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
46573 c.ctx_ = ctx
46574 defer c.PageToken(c.urlParams_.Get("pageToken"))
46575 for {
46576 x, err := c.Do()
46577 if err != nil {
46578 return err
46579 }
46580 if err := f(x); err != nil {
46581 return err
46582 }
46583 if x.NextPageToken == "" {
46584 return nil
46585 }
46586 c.PageToken(x.NextPageToken)
46587 }
46588 }
46589
46590
46591
46592 type SitesPatchCall struct {
46593 s *Service
46594 profileId int64
46595 site *Site
46596 urlParams_ gensupport.URLParams
46597 ctx_ context.Context
46598 header_ http.Header
46599 }
46600
46601
46602
46603
46604
46605
46606 func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
46607 c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46608 c.profileId = profileId
46609 c.urlParams_.Set("id", fmt.Sprint(id))
46610 c.site = site
46611 return c
46612 }
46613
46614
46615
46616
46617 func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
46618 c.urlParams_.Set("fields", googleapi.CombineFields(s))
46619 return c
46620 }
46621
46622
46623
46624
46625 func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
46626 c.ctx_ = ctx
46627 return c
46628 }
46629
46630
46631
46632 func (c *SitesPatchCall) Header() http.Header {
46633 if c.header_ == nil {
46634 c.header_ = make(http.Header)
46635 }
46636 return c.header_
46637 }
46638
46639 func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
46640 reqHeaders := make(http.Header)
46641 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
46642 for k, v := range c.header_ {
46643 reqHeaders[k] = v
46644 }
46645 reqHeaders.Set("User-Agent", c.s.userAgent())
46646 var body io.Reader = nil
46647 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46648 if err != nil {
46649 return nil, err
46650 }
46651 reqHeaders.Set("Content-Type", "application/json")
46652 c.urlParams_.Set("alt", alt)
46653 c.urlParams_.Set("prettyPrint", "false")
46654 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46655 urls += "?" + c.urlParams_.Encode()
46656 req, err := http.NewRequest("PATCH", urls, body)
46657 if err != nil {
46658 return nil, err
46659 }
46660 req.Header = reqHeaders
46661 googleapi.Expand(req.URL, map[string]string{
46662 "profileId": strconv.FormatInt(c.profileId, 10),
46663 })
46664 return gensupport.SendRequest(c.ctx_, c.s.client, req)
46665 }
46666
46667
46668
46669
46670
46671
46672
46673
46674 func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46675 gensupport.SetOptions(c.urlParams_, opts...)
46676 res, err := c.doRequest("json")
46677 if res != nil && res.StatusCode == http.StatusNotModified {
46678 if res.Body != nil {
46679 res.Body.Close()
46680 }
46681 return nil, &googleapi.Error{
46682 Code: res.StatusCode,
46683 Header: res.Header,
46684 }
46685 }
46686 if err != nil {
46687 return nil, err
46688 }
46689 defer googleapi.CloseBody(res)
46690 if err := googleapi.CheckResponse(res); err != nil {
46691 return nil, err
46692 }
46693 ret := &Site{
46694 ServerResponse: googleapi.ServerResponse{
46695 Header: res.Header,
46696 HTTPStatusCode: res.StatusCode,
46697 },
46698 }
46699 target := &ret
46700 if err := gensupport.DecodeResponse(target, res); err != nil {
46701 return nil, err
46702 }
46703 return ret, nil
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741 }
46742
46743
46744
46745 type SitesUpdateCall struct {
46746 s *Service
46747 profileId int64
46748 site *Site
46749 urlParams_ gensupport.URLParams
46750 ctx_ context.Context
46751 header_ http.Header
46752 }
46753
46754
46755
46756
46757 func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
46758 c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46759 c.profileId = profileId
46760 c.site = site
46761 return c
46762 }
46763
46764
46765
46766
46767 func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
46768 c.urlParams_.Set("fields", googleapi.CombineFields(s))
46769 return c
46770 }
46771
46772
46773
46774
46775 func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
46776 c.ctx_ = ctx
46777 return c
46778 }
46779
46780
46781
46782 func (c *SitesUpdateCall) Header() http.Header {
46783 if c.header_ == nil {
46784 c.header_ = make(http.Header)
46785 }
46786 return c.header_
46787 }
46788
46789 func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
46790 reqHeaders := make(http.Header)
46791 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
46792 for k, v := range c.header_ {
46793 reqHeaders[k] = v
46794 }
46795 reqHeaders.Set("User-Agent", c.s.userAgent())
46796 var body io.Reader = nil
46797 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
46798 if err != nil {
46799 return nil, err
46800 }
46801 reqHeaders.Set("Content-Type", "application/json")
46802 c.urlParams_.Set("alt", alt)
46803 c.urlParams_.Set("prettyPrint", "false")
46804 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sites")
46805 urls += "?" + c.urlParams_.Encode()
46806 req, err := http.NewRequest("PUT", urls, body)
46807 if err != nil {
46808 return nil, err
46809 }
46810 req.Header = reqHeaders
46811 googleapi.Expand(req.URL, map[string]string{
46812 "profileId": strconv.FormatInt(c.profileId, 10),
46813 })
46814 return gensupport.SendRequest(c.ctx_, c.s.client, req)
46815 }
46816
46817
46818
46819
46820
46821
46822
46823
46824 func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
46825 gensupport.SetOptions(c.urlParams_, opts...)
46826 res, err := c.doRequest("json")
46827 if res != nil && res.StatusCode == http.StatusNotModified {
46828 if res.Body != nil {
46829 res.Body.Close()
46830 }
46831 return nil, &googleapi.Error{
46832 Code: res.StatusCode,
46833 Header: res.Header,
46834 }
46835 }
46836 if err != nil {
46837 return nil, err
46838 }
46839 defer googleapi.CloseBody(res)
46840 if err := googleapi.CheckResponse(res); err != nil {
46841 return nil, err
46842 }
46843 ret := &Site{
46844 ServerResponse: googleapi.ServerResponse{
46845 Header: res.Header,
46846 HTTPStatusCode: res.StatusCode,
46847 },
46848 }
46849 target := &ret
46850 if err := gensupport.DecodeResponse(target, res); err != nil {
46851 return nil, err
46852 }
46853 return ret, nil
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883 }
46884
46885
46886
46887 type SizesGetCall struct {
46888 s *Service
46889 profileId int64
46890 id int64
46891 urlParams_ gensupport.URLParams
46892 ifNoneMatch_ string
46893 ctx_ context.Context
46894 header_ http.Header
46895 }
46896
46897
46898
46899
46900
46901 func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
46902 c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46903 c.profileId = profileId
46904 c.id = id
46905 return c
46906 }
46907
46908
46909
46910
46911 func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
46912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
46913 return c
46914 }
46915
46916
46917
46918
46919
46920
46921 func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
46922 c.ifNoneMatch_ = entityTag
46923 return c
46924 }
46925
46926
46927
46928
46929 func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
46930 c.ctx_ = ctx
46931 return c
46932 }
46933
46934
46935
46936 func (c *SizesGetCall) Header() http.Header {
46937 if c.header_ == nil {
46938 c.header_ = make(http.Header)
46939 }
46940 return c.header_
46941 }
46942
46943 func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
46944 reqHeaders := make(http.Header)
46945 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
46946 for k, v := range c.header_ {
46947 reqHeaders[k] = v
46948 }
46949 reqHeaders.Set("User-Agent", c.s.userAgent())
46950 if c.ifNoneMatch_ != "" {
46951 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
46952 }
46953 var body io.Reader = nil
46954 c.urlParams_.Set("alt", alt)
46955 c.urlParams_.Set("prettyPrint", "false")
46956 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes/{id}")
46957 urls += "?" + c.urlParams_.Encode()
46958 req, err := http.NewRequest("GET", urls, body)
46959 if err != nil {
46960 return nil, err
46961 }
46962 req.Header = reqHeaders
46963 googleapi.Expand(req.URL, map[string]string{
46964 "profileId": strconv.FormatInt(c.profileId, 10),
46965 "id": strconv.FormatInt(c.id, 10),
46966 })
46967 return gensupport.SendRequest(c.ctx_, c.s.client, req)
46968 }
46969
46970
46971
46972
46973
46974
46975
46976
46977 func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
46978 gensupport.SetOptions(c.urlParams_, opts...)
46979 res, err := c.doRequest("json")
46980 if res != nil && res.StatusCode == http.StatusNotModified {
46981 if res.Body != nil {
46982 res.Body.Close()
46983 }
46984 return nil, &googleapi.Error{
46985 Code: res.StatusCode,
46986 Header: res.Header,
46987 }
46988 }
46989 if err != nil {
46990 return nil, err
46991 }
46992 defer googleapi.CloseBody(res)
46993 if err := googleapi.CheckResponse(res); err != nil {
46994 return nil, err
46995 }
46996 ret := &Size{
46997 ServerResponse: googleapi.ServerResponse{
46998 Header: res.Header,
46999 HTTPStatusCode: res.StatusCode,
47000 },
47001 }
47002 target := &ret
47003 if err := gensupport.DecodeResponse(target, res); err != nil {
47004 return nil, err
47005 }
47006 return ret, nil
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041 }
47042
47043
47044
47045 type SizesInsertCall struct {
47046 s *Service
47047 profileId int64
47048 size *Size
47049 urlParams_ gensupport.URLParams
47050 ctx_ context.Context
47051 header_ http.Header
47052 }
47053
47054
47055
47056
47057 func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
47058 c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47059 c.profileId = profileId
47060 c.size = size
47061 return c
47062 }
47063
47064
47065
47066
47067 func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
47068 c.urlParams_.Set("fields", googleapi.CombineFields(s))
47069 return c
47070 }
47071
47072
47073
47074
47075 func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
47076 c.ctx_ = ctx
47077 return c
47078 }
47079
47080
47081
47082 func (c *SizesInsertCall) Header() http.Header {
47083 if c.header_ == nil {
47084 c.header_ = make(http.Header)
47085 }
47086 return c.header_
47087 }
47088
47089 func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
47090 reqHeaders := make(http.Header)
47091 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
47092 for k, v := range c.header_ {
47093 reqHeaders[k] = v
47094 }
47095 reqHeaders.Set("User-Agent", c.s.userAgent())
47096 var body io.Reader = nil
47097 body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
47098 if err != nil {
47099 return nil, err
47100 }
47101 reqHeaders.Set("Content-Type", "application/json")
47102 c.urlParams_.Set("alt", alt)
47103 c.urlParams_.Set("prettyPrint", "false")
47104 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
47105 urls += "?" + c.urlParams_.Encode()
47106 req, err := http.NewRequest("POST", urls, body)
47107 if err != nil {
47108 return nil, err
47109 }
47110 req.Header = reqHeaders
47111 googleapi.Expand(req.URL, map[string]string{
47112 "profileId": strconv.FormatInt(c.profileId, 10),
47113 })
47114 return gensupport.SendRequest(c.ctx_, c.s.client, req)
47115 }
47116
47117
47118
47119
47120
47121
47122
47123
47124 func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
47125 gensupport.SetOptions(c.urlParams_, opts...)
47126 res, err := c.doRequest("json")
47127 if res != nil && res.StatusCode == http.StatusNotModified {
47128 if res.Body != nil {
47129 res.Body.Close()
47130 }
47131 return nil, &googleapi.Error{
47132 Code: res.StatusCode,
47133 Header: res.Header,
47134 }
47135 }
47136 if err != nil {
47137 return nil, err
47138 }
47139 defer googleapi.CloseBody(res)
47140 if err := googleapi.CheckResponse(res); err != nil {
47141 return nil, err
47142 }
47143 ret := &Size{
47144 ServerResponse: googleapi.ServerResponse{
47145 Header: res.Header,
47146 HTTPStatusCode: res.StatusCode,
47147 },
47148 }
47149 target := &ret
47150 if err := gensupport.DecodeResponse(target, res); err != nil {
47151 return nil, err
47152 }
47153 return ret, nil
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183 }
47184
47185
47186
47187 type SizesListCall struct {
47188 s *Service
47189 profileId int64
47190 urlParams_ gensupport.URLParams
47191 ifNoneMatch_ string
47192 ctx_ context.Context
47193 header_ http.Header
47194 }
47195
47196
47197
47198
47199
47200
47201
47202 func (r *SizesService) List(profileId int64) *SizesListCall {
47203 c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47204 c.profileId = profileId
47205 return c
47206 }
47207
47208
47209
47210 func (c *SizesListCall) Height(height int64) *SizesListCall {
47211 c.urlParams_.Set("height", fmt.Sprint(height))
47212 return c
47213 }
47214
47215
47216
47217 func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
47218 c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
47219 return c
47220 }
47221
47222
47223
47224 func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
47225 var ids_ []string
47226 for _, v := range ids {
47227 ids_ = append(ids_, fmt.Sprint(v))
47228 }
47229 c.urlParams_.SetMulti("ids", ids_)
47230 return c
47231 }
47232
47233
47234
47235 func (c *SizesListCall) Width(width int64) *SizesListCall {
47236 c.urlParams_.Set("width", fmt.Sprint(width))
47237 return c
47238 }
47239
47240
47241
47242
47243 func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
47244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
47245 return c
47246 }
47247
47248
47249
47250
47251
47252
47253 func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
47254 c.ifNoneMatch_ = entityTag
47255 return c
47256 }
47257
47258
47259
47260
47261 func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
47262 c.ctx_ = ctx
47263 return c
47264 }
47265
47266
47267
47268 func (c *SizesListCall) Header() http.Header {
47269 if c.header_ == nil {
47270 c.header_ = make(http.Header)
47271 }
47272 return c.header_
47273 }
47274
47275 func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
47276 reqHeaders := make(http.Header)
47277 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
47278 for k, v := range c.header_ {
47279 reqHeaders[k] = v
47280 }
47281 reqHeaders.Set("User-Agent", c.s.userAgent())
47282 if c.ifNoneMatch_ != "" {
47283 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47284 }
47285 var body io.Reader = nil
47286 c.urlParams_.Set("alt", alt)
47287 c.urlParams_.Set("prettyPrint", "false")
47288 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/sizes")
47289 urls += "?" + c.urlParams_.Encode()
47290 req, err := http.NewRequest("GET", urls, body)
47291 if err != nil {
47292 return nil, err
47293 }
47294 req.Header = reqHeaders
47295 googleapi.Expand(req.URL, map[string]string{
47296 "profileId": strconv.FormatInt(c.profileId, 10),
47297 })
47298 return gensupport.SendRequest(c.ctx_, c.s.client, req)
47299 }
47300
47301
47302
47303
47304
47305
47306
47307
47308 func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
47309 gensupport.SetOptions(c.urlParams_, opts...)
47310 res, err := c.doRequest("json")
47311 if res != nil && res.StatusCode == http.StatusNotModified {
47312 if res.Body != nil {
47313 res.Body.Close()
47314 }
47315 return nil, &googleapi.Error{
47316 Code: res.StatusCode,
47317 Header: res.Header,
47318 }
47319 }
47320 if err != nil {
47321 return nil, err
47322 }
47323 defer googleapi.CloseBody(res)
47324 if err := googleapi.CheckResponse(res); err != nil {
47325 return nil, err
47326 }
47327 ret := &SizesListResponse{
47328 ServerResponse: googleapi.ServerResponse{
47329 Header: res.Header,
47330 HTTPStatusCode: res.StatusCode,
47331 },
47332 }
47333 target := &ret
47334 if err := gensupport.DecodeResponse(target, res); err != nil {
47335 return nil, err
47336 }
47337 return ret, nil
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392 }
47393
47394
47395
47396 type SubaccountsGetCall struct {
47397 s *Service
47398 profileId int64
47399 id int64
47400 urlParams_ gensupport.URLParams
47401 ifNoneMatch_ string
47402 ctx_ context.Context
47403 header_ http.Header
47404 }
47405
47406
47407
47408
47409
47410 func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
47411 c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47412 c.profileId = profileId
47413 c.id = id
47414 return c
47415 }
47416
47417
47418
47419
47420 func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
47421 c.urlParams_.Set("fields", googleapi.CombineFields(s))
47422 return c
47423 }
47424
47425
47426
47427
47428
47429
47430 func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
47431 c.ifNoneMatch_ = entityTag
47432 return c
47433 }
47434
47435
47436
47437
47438 func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
47439 c.ctx_ = ctx
47440 return c
47441 }
47442
47443
47444
47445 func (c *SubaccountsGetCall) Header() http.Header {
47446 if c.header_ == nil {
47447 c.header_ = make(http.Header)
47448 }
47449 return c.header_
47450 }
47451
47452 func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
47453 reqHeaders := make(http.Header)
47454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
47455 for k, v := range c.header_ {
47456 reqHeaders[k] = v
47457 }
47458 reqHeaders.Set("User-Agent", c.s.userAgent())
47459 if c.ifNoneMatch_ != "" {
47460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47461 }
47462 var body io.Reader = nil
47463 c.urlParams_.Set("alt", alt)
47464 c.urlParams_.Set("prettyPrint", "false")
47465 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts/{id}")
47466 urls += "?" + c.urlParams_.Encode()
47467 req, err := http.NewRequest("GET", urls, body)
47468 if err != nil {
47469 return nil, err
47470 }
47471 req.Header = reqHeaders
47472 googleapi.Expand(req.URL, map[string]string{
47473 "profileId": strconv.FormatInt(c.profileId, 10),
47474 "id": strconv.FormatInt(c.id, 10),
47475 })
47476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
47477 }
47478
47479
47480
47481
47482
47483
47484
47485
47486 func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47487 gensupport.SetOptions(c.urlParams_, opts...)
47488 res, err := c.doRequest("json")
47489 if res != nil && res.StatusCode == http.StatusNotModified {
47490 if res.Body != nil {
47491 res.Body.Close()
47492 }
47493 return nil, &googleapi.Error{
47494 Code: res.StatusCode,
47495 Header: res.Header,
47496 }
47497 }
47498 if err != nil {
47499 return nil, err
47500 }
47501 defer googleapi.CloseBody(res)
47502 if err := googleapi.CheckResponse(res); err != nil {
47503 return nil, err
47504 }
47505 ret := &Subaccount{
47506 ServerResponse: googleapi.ServerResponse{
47507 Header: res.Header,
47508 HTTPStatusCode: res.StatusCode,
47509 },
47510 }
47511 target := &ret
47512 if err := gensupport.DecodeResponse(target, res); err != nil {
47513 return nil, err
47514 }
47515 return ret, nil
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550 }
47551
47552
47553
47554 type SubaccountsInsertCall struct {
47555 s *Service
47556 profileId int64
47557 subaccount *Subaccount
47558 urlParams_ gensupport.URLParams
47559 ctx_ context.Context
47560 header_ http.Header
47561 }
47562
47563
47564
47565
47566 func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
47567 c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47568 c.profileId = profileId
47569 c.subaccount = subaccount
47570 return c
47571 }
47572
47573
47574
47575
47576 func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
47577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
47578 return c
47579 }
47580
47581
47582
47583
47584 func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
47585 c.ctx_ = ctx
47586 return c
47587 }
47588
47589
47590
47591 func (c *SubaccountsInsertCall) Header() http.Header {
47592 if c.header_ == nil {
47593 c.header_ = make(http.Header)
47594 }
47595 return c.header_
47596 }
47597
47598 func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
47599 reqHeaders := make(http.Header)
47600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
47601 for k, v := range c.header_ {
47602 reqHeaders[k] = v
47603 }
47604 reqHeaders.Set("User-Agent", c.s.userAgent())
47605 var body io.Reader = nil
47606 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
47607 if err != nil {
47608 return nil, err
47609 }
47610 reqHeaders.Set("Content-Type", "application/json")
47611 c.urlParams_.Set("alt", alt)
47612 c.urlParams_.Set("prettyPrint", "false")
47613 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47614 urls += "?" + c.urlParams_.Encode()
47615 req, err := http.NewRequest("POST", urls, body)
47616 if err != nil {
47617 return nil, err
47618 }
47619 req.Header = reqHeaders
47620 googleapi.Expand(req.URL, map[string]string{
47621 "profileId": strconv.FormatInt(c.profileId, 10),
47622 })
47623 return gensupport.SendRequest(c.ctx_, c.s.client, req)
47624 }
47625
47626
47627
47628
47629
47630
47631
47632
47633 func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
47634 gensupport.SetOptions(c.urlParams_, opts...)
47635 res, err := c.doRequest("json")
47636 if res != nil && res.StatusCode == http.StatusNotModified {
47637 if res.Body != nil {
47638 res.Body.Close()
47639 }
47640 return nil, &googleapi.Error{
47641 Code: res.StatusCode,
47642 Header: res.Header,
47643 }
47644 }
47645 if err != nil {
47646 return nil, err
47647 }
47648 defer googleapi.CloseBody(res)
47649 if err := googleapi.CheckResponse(res); err != nil {
47650 return nil, err
47651 }
47652 ret := &Subaccount{
47653 ServerResponse: googleapi.ServerResponse{
47654 Header: res.Header,
47655 HTTPStatusCode: res.StatusCode,
47656 },
47657 }
47658 target := &ret
47659 if err := gensupport.DecodeResponse(target, res); err != nil {
47660 return nil, err
47661 }
47662 return ret, nil
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692 }
47693
47694
47695
47696 type SubaccountsListCall struct {
47697 s *Service
47698 profileId int64
47699 urlParams_ gensupport.URLParams
47700 ifNoneMatch_ string
47701 ctx_ context.Context
47702 header_ http.Header
47703 }
47704
47705
47706
47707
47708
47709 func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
47710 c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47711 c.profileId = profileId
47712 return c
47713 }
47714
47715
47716
47717 func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
47718 var ids_ []string
47719 for _, v := range ids {
47720 ids_ = append(ids_, fmt.Sprint(v))
47721 }
47722 c.urlParams_.SetMulti("ids", ids_)
47723 return c
47724 }
47725
47726
47727
47728 func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
47729 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47730 return c
47731 }
47732
47733
47734
47735 func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
47736 c.urlParams_.Set("pageToken", pageToken)
47737 return c
47738 }
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748 func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
47749 c.urlParams_.Set("searchString", searchString)
47750 return c
47751 }
47752
47753
47754
47755
47756
47757
47758
47759
47760 func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
47761 c.urlParams_.Set("sortField", sortField)
47762 return c
47763 }
47764
47765
47766
47767
47768
47769
47770
47771
47772 func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
47773 c.urlParams_.Set("sortOrder", sortOrder)
47774 return c
47775 }
47776
47777
47778
47779
47780 func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
47781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
47782 return c
47783 }
47784
47785
47786
47787
47788
47789
47790 func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
47791 c.ifNoneMatch_ = entityTag
47792 return c
47793 }
47794
47795
47796
47797
47798 func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
47799 c.ctx_ = ctx
47800 return c
47801 }
47802
47803
47804
47805 func (c *SubaccountsListCall) Header() http.Header {
47806 if c.header_ == nil {
47807 c.header_ = make(http.Header)
47808 }
47809 return c.header_
47810 }
47811
47812 func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
47813 reqHeaders := make(http.Header)
47814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
47815 for k, v := range c.header_ {
47816 reqHeaders[k] = v
47817 }
47818 reqHeaders.Set("User-Agent", c.s.userAgent())
47819 if c.ifNoneMatch_ != "" {
47820 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
47821 }
47822 var body io.Reader = nil
47823 c.urlParams_.Set("alt", alt)
47824 c.urlParams_.Set("prettyPrint", "false")
47825 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
47826 urls += "?" + c.urlParams_.Encode()
47827 req, err := http.NewRequest("GET", urls, body)
47828 if err != nil {
47829 return nil, err
47830 }
47831 req.Header = reqHeaders
47832 googleapi.Expand(req.URL, map[string]string{
47833 "profileId": strconv.FormatInt(c.profileId, 10),
47834 })
47835 return gensupport.SendRequest(c.ctx_, c.s.client, req)
47836 }
47837
47838
47839
47840
47841
47842
47843
47844
47845 func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
47846 gensupport.SetOptions(c.urlParams_, opts...)
47847 res, err := c.doRequest("json")
47848 if res != nil && res.StatusCode == http.StatusNotModified {
47849 if res.Body != nil {
47850 res.Body.Close()
47851 }
47852 return nil, &googleapi.Error{
47853 Code: res.StatusCode,
47854 Header: res.Header,
47855 }
47856 }
47857 if err != nil {
47858 return nil, err
47859 }
47860 defer googleapi.CloseBody(res)
47861 if err := googleapi.CheckResponse(res); err != nil {
47862 return nil, err
47863 }
47864 ret := &SubaccountsListResponse{
47865 ServerResponse: googleapi.ServerResponse{
47866 Header: res.Header,
47867 HTTPStatusCode: res.StatusCode,
47868 },
47869 }
47870 target := &ret
47871 if err := gensupport.DecodeResponse(target, res); err != nil {
47872 return nil, err
47873 }
47874 return ret, nil
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955 }
47956
47957
47958
47959
47960 func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
47961 c.ctx_ = ctx
47962 defer c.PageToken(c.urlParams_.Get("pageToken"))
47963 for {
47964 x, err := c.Do()
47965 if err != nil {
47966 return err
47967 }
47968 if err := f(x); err != nil {
47969 return err
47970 }
47971 if x.NextPageToken == "" {
47972 return nil
47973 }
47974 c.PageToken(x.NextPageToken)
47975 }
47976 }
47977
47978
47979
47980 type SubaccountsPatchCall struct {
47981 s *Service
47982 profileId int64
47983 subaccount *Subaccount
47984 urlParams_ gensupport.URLParams
47985 ctx_ context.Context
47986 header_ http.Header
47987 }
47988
47989
47990
47991
47992
47993
47994 func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
47995 c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47996 c.profileId = profileId
47997 c.urlParams_.Set("id", fmt.Sprint(id))
47998 c.subaccount = subaccount
47999 return c
48000 }
48001
48002
48003
48004
48005 func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
48006 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48007 return c
48008 }
48009
48010
48011
48012
48013 func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
48014 c.ctx_ = ctx
48015 return c
48016 }
48017
48018
48019
48020 func (c *SubaccountsPatchCall) Header() http.Header {
48021 if c.header_ == nil {
48022 c.header_ = make(http.Header)
48023 }
48024 return c.header_
48025 }
48026
48027 func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
48028 reqHeaders := make(http.Header)
48029 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48030 for k, v := range c.header_ {
48031 reqHeaders[k] = v
48032 }
48033 reqHeaders.Set("User-Agent", c.s.userAgent())
48034 var body io.Reader = nil
48035 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
48036 if err != nil {
48037 return nil, err
48038 }
48039 reqHeaders.Set("Content-Type", "application/json")
48040 c.urlParams_.Set("alt", alt)
48041 c.urlParams_.Set("prettyPrint", "false")
48042 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
48043 urls += "?" + c.urlParams_.Encode()
48044 req, err := http.NewRequest("PATCH", urls, body)
48045 if err != nil {
48046 return nil, err
48047 }
48048 req.Header = reqHeaders
48049 googleapi.Expand(req.URL, map[string]string{
48050 "profileId": strconv.FormatInt(c.profileId, 10),
48051 })
48052 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48053 }
48054
48055
48056
48057
48058
48059
48060
48061
48062 func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
48063 gensupport.SetOptions(c.urlParams_, opts...)
48064 res, err := c.doRequest("json")
48065 if res != nil && res.StatusCode == http.StatusNotModified {
48066 if res.Body != nil {
48067 res.Body.Close()
48068 }
48069 return nil, &googleapi.Error{
48070 Code: res.StatusCode,
48071 Header: res.Header,
48072 }
48073 }
48074 if err != nil {
48075 return nil, err
48076 }
48077 defer googleapi.CloseBody(res)
48078 if err := googleapi.CheckResponse(res); err != nil {
48079 return nil, err
48080 }
48081 ret := &Subaccount{
48082 ServerResponse: googleapi.ServerResponse{
48083 Header: res.Header,
48084 HTTPStatusCode: res.StatusCode,
48085 },
48086 }
48087 target := &ret
48088 if err := gensupport.DecodeResponse(target, res); err != nil {
48089 return nil, err
48090 }
48091 return ret, nil
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129 }
48130
48131
48132
48133 type SubaccountsUpdateCall struct {
48134 s *Service
48135 profileId int64
48136 subaccount *Subaccount
48137 urlParams_ gensupport.URLParams
48138 ctx_ context.Context
48139 header_ http.Header
48140 }
48141
48142
48143
48144
48145 func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
48146 c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48147 c.profileId = profileId
48148 c.subaccount = subaccount
48149 return c
48150 }
48151
48152
48153
48154
48155 func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
48156 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48157 return c
48158 }
48159
48160
48161
48162
48163 func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
48164 c.ctx_ = ctx
48165 return c
48166 }
48167
48168
48169
48170 func (c *SubaccountsUpdateCall) Header() http.Header {
48171 if c.header_ == nil {
48172 c.header_ = make(http.Header)
48173 }
48174 return c.header_
48175 }
48176
48177 func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
48178 reqHeaders := make(http.Header)
48179 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48180 for k, v := range c.header_ {
48181 reqHeaders[k] = v
48182 }
48183 reqHeaders.Set("User-Agent", c.s.userAgent())
48184 var body io.Reader = nil
48185 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
48186 if err != nil {
48187 return nil, err
48188 }
48189 reqHeaders.Set("Content-Type", "application/json")
48190 c.urlParams_.Set("alt", alt)
48191 c.urlParams_.Set("prettyPrint", "false")
48192 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/subaccounts")
48193 urls += "?" + c.urlParams_.Encode()
48194 req, err := http.NewRequest("PUT", urls, body)
48195 if err != nil {
48196 return nil, err
48197 }
48198 req.Header = reqHeaders
48199 googleapi.Expand(req.URL, map[string]string{
48200 "profileId": strconv.FormatInt(c.profileId, 10),
48201 })
48202 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48203 }
48204
48205
48206
48207
48208
48209
48210
48211
48212 func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
48213 gensupport.SetOptions(c.urlParams_, opts...)
48214 res, err := c.doRequest("json")
48215 if res != nil && res.StatusCode == http.StatusNotModified {
48216 if res.Body != nil {
48217 res.Body.Close()
48218 }
48219 return nil, &googleapi.Error{
48220 Code: res.StatusCode,
48221 Header: res.Header,
48222 }
48223 }
48224 if err != nil {
48225 return nil, err
48226 }
48227 defer googleapi.CloseBody(res)
48228 if err := googleapi.CheckResponse(res); err != nil {
48229 return nil, err
48230 }
48231 ret := &Subaccount{
48232 ServerResponse: googleapi.ServerResponse{
48233 Header: res.Header,
48234 HTTPStatusCode: res.StatusCode,
48235 },
48236 }
48237 target := &ret
48238 if err := gensupport.DecodeResponse(target, res); err != nil {
48239 return nil, err
48240 }
48241 return ret, nil
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271 }
48272
48273
48274
48275 type TargetableRemarketingListsGetCall struct {
48276 s *Service
48277 profileId int64
48278 id int64
48279 urlParams_ gensupport.URLParams
48280 ifNoneMatch_ string
48281 ctx_ context.Context
48282 header_ http.Header
48283 }
48284
48285
48286
48287
48288
48289 func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
48290 c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48291 c.profileId = profileId
48292 c.id = id
48293 return c
48294 }
48295
48296
48297
48298
48299 func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
48300 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48301 return c
48302 }
48303
48304
48305
48306
48307
48308
48309 func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
48310 c.ifNoneMatch_ = entityTag
48311 return c
48312 }
48313
48314
48315
48316
48317 func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
48318 c.ctx_ = ctx
48319 return c
48320 }
48321
48322
48323
48324 func (c *TargetableRemarketingListsGetCall) Header() http.Header {
48325 if c.header_ == nil {
48326 c.header_ = make(http.Header)
48327 }
48328 return c.header_
48329 }
48330
48331 func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
48332 reqHeaders := make(http.Header)
48333 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48334 for k, v := range c.header_ {
48335 reqHeaders[k] = v
48336 }
48337 reqHeaders.Set("User-Agent", c.s.userAgent())
48338 if c.ifNoneMatch_ != "" {
48339 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48340 }
48341 var body io.Reader = nil
48342 c.urlParams_.Set("alt", alt)
48343 c.urlParams_.Set("prettyPrint", "false")
48344 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists/{id}")
48345 urls += "?" + c.urlParams_.Encode()
48346 req, err := http.NewRequest("GET", urls, body)
48347 if err != nil {
48348 return nil, err
48349 }
48350 req.Header = reqHeaders
48351 googleapi.Expand(req.URL, map[string]string{
48352 "profileId": strconv.FormatInt(c.profileId, 10),
48353 "id": strconv.FormatInt(c.id, 10),
48354 })
48355 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48356 }
48357
48358
48359
48360
48361
48362
48363
48364
48365 func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
48366 gensupport.SetOptions(c.urlParams_, opts...)
48367 res, err := c.doRequest("json")
48368 if res != nil && res.StatusCode == http.StatusNotModified {
48369 if res.Body != nil {
48370 res.Body.Close()
48371 }
48372 return nil, &googleapi.Error{
48373 Code: res.StatusCode,
48374 Header: res.Header,
48375 }
48376 }
48377 if err != nil {
48378 return nil, err
48379 }
48380 defer googleapi.CloseBody(res)
48381 if err := googleapi.CheckResponse(res); err != nil {
48382 return nil, err
48383 }
48384 ret := &TargetableRemarketingList{
48385 ServerResponse: googleapi.ServerResponse{
48386 Header: res.Header,
48387 HTTPStatusCode: res.StatusCode,
48388 },
48389 }
48390 target := &ret
48391 if err := gensupport.DecodeResponse(target, res); err != nil {
48392 return nil, err
48393 }
48394 return ret, nil
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429 }
48430
48431
48432
48433 type TargetableRemarketingListsListCall struct {
48434 s *Service
48435 profileId int64
48436 urlParams_ gensupport.URLParams
48437 ifNoneMatch_ string
48438 ctx_ context.Context
48439 header_ http.Header
48440 }
48441
48442
48443
48444
48445
48446
48447
48448 func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
48449 c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48450 c.profileId = profileId
48451 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
48452 return c
48453 }
48454
48455
48456
48457 func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
48458 c.urlParams_.Set("active", fmt.Sprint(active))
48459 return c
48460 }
48461
48462
48463
48464 func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
48465 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48466 return c
48467 }
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477 func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
48478 c.urlParams_.Set("name", name)
48479 return c
48480 }
48481
48482
48483
48484 func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
48485 c.urlParams_.Set("pageToken", pageToken)
48486 return c
48487 }
48488
48489
48490
48491
48492
48493
48494
48495
48496 func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
48497 c.urlParams_.Set("sortField", sortField)
48498 return c
48499 }
48500
48501
48502
48503
48504
48505
48506
48507
48508 func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
48509 c.urlParams_.Set("sortOrder", sortOrder)
48510 return c
48511 }
48512
48513
48514
48515
48516 func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
48517 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48518 return c
48519 }
48520
48521
48522
48523
48524
48525
48526 func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
48527 c.ifNoneMatch_ = entityTag
48528 return c
48529 }
48530
48531
48532
48533
48534 func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
48535 c.ctx_ = ctx
48536 return c
48537 }
48538
48539
48540
48541 func (c *TargetableRemarketingListsListCall) Header() http.Header {
48542 if c.header_ == nil {
48543 c.header_ = make(http.Header)
48544 }
48545 return c.header_
48546 }
48547
48548 func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
48549 reqHeaders := make(http.Header)
48550 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48551 for k, v := range c.header_ {
48552 reqHeaders[k] = v
48553 }
48554 reqHeaders.Set("User-Agent", c.s.userAgent())
48555 if c.ifNoneMatch_ != "" {
48556 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48557 }
48558 var body io.Reader = nil
48559 c.urlParams_.Set("alt", alt)
48560 c.urlParams_.Set("prettyPrint", "false")
48561 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetableRemarketingLists")
48562 urls += "?" + c.urlParams_.Encode()
48563 req, err := http.NewRequest("GET", urls, body)
48564 if err != nil {
48565 return nil, err
48566 }
48567 req.Header = reqHeaders
48568 googleapi.Expand(req.URL, map[string]string{
48569 "profileId": strconv.FormatInt(c.profileId, 10),
48570 })
48571 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48572 }
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582 func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
48583 gensupport.SetOptions(c.urlParams_, opts...)
48584 res, err := c.doRequest("json")
48585 if res != nil && res.StatusCode == http.StatusNotModified {
48586 if res.Body != nil {
48587 res.Body.Close()
48588 }
48589 return nil, &googleapi.Error{
48590 Code: res.StatusCode,
48591 Header: res.Header,
48592 }
48593 }
48594 if err != nil {
48595 return nil, err
48596 }
48597 defer googleapi.CloseBody(res)
48598 if err := googleapi.CheckResponse(res); err != nil {
48599 return nil, err
48600 }
48601 ret := &TargetableRemarketingListsListResponse{
48602 ServerResponse: googleapi.ServerResponse{
48603 Header: res.Header,
48604 HTTPStatusCode: res.StatusCode,
48605 },
48606 }
48607 target := &ret
48608 if err := gensupport.DecodeResponse(target, res); err != nil {
48609 return nil, err
48610 }
48611 return ret, nil
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698 }
48699
48700
48701
48702
48703 func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
48704 c.ctx_ = ctx
48705 defer c.PageToken(c.urlParams_.Get("pageToken"))
48706 for {
48707 x, err := c.Do()
48708 if err != nil {
48709 return err
48710 }
48711 if err := f(x); err != nil {
48712 return err
48713 }
48714 if x.NextPageToken == "" {
48715 return nil
48716 }
48717 c.PageToken(x.NextPageToken)
48718 }
48719 }
48720
48721
48722
48723 type TargetingTemplatesGetCall struct {
48724 s *Service
48725 profileId int64
48726 id int64
48727 urlParams_ gensupport.URLParams
48728 ifNoneMatch_ string
48729 ctx_ context.Context
48730 header_ http.Header
48731 }
48732
48733
48734
48735
48736
48737 func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
48738 c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48739 c.profileId = profileId
48740 c.id = id
48741 return c
48742 }
48743
48744
48745
48746
48747 func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
48748 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48749 return c
48750 }
48751
48752
48753
48754
48755
48756
48757 func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
48758 c.ifNoneMatch_ = entityTag
48759 return c
48760 }
48761
48762
48763
48764
48765 func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
48766 c.ctx_ = ctx
48767 return c
48768 }
48769
48770
48771
48772 func (c *TargetingTemplatesGetCall) Header() http.Header {
48773 if c.header_ == nil {
48774 c.header_ = make(http.Header)
48775 }
48776 return c.header_
48777 }
48778
48779 func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
48780 reqHeaders := make(http.Header)
48781 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48782 for k, v := range c.header_ {
48783 reqHeaders[k] = v
48784 }
48785 reqHeaders.Set("User-Agent", c.s.userAgent())
48786 if c.ifNoneMatch_ != "" {
48787 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48788 }
48789 var body io.Reader = nil
48790 c.urlParams_.Set("alt", alt)
48791 c.urlParams_.Set("prettyPrint", "false")
48792 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates/{id}")
48793 urls += "?" + c.urlParams_.Encode()
48794 req, err := http.NewRequest("GET", urls, body)
48795 if err != nil {
48796 return nil, err
48797 }
48798 req.Header = reqHeaders
48799 googleapi.Expand(req.URL, map[string]string{
48800 "profileId": strconv.FormatInt(c.profileId, 10),
48801 "id": strconv.FormatInt(c.id, 10),
48802 })
48803 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48804 }
48805
48806
48807
48808
48809
48810
48811
48812
48813 func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48814 gensupport.SetOptions(c.urlParams_, opts...)
48815 res, err := c.doRequest("json")
48816 if res != nil && res.StatusCode == http.StatusNotModified {
48817 if res.Body != nil {
48818 res.Body.Close()
48819 }
48820 return nil, &googleapi.Error{
48821 Code: res.StatusCode,
48822 Header: res.Header,
48823 }
48824 }
48825 if err != nil {
48826 return nil, err
48827 }
48828 defer googleapi.CloseBody(res)
48829 if err := googleapi.CheckResponse(res); err != nil {
48830 return nil, err
48831 }
48832 ret := &TargetingTemplate{
48833 ServerResponse: googleapi.ServerResponse{
48834 Header: res.Header,
48835 HTTPStatusCode: res.StatusCode,
48836 },
48837 }
48838 target := &ret
48839 if err := gensupport.DecodeResponse(target, res); err != nil {
48840 return nil, err
48841 }
48842 return ret, nil
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875
48876
48877 }
48878
48879
48880
48881 type TargetingTemplatesInsertCall struct {
48882 s *Service
48883 profileId int64
48884 targetingtemplate *TargetingTemplate
48885 urlParams_ gensupport.URLParams
48886 ctx_ context.Context
48887 header_ http.Header
48888 }
48889
48890
48891
48892
48893 func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
48894 c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48895 c.profileId = profileId
48896 c.targetingtemplate = targetingtemplate
48897 return c
48898 }
48899
48900
48901
48902
48903 func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
48904 c.urlParams_.Set("fields", googleapi.CombineFields(s))
48905 return c
48906 }
48907
48908
48909
48910
48911 func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
48912 c.ctx_ = ctx
48913 return c
48914 }
48915
48916
48917
48918 func (c *TargetingTemplatesInsertCall) Header() http.Header {
48919 if c.header_ == nil {
48920 c.header_ = make(http.Header)
48921 }
48922 return c.header_
48923 }
48924
48925 func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
48926 reqHeaders := make(http.Header)
48927 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
48928 for k, v := range c.header_ {
48929 reqHeaders[k] = v
48930 }
48931 reqHeaders.Set("User-Agent", c.s.userAgent())
48932 var body io.Reader = nil
48933 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
48934 if err != nil {
48935 return nil, err
48936 }
48937 reqHeaders.Set("Content-Type", "application/json")
48938 c.urlParams_.Set("alt", alt)
48939 c.urlParams_.Set("prettyPrint", "false")
48940 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
48941 urls += "?" + c.urlParams_.Encode()
48942 req, err := http.NewRequest("POST", urls, body)
48943 if err != nil {
48944 return nil, err
48945 }
48946 req.Header = reqHeaders
48947 googleapi.Expand(req.URL, map[string]string{
48948 "profileId": strconv.FormatInt(c.profileId, 10),
48949 })
48950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
48951 }
48952
48953
48954
48955
48956
48957
48958
48959
48960 func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
48961 gensupport.SetOptions(c.urlParams_, opts...)
48962 res, err := c.doRequest("json")
48963 if res != nil && res.StatusCode == http.StatusNotModified {
48964 if res.Body != nil {
48965 res.Body.Close()
48966 }
48967 return nil, &googleapi.Error{
48968 Code: res.StatusCode,
48969 Header: res.Header,
48970 }
48971 }
48972 if err != nil {
48973 return nil, err
48974 }
48975 defer googleapi.CloseBody(res)
48976 if err := googleapi.CheckResponse(res); err != nil {
48977 return nil, err
48978 }
48979 ret := &TargetingTemplate{
48980 ServerResponse: googleapi.ServerResponse{
48981 Header: res.Header,
48982 HTTPStatusCode: res.StatusCode,
48983 },
48984 }
48985 target := &ret
48986 if err := gensupport.DecodeResponse(target, res); err != nil {
48987 return nil, err
48988 }
48989 return ret, nil
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019 }
49020
49021
49022
49023 type TargetingTemplatesListCall struct {
49024 s *Service
49025 profileId int64
49026 urlParams_ gensupport.URLParams
49027 ifNoneMatch_ string
49028 ctx_ context.Context
49029 header_ http.Header
49030 }
49031
49032
49033
49034
49035
49036 func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
49037 c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49038 c.profileId = profileId
49039 return c
49040 }
49041
49042
49043
49044 func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
49045 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
49046 return c
49047 }
49048
49049
49050
49051 func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
49052 var ids_ []string
49053 for _, v := range ids {
49054 ids_ = append(ids_, fmt.Sprint(v))
49055 }
49056 c.urlParams_.SetMulti("ids", ids_)
49057 return c
49058 }
49059
49060
49061
49062 func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
49063 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
49064 return c
49065 }
49066
49067
49068
49069 func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
49070 c.urlParams_.Set("pageToken", pageToken)
49071 return c
49072 }
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082 func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
49083 c.urlParams_.Set("searchString", searchString)
49084 return c
49085 }
49086
49087
49088
49089
49090
49091
49092
49093
49094 func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
49095 c.urlParams_.Set("sortField", sortField)
49096 return c
49097 }
49098
49099
49100
49101
49102
49103
49104
49105
49106 func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
49107 c.urlParams_.Set("sortOrder", sortOrder)
49108 return c
49109 }
49110
49111
49112
49113
49114 func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
49115 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49116 return c
49117 }
49118
49119
49120
49121
49122
49123
49124 func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
49125 c.ifNoneMatch_ = entityTag
49126 return c
49127 }
49128
49129
49130
49131
49132 func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
49133 c.ctx_ = ctx
49134 return c
49135 }
49136
49137
49138
49139 func (c *TargetingTemplatesListCall) Header() http.Header {
49140 if c.header_ == nil {
49141 c.header_ = make(http.Header)
49142 }
49143 return c.header_
49144 }
49145
49146 func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
49147 reqHeaders := make(http.Header)
49148 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49149 for k, v := range c.header_ {
49150 reqHeaders[k] = v
49151 }
49152 reqHeaders.Set("User-Agent", c.s.userAgent())
49153 if c.ifNoneMatch_ != "" {
49154 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49155 }
49156 var body io.Reader = nil
49157 c.urlParams_.Set("alt", alt)
49158 c.urlParams_.Set("prettyPrint", "false")
49159 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
49160 urls += "?" + c.urlParams_.Encode()
49161 req, err := http.NewRequest("GET", urls, body)
49162 if err != nil {
49163 return nil, err
49164 }
49165 req.Header = reqHeaders
49166 googleapi.Expand(req.URL, map[string]string{
49167 "profileId": strconv.FormatInt(c.profileId, 10),
49168 })
49169 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49170 }
49171
49172
49173
49174
49175
49176
49177
49178
49179 func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
49180 gensupport.SetOptions(c.urlParams_, opts...)
49181 res, err := c.doRequest("json")
49182 if res != nil && res.StatusCode == http.StatusNotModified {
49183 if res.Body != nil {
49184 res.Body.Close()
49185 }
49186 return nil, &googleapi.Error{
49187 Code: res.StatusCode,
49188 Header: res.Header,
49189 }
49190 }
49191 if err != nil {
49192 return nil, err
49193 }
49194 defer googleapi.CloseBody(res)
49195 if err := googleapi.CheckResponse(res); err != nil {
49196 return nil, err
49197 }
49198 ret := &TargetingTemplatesListResponse{
49199 ServerResponse: googleapi.ServerResponse{
49200 Header: res.Header,
49201 HTTPStatusCode: res.StatusCode,
49202 },
49203 }
49204 target := &ret
49205 if err := gensupport.DecodeResponse(target, res); err != nil {
49206 return nil, err
49207 }
49208 return ret, nil
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295 }
49296
49297
49298
49299
49300 func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
49301 c.ctx_ = ctx
49302 defer c.PageToken(c.urlParams_.Get("pageToken"))
49303 for {
49304 x, err := c.Do()
49305 if err != nil {
49306 return err
49307 }
49308 if err := f(x); err != nil {
49309 return err
49310 }
49311 if x.NextPageToken == "" {
49312 return nil
49313 }
49314 c.PageToken(x.NextPageToken)
49315 }
49316 }
49317
49318
49319
49320 type TargetingTemplatesPatchCall struct {
49321 s *Service
49322 profileId int64
49323 targetingtemplate *TargetingTemplate
49324 urlParams_ gensupport.URLParams
49325 ctx_ context.Context
49326 header_ http.Header
49327 }
49328
49329
49330
49331
49332
49333
49334 func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
49335 c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49336 c.profileId = profileId
49337 c.urlParams_.Set("id", fmt.Sprint(id))
49338 c.targetingtemplate = targetingtemplate
49339 return c
49340 }
49341
49342
49343
49344
49345 func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
49346 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49347 return c
49348 }
49349
49350
49351
49352
49353 func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
49354 c.ctx_ = ctx
49355 return c
49356 }
49357
49358
49359
49360 func (c *TargetingTemplatesPatchCall) Header() http.Header {
49361 if c.header_ == nil {
49362 c.header_ = make(http.Header)
49363 }
49364 return c.header_
49365 }
49366
49367 func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
49368 reqHeaders := make(http.Header)
49369 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49370 for k, v := range c.header_ {
49371 reqHeaders[k] = v
49372 }
49373 reqHeaders.Set("User-Agent", c.s.userAgent())
49374 var body io.Reader = nil
49375 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
49376 if err != nil {
49377 return nil, err
49378 }
49379 reqHeaders.Set("Content-Type", "application/json")
49380 c.urlParams_.Set("alt", alt)
49381 c.urlParams_.Set("prettyPrint", "false")
49382 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
49383 urls += "?" + c.urlParams_.Encode()
49384 req, err := http.NewRequest("PATCH", urls, body)
49385 if err != nil {
49386 return nil, err
49387 }
49388 req.Header = reqHeaders
49389 googleapi.Expand(req.URL, map[string]string{
49390 "profileId": strconv.FormatInt(c.profileId, 10),
49391 })
49392 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49393 }
49394
49395
49396
49397
49398
49399
49400
49401
49402 func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
49403 gensupport.SetOptions(c.urlParams_, opts...)
49404 res, err := c.doRequest("json")
49405 if res != nil && res.StatusCode == http.StatusNotModified {
49406 if res.Body != nil {
49407 res.Body.Close()
49408 }
49409 return nil, &googleapi.Error{
49410 Code: res.StatusCode,
49411 Header: res.Header,
49412 }
49413 }
49414 if err != nil {
49415 return nil, err
49416 }
49417 defer googleapi.CloseBody(res)
49418 if err := googleapi.CheckResponse(res); err != nil {
49419 return nil, err
49420 }
49421 ret := &TargetingTemplate{
49422 ServerResponse: googleapi.ServerResponse{
49423 Header: res.Header,
49424 HTTPStatusCode: res.StatusCode,
49425 },
49426 }
49427 target := &ret
49428 if err := gensupport.DecodeResponse(target, res); err != nil {
49429 return nil, err
49430 }
49431 return ret, nil
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469 }
49470
49471
49472
49473 type TargetingTemplatesUpdateCall struct {
49474 s *Service
49475 profileId int64
49476 targetingtemplate *TargetingTemplate
49477 urlParams_ gensupport.URLParams
49478 ctx_ context.Context
49479 header_ http.Header
49480 }
49481
49482
49483
49484
49485 func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
49486 c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49487 c.profileId = profileId
49488 c.targetingtemplate = targetingtemplate
49489 return c
49490 }
49491
49492
49493
49494
49495 func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
49496 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49497 return c
49498 }
49499
49500
49501
49502
49503 func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
49504 c.ctx_ = ctx
49505 return c
49506 }
49507
49508
49509
49510 func (c *TargetingTemplatesUpdateCall) Header() http.Header {
49511 if c.header_ == nil {
49512 c.header_ = make(http.Header)
49513 }
49514 return c.header_
49515 }
49516
49517 func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
49518 reqHeaders := make(http.Header)
49519 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49520 for k, v := range c.header_ {
49521 reqHeaders[k] = v
49522 }
49523 reqHeaders.Set("User-Agent", c.s.userAgent())
49524 var body io.Reader = nil
49525 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
49526 if err != nil {
49527 return nil, err
49528 }
49529 reqHeaders.Set("Content-Type", "application/json")
49530 c.urlParams_.Set("alt", alt)
49531 c.urlParams_.Set("prettyPrint", "false")
49532 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/targetingTemplates")
49533 urls += "?" + c.urlParams_.Encode()
49534 req, err := http.NewRequest("PUT", urls, body)
49535 if err != nil {
49536 return nil, err
49537 }
49538 req.Header = reqHeaders
49539 googleapi.Expand(req.URL, map[string]string{
49540 "profileId": strconv.FormatInt(c.profileId, 10),
49541 })
49542 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49543 }
49544
49545
49546
49547
49548
49549
49550
49551
49552 func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
49553 gensupport.SetOptions(c.urlParams_, opts...)
49554 res, err := c.doRequest("json")
49555 if res != nil && res.StatusCode == http.StatusNotModified {
49556 if res.Body != nil {
49557 res.Body.Close()
49558 }
49559 return nil, &googleapi.Error{
49560 Code: res.StatusCode,
49561 Header: res.Header,
49562 }
49563 }
49564 if err != nil {
49565 return nil, err
49566 }
49567 defer googleapi.CloseBody(res)
49568 if err := googleapi.CheckResponse(res); err != nil {
49569 return nil, err
49570 }
49571 ret := &TargetingTemplate{
49572 ServerResponse: googleapi.ServerResponse{
49573 Header: res.Header,
49574 HTTPStatusCode: res.StatusCode,
49575 },
49576 }
49577 target := &ret
49578 if err := gensupport.DecodeResponse(target, res); err != nil {
49579 return nil, err
49580 }
49581 return ret, nil
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611 }
49612
49613
49614
49615 type UserProfilesGetCall struct {
49616 s *Service
49617 profileId int64
49618 urlParams_ gensupport.URLParams
49619 ifNoneMatch_ string
49620 ctx_ context.Context
49621 header_ http.Header
49622 }
49623
49624
49625
49626
49627 func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
49628 c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49629 c.profileId = profileId
49630 return c
49631 }
49632
49633
49634
49635
49636 func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
49637 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49638 return c
49639 }
49640
49641
49642
49643
49644
49645
49646 func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
49647 c.ifNoneMatch_ = entityTag
49648 return c
49649 }
49650
49651
49652
49653
49654 func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
49655 c.ctx_ = ctx
49656 return c
49657 }
49658
49659
49660
49661 func (c *UserProfilesGetCall) Header() http.Header {
49662 if c.header_ == nil {
49663 c.header_ = make(http.Header)
49664 }
49665 return c.header_
49666 }
49667
49668 func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
49669 reqHeaders := make(http.Header)
49670 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49671 for k, v := range c.header_ {
49672 reqHeaders[k] = v
49673 }
49674 reqHeaders.Set("User-Agent", c.s.userAgent())
49675 if c.ifNoneMatch_ != "" {
49676 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49677 }
49678 var body io.Reader = nil
49679 c.urlParams_.Set("alt", alt)
49680 c.urlParams_.Set("prettyPrint", "false")
49681 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
49682 urls += "?" + c.urlParams_.Encode()
49683 req, err := http.NewRequest("GET", urls, body)
49684 if err != nil {
49685 return nil, err
49686 }
49687 req.Header = reqHeaders
49688 googleapi.Expand(req.URL, map[string]string{
49689 "profileId": strconv.FormatInt(c.profileId, 10),
49690 })
49691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49692 }
49693
49694
49695
49696
49697
49698
49699
49700
49701 func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
49702 gensupport.SetOptions(c.urlParams_, opts...)
49703 res, err := c.doRequest("json")
49704 if res != nil && res.StatusCode == http.StatusNotModified {
49705 if res.Body != nil {
49706 res.Body.Close()
49707 }
49708 return nil, &googleapi.Error{
49709 Code: res.StatusCode,
49710 Header: res.Header,
49711 }
49712 }
49713 if err != nil {
49714 return nil, err
49715 }
49716 defer googleapi.CloseBody(res)
49717 if err := googleapi.CheckResponse(res); err != nil {
49718 return nil, err
49719 }
49720 ret := &UserProfile{
49721 ServerResponse: googleapi.ServerResponse{
49722 Header: res.Header,
49723 HTTPStatusCode: res.StatusCode,
49724 },
49725 }
49726 target := &ret
49727 if err := gensupport.DecodeResponse(target, res); err != nil {
49728 return nil, err
49729 }
49730 return ret, nil
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759 }
49760
49761
49762
49763 type UserProfilesListCall struct {
49764 s *Service
49765 urlParams_ gensupport.URLParams
49766 ifNoneMatch_ string
49767 ctx_ context.Context
49768 header_ http.Header
49769 }
49770
49771
49772 func (r *UserProfilesService) List() *UserProfilesListCall {
49773 c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49774 return c
49775 }
49776
49777
49778
49779
49780 func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
49781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49782 return c
49783 }
49784
49785
49786
49787
49788
49789
49790 func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
49791 c.ifNoneMatch_ = entityTag
49792 return c
49793 }
49794
49795
49796
49797
49798 func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
49799 c.ctx_ = ctx
49800 return c
49801 }
49802
49803
49804
49805 func (c *UserProfilesListCall) Header() http.Header {
49806 if c.header_ == nil {
49807 c.header_ = make(http.Header)
49808 }
49809 return c.header_
49810 }
49811
49812 func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
49813 reqHeaders := make(http.Header)
49814 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49815 for k, v := range c.header_ {
49816 reqHeaders[k] = v
49817 }
49818 reqHeaders.Set("User-Agent", c.s.userAgent())
49819 if c.ifNoneMatch_ != "" {
49820 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49821 }
49822 var body io.Reader = nil
49823 c.urlParams_.Set("alt", alt)
49824 c.urlParams_.Set("prettyPrint", "false")
49825 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
49826 urls += "?" + c.urlParams_.Encode()
49827 req, err := http.NewRequest("GET", urls, body)
49828 if err != nil {
49829 return nil, err
49830 }
49831 req.Header = reqHeaders
49832 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49833 }
49834
49835
49836
49837
49838
49839
49840
49841
49842 func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
49843 gensupport.SetOptions(c.urlParams_, opts...)
49844 res, err := c.doRequest("json")
49845 if res != nil && res.StatusCode == http.StatusNotModified {
49846 if res.Body != nil {
49847 res.Body.Close()
49848 }
49849 return nil, &googleapi.Error{
49850 Code: res.StatusCode,
49851 Header: res.Header,
49852 }
49853 }
49854 if err != nil {
49855 return nil, err
49856 }
49857 defer googleapi.CloseBody(res)
49858 if err := googleapi.CheckResponse(res); err != nil {
49859 return nil, err
49860 }
49861 ret := &UserProfileList{
49862 ServerResponse: googleapi.ServerResponse{
49863 Header: res.Header,
49864 HTTPStatusCode: res.StatusCode,
49865 },
49866 }
49867 target := &ret
49868 if err := gensupport.DecodeResponse(target, res); err != nil {
49869 return nil, err
49870 }
49871 return ret, nil
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890 }
49891
49892
49893
49894 type UserRolePermissionGroupsGetCall struct {
49895 s *Service
49896 profileId int64
49897 id int64
49898 urlParams_ gensupport.URLParams
49899 ifNoneMatch_ string
49900 ctx_ context.Context
49901 header_ http.Header
49902 }
49903
49904
49905
49906
49907
49908 func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
49909 c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49910 c.profileId = profileId
49911 c.id = id
49912 return c
49913 }
49914
49915
49916
49917
49918 func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
49919 c.urlParams_.Set("fields", googleapi.CombineFields(s))
49920 return c
49921 }
49922
49923
49924
49925
49926
49927
49928 func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
49929 c.ifNoneMatch_ = entityTag
49930 return c
49931 }
49932
49933
49934
49935
49936 func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
49937 c.ctx_ = ctx
49938 return c
49939 }
49940
49941
49942
49943 func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
49944 if c.header_ == nil {
49945 c.header_ = make(http.Header)
49946 }
49947 return c.header_
49948 }
49949
49950 func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
49951 reqHeaders := make(http.Header)
49952 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
49953 for k, v := range c.header_ {
49954 reqHeaders[k] = v
49955 }
49956 reqHeaders.Set("User-Agent", c.s.userAgent())
49957 if c.ifNoneMatch_ != "" {
49958 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49959 }
49960 var body io.Reader = nil
49961 c.urlParams_.Set("alt", alt)
49962 c.urlParams_.Set("prettyPrint", "false")
49963 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups/{id}")
49964 urls += "?" + c.urlParams_.Encode()
49965 req, err := http.NewRequest("GET", urls, body)
49966 if err != nil {
49967 return nil, err
49968 }
49969 req.Header = reqHeaders
49970 googleapi.Expand(req.URL, map[string]string{
49971 "profileId": strconv.FormatInt(c.profileId, 10),
49972 "id": strconv.FormatInt(c.id, 10),
49973 })
49974 return gensupport.SendRequest(c.ctx_, c.s.client, req)
49975 }
49976
49977
49978
49979
49980
49981
49982
49983
49984 func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
49985 gensupport.SetOptions(c.urlParams_, opts...)
49986 res, err := c.doRequest("json")
49987 if res != nil && res.StatusCode == http.StatusNotModified {
49988 if res.Body != nil {
49989 res.Body.Close()
49990 }
49991 return nil, &googleapi.Error{
49992 Code: res.StatusCode,
49993 Header: res.Header,
49994 }
49995 }
49996 if err != nil {
49997 return nil, err
49998 }
49999 defer googleapi.CloseBody(res)
50000 if err := googleapi.CheckResponse(res); err != nil {
50001 return nil, err
50002 }
50003 ret := &UserRolePermissionGroup{
50004 ServerResponse: googleapi.ServerResponse{
50005 Header: res.Header,
50006 HTTPStatusCode: res.StatusCode,
50007 },
50008 }
50009 target := &ret
50010 if err := gensupport.DecodeResponse(target, res); err != nil {
50011 return nil, err
50012 }
50013 return ret, nil
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048 }
50049
50050
50051
50052 type UserRolePermissionGroupsListCall struct {
50053 s *Service
50054 profileId int64
50055 urlParams_ gensupport.URLParams
50056 ifNoneMatch_ string
50057 ctx_ context.Context
50058 header_ http.Header
50059 }
50060
50061
50062
50063
50064 func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
50065 c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50066 c.profileId = profileId
50067 return c
50068 }
50069
50070
50071
50072
50073 func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
50074 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50075 return c
50076 }
50077
50078
50079
50080
50081
50082
50083 func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
50084 c.ifNoneMatch_ = entityTag
50085 return c
50086 }
50087
50088
50089
50090
50091 func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
50092 c.ctx_ = ctx
50093 return c
50094 }
50095
50096
50097
50098 func (c *UserRolePermissionGroupsListCall) Header() http.Header {
50099 if c.header_ == nil {
50100 c.header_ = make(http.Header)
50101 }
50102 return c.header_
50103 }
50104
50105 func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
50106 reqHeaders := make(http.Header)
50107 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50108 for k, v := range c.header_ {
50109 reqHeaders[k] = v
50110 }
50111 reqHeaders.Set("User-Agent", c.s.userAgent())
50112 if c.ifNoneMatch_ != "" {
50113 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50114 }
50115 var body io.Reader = nil
50116 c.urlParams_.Set("alt", alt)
50117 c.urlParams_.Set("prettyPrint", "false")
50118 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissionGroups")
50119 urls += "?" + c.urlParams_.Encode()
50120 req, err := http.NewRequest("GET", urls, body)
50121 if err != nil {
50122 return nil, err
50123 }
50124 req.Header = reqHeaders
50125 googleapi.Expand(req.URL, map[string]string{
50126 "profileId": strconv.FormatInt(c.profileId, 10),
50127 })
50128 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50129 }
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139 func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
50140 gensupport.SetOptions(c.urlParams_, opts...)
50141 res, err := c.doRequest("json")
50142 if res != nil && res.StatusCode == http.StatusNotModified {
50143 if res.Body != nil {
50144 res.Body.Close()
50145 }
50146 return nil, &googleapi.Error{
50147 Code: res.StatusCode,
50148 Header: res.Header,
50149 }
50150 }
50151 if err != nil {
50152 return nil, err
50153 }
50154 defer googleapi.CloseBody(res)
50155 if err := googleapi.CheckResponse(res); err != nil {
50156 return nil, err
50157 }
50158 ret := &UserRolePermissionGroupsListResponse{
50159 ServerResponse: googleapi.ServerResponse{
50160 Header: res.Header,
50161 HTTPStatusCode: res.StatusCode,
50162 },
50163 }
50164 target := &ret
50165 if err := gensupport.DecodeResponse(target, res); err != nil {
50166 return nil, err
50167 }
50168 return ret, nil
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195 }
50196
50197
50198
50199 type UserRolePermissionsGetCall struct {
50200 s *Service
50201 profileId int64
50202 id int64
50203 urlParams_ gensupport.URLParams
50204 ifNoneMatch_ string
50205 ctx_ context.Context
50206 header_ http.Header
50207 }
50208
50209
50210
50211
50212
50213 func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
50214 c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50215 c.profileId = profileId
50216 c.id = id
50217 return c
50218 }
50219
50220
50221
50222
50223 func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
50224 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50225 return c
50226 }
50227
50228
50229
50230
50231
50232
50233 func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
50234 c.ifNoneMatch_ = entityTag
50235 return c
50236 }
50237
50238
50239
50240
50241 func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
50242 c.ctx_ = ctx
50243 return c
50244 }
50245
50246
50247
50248 func (c *UserRolePermissionsGetCall) Header() http.Header {
50249 if c.header_ == nil {
50250 c.header_ = make(http.Header)
50251 }
50252 return c.header_
50253 }
50254
50255 func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
50256 reqHeaders := make(http.Header)
50257 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50258 for k, v := range c.header_ {
50259 reqHeaders[k] = v
50260 }
50261 reqHeaders.Set("User-Agent", c.s.userAgent())
50262 if c.ifNoneMatch_ != "" {
50263 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50264 }
50265 var body io.Reader = nil
50266 c.urlParams_.Set("alt", alt)
50267 c.urlParams_.Set("prettyPrint", "false")
50268 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions/{id}")
50269 urls += "?" + c.urlParams_.Encode()
50270 req, err := http.NewRequest("GET", urls, body)
50271 if err != nil {
50272 return nil, err
50273 }
50274 req.Header = reqHeaders
50275 googleapi.Expand(req.URL, map[string]string{
50276 "profileId": strconv.FormatInt(c.profileId, 10),
50277 "id": strconv.FormatInt(c.id, 10),
50278 })
50279 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50280 }
50281
50282
50283
50284
50285
50286
50287
50288
50289 func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
50290 gensupport.SetOptions(c.urlParams_, opts...)
50291 res, err := c.doRequest("json")
50292 if res != nil && res.StatusCode == http.StatusNotModified {
50293 if res.Body != nil {
50294 res.Body.Close()
50295 }
50296 return nil, &googleapi.Error{
50297 Code: res.StatusCode,
50298 Header: res.Header,
50299 }
50300 }
50301 if err != nil {
50302 return nil, err
50303 }
50304 defer googleapi.CloseBody(res)
50305 if err := googleapi.CheckResponse(res); err != nil {
50306 return nil, err
50307 }
50308 ret := &UserRolePermission{
50309 ServerResponse: googleapi.ServerResponse{
50310 Header: res.Header,
50311 HTTPStatusCode: res.StatusCode,
50312 },
50313 }
50314 target := &ret
50315 if err := gensupport.DecodeResponse(target, res); err != nil {
50316 return nil, err
50317 }
50318 return ret, nil
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353 }
50354
50355
50356
50357 type UserRolePermissionsListCall struct {
50358 s *Service
50359 profileId int64
50360 urlParams_ gensupport.URLParams
50361 ifNoneMatch_ string
50362 ctx_ context.Context
50363 header_ http.Header
50364 }
50365
50366
50367
50368
50369 func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
50370 c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50371 c.profileId = profileId
50372 return c
50373 }
50374
50375
50376
50377 func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
50378 var ids_ []string
50379 for _, v := range ids {
50380 ids_ = append(ids_, fmt.Sprint(v))
50381 }
50382 c.urlParams_.SetMulti("ids", ids_)
50383 return c
50384 }
50385
50386
50387
50388
50389 func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
50390 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50391 return c
50392 }
50393
50394
50395
50396
50397
50398
50399 func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
50400 c.ifNoneMatch_ = entityTag
50401 return c
50402 }
50403
50404
50405
50406
50407 func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
50408 c.ctx_ = ctx
50409 return c
50410 }
50411
50412
50413
50414 func (c *UserRolePermissionsListCall) Header() http.Header {
50415 if c.header_ == nil {
50416 c.header_ = make(http.Header)
50417 }
50418 return c.header_
50419 }
50420
50421 func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
50422 reqHeaders := make(http.Header)
50423 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50424 for k, v := range c.header_ {
50425 reqHeaders[k] = v
50426 }
50427 reqHeaders.Set("User-Agent", c.s.userAgent())
50428 if c.ifNoneMatch_ != "" {
50429 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50430 }
50431 var body io.Reader = nil
50432 c.urlParams_.Set("alt", alt)
50433 c.urlParams_.Set("prettyPrint", "false")
50434 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRolePermissions")
50435 urls += "?" + c.urlParams_.Encode()
50436 req, err := http.NewRequest("GET", urls, body)
50437 if err != nil {
50438 return nil, err
50439 }
50440 req.Header = reqHeaders
50441 googleapi.Expand(req.URL, map[string]string{
50442 "profileId": strconv.FormatInt(c.profileId, 10),
50443 })
50444 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50445 }
50446
50447
50448
50449
50450
50451
50452
50453
50454 func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
50455 gensupport.SetOptions(c.urlParams_, opts...)
50456 res, err := c.doRequest("json")
50457 if res != nil && res.StatusCode == http.StatusNotModified {
50458 if res.Body != nil {
50459 res.Body.Close()
50460 }
50461 return nil, &googleapi.Error{
50462 Code: res.StatusCode,
50463 Header: res.Header,
50464 }
50465 }
50466 if err != nil {
50467 return nil, err
50468 }
50469 defer googleapi.CloseBody(res)
50470 if err := googleapi.CheckResponse(res); err != nil {
50471 return nil, err
50472 }
50473 ret := &UserRolePermissionsListResponse{
50474 ServerResponse: googleapi.ServerResponse{
50475 Header: res.Header,
50476 HTTPStatusCode: res.StatusCode,
50477 },
50478 }
50479 target := &ret
50480 if err := gensupport.DecodeResponse(target, res); err != nil {
50481 return nil, err
50482 }
50483 return ret, nil
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517 }
50518
50519
50520
50521 type UserRolesDeleteCall struct {
50522 s *Service
50523 profileId int64
50524 id int64
50525 urlParams_ gensupport.URLParams
50526 ctx_ context.Context
50527 header_ http.Header
50528 }
50529
50530
50531
50532
50533
50534 func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
50535 c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50536 c.profileId = profileId
50537 c.id = id
50538 return c
50539 }
50540
50541
50542
50543
50544 func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
50545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50546 return c
50547 }
50548
50549
50550
50551
50552 func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
50553 c.ctx_ = ctx
50554 return c
50555 }
50556
50557
50558
50559 func (c *UserRolesDeleteCall) Header() http.Header {
50560 if c.header_ == nil {
50561 c.header_ = make(http.Header)
50562 }
50563 return c.header_
50564 }
50565
50566 func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
50567 reqHeaders := make(http.Header)
50568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50569 for k, v := range c.header_ {
50570 reqHeaders[k] = v
50571 }
50572 reqHeaders.Set("User-Agent", c.s.userAgent())
50573 var body io.Reader = nil
50574 c.urlParams_.Set("alt", alt)
50575 c.urlParams_.Set("prettyPrint", "false")
50576 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
50577 urls += "?" + c.urlParams_.Encode()
50578 req, err := http.NewRequest("DELETE", urls, body)
50579 if err != nil {
50580 return nil, err
50581 }
50582 req.Header = reqHeaders
50583 googleapi.Expand(req.URL, map[string]string{
50584 "profileId": strconv.FormatInt(c.profileId, 10),
50585 "id": strconv.FormatInt(c.id, 10),
50586 })
50587 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50588 }
50589
50590
50591 func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
50592 gensupport.SetOptions(c.urlParams_, opts...)
50593 res, err := c.doRequest("json")
50594 if err != nil {
50595 return err
50596 }
50597 defer googleapi.CloseBody(res)
50598 if err := googleapi.CheckResponse(res); err != nil {
50599 return err
50600 }
50601 return nil
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633 }
50634
50635
50636
50637 type UserRolesGetCall struct {
50638 s *Service
50639 profileId int64
50640 id int64
50641 urlParams_ gensupport.URLParams
50642 ifNoneMatch_ string
50643 ctx_ context.Context
50644 header_ http.Header
50645 }
50646
50647
50648
50649
50650
50651 func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
50652 c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50653 c.profileId = profileId
50654 c.id = id
50655 return c
50656 }
50657
50658
50659
50660
50661 func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
50662 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50663 return c
50664 }
50665
50666
50667
50668
50669
50670
50671 func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
50672 c.ifNoneMatch_ = entityTag
50673 return c
50674 }
50675
50676
50677
50678
50679 func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
50680 c.ctx_ = ctx
50681 return c
50682 }
50683
50684
50685
50686 func (c *UserRolesGetCall) Header() http.Header {
50687 if c.header_ == nil {
50688 c.header_ = make(http.Header)
50689 }
50690 return c.header_
50691 }
50692
50693 func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
50694 reqHeaders := make(http.Header)
50695 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50696 for k, v := range c.header_ {
50697 reqHeaders[k] = v
50698 }
50699 reqHeaders.Set("User-Agent", c.s.userAgent())
50700 if c.ifNoneMatch_ != "" {
50701 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50702 }
50703 var body io.Reader = nil
50704 c.urlParams_.Set("alt", alt)
50705 c.urlParams_.Set("prettyPrint", "false")
50706 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles/{id}")
50707 urls += "?" + c.urlParams_.Encode()
50708 req, err := http.NewRequest("GET", urls, body)
50709 if err != nil {
50710 return nil, err
50711 }
50712 req.Header = reqHeaders
50713 googleapi.Expand(req.URL, map[string]string{
50714 "profileId": strconv.FormatInt(c.profileId, 10),
50715 "id": strconv.FormatInt(c.id, 10),
50716 })
50717 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50718 }
50719
50720
50721
50722
50723
50724
50725
50726
50727 func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50728 gensupport.SetOptions(c.urlParams_, opts...)
50729 res, err := c.doRequest("json")
50730 if res != nil && res.StatusCode == http.StatusNotModified {
50731 if res.Body != nil {
50732 res.Body.Close()
50733 }
50734 return nil, &googleapi.Error{
50735 Code: res.StatusCode,
50736 Header: res.Header,
50737 }
50738 }
50739 if err != nil {
50740 return nil, err
50741 }
50742 defer googleapi.CloseBody(res)
50743 if err := googleapi.CheckResponse(res); err != nil {
50744 return nil, err
50745 }
50746 ret := &UserRole{
50747 ServerResponse: googleapi.ServerResponse{
50748 Header: res.Header,
50749 HTTPStatusCode: res.StatusCode,
50750 },
50751 }
50752 target := &ret
50753 if err := gensupport.DecodeResponse(target, res); err != nil {
50754 return nil, err
50755 }
50756 return ret, nil
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
50791 }
50792
50793
50794
50795 type UserRolesInsertCall struct {
50796 s *Service
50797 profileId int64
50798 userrole *UserRole
50799 urlParams_ gensupport.URLParams
50800 ctx_ context.Context
50801 header_ http.Header
50802 }
50803
50804
50805
50806
50807 func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
50808 c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50809 c.profileId = profileId
50810 c.userrole = userrole
50811 return c
50812 }
50813
50814
50815
50816
50817 func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
50818 c.urlParams_.Set("fields", googleapi.CombineFields(s))
50819 return c
50820 }
50821
50822
50823
50824
50825 func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
50826 c.ctx_ = ctx
50827 return c
50828 }
50829
50830
50831
50832 func (c *UserRolesInsertCall) Header() http.Header {
50833 if c.header_ == nil {
50834 c.header_ = make(http.Header)
50835 }
50836 return c.header_
50837 }
50838
50839 func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
50840 reqHeaders := make(http.Header)
50841 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
50842 for k, v := range c.header_ {
50843 reqHeaders[k] = v
50844 }
50845 reqHeaders.Set("User-Agent", c.s.userAgent())
50846 var body io.Reader = nil
50847 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
50848 if err != nil {
50849 return nil, err
50850 }
50851 reqHeaders.Set("Content-Type", "application/json")
50852 c.urlParams_.Set("alt", alt)
50853 c.urlParams_.Set("prettyPrint", "false")
50854 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
50855 urls += "?" + c.urlParams_.Encode()
50856 req, err := http.NewRequest("POST", urls, body)
50857 if err != nil {
50858 return nil, err
50859 }
50860 req.Header = reqHeaders
50861 googleapi.Expand(req.URL, map[string]string{
50862 "profileId": strconv.FormatInt(c.profileId, 10),
50863 })
50864 return gensupport.SendRequest(c.ctx_, c.s.client, req)
50865 }
50866
50867
50868
50869
50870
50871
50872
50873
50874 func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
50875 gensupport.SetOptions(c.urlParams_, opts...)
50876 res, err := c.doRequest("json")
50877 if res != nil && res.StatusCode == http.StatusNotModified {
50878 if res.Body != nil {
50879 res.Body.Close()
50880 }
50881 return nil, &googleapi.Error{
50882 Code: res.StatusCode,
50883 Header: res.Header,
50884 }
50885 }
50886 if err != nil {
50887 return nil, err
50888 }
50889 defer googleapi.CloseBody(res)
50890 if err := googleapi.CheckResponse(res); err != nil {
50891 return nil, err
50892 }
50893 ret := &UserRole{
50894 ServerResponse: googleapi.ServerResponse{
50895 Header: res.Header,
50896 HTTPStatusCode: res.StatusCode,
50897 },
50898 }
50899 target := &ret
50900 if err := gensupport.DecodeResponse(target, res); err != nil {
50901 return nil, err
50902 }
50903 return ret, nil
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933 }
50934
50935
50936
50937 type UserRolesListCall struct {
50938 s *Service
50939 profileId int64
50940 urlParams_ gensupport.URLParams
50941 ifNoneMatch_ string
50942 ctx_ context.Context
50943 header_ http.Header
50944 }
50945
50946
50947
50948
50949
50950 func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
50951 c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50952 c.profileId = profileId
50953 return c
50954 }
50955
50956
50957
50958
50959 func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
50960 c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
50961 return c
50962 }
50963
50964
50965
50966 func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
50967 var ids_ []string
50968 for _, v := range ids {
50969 ids_ = append(ids_, fmt.Sprint(v))
50970 }
50971 c.urlParams_.SetMulti("ids", ids_)
50972 return c
50973 }
50974
50975
50976
50977 func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
50978 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50979 return c
50980 }
50981
50982
50983
50984 func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
50985 c.urlParams_.Set("pageToken", pageToken)
50986 return c
50987 }
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997 func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
50998 c.urlParams_.Set("searchString", searchString)
50999 return c
51000 }
51001
51002
51003
51004
51005
51006
51007
51008
51009 func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
51010 c.urlParams_.Set("sortField", sortField)
51011 return c
51012 }
51013
51014
51015
51016
51017
51018
51019
51020
51021 func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
51022 c.urlParams_.Set("sortOrder", sortOrder)
51023 return c
51024 }
51025
51026
51027
51028 func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
51029 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
51030 return c
51031 }
51032
51033
51034
51035
51036 func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
51037 c.urlParams_.Set("fields", googleapi.CombineFields(s))
51038 return c
51039 }
51040
51041
51042
51043
51044
51045
51046 func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
51047 c.ifNoneMatch_ = entityTag
51048 return c
51049 }
51050
51051
51052
51053
51054 func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
51055 c.ctx_ = ctx
51056 return c
51057 }
51058
51059
51060
51061 func (c *UserRolesListCall) Header() http.Header {
51062 if c.header_ == nil {
51063 c.header_ = make(http.Header)
51064 }
51065 return c.header_
51066 }
51067
51068 func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
51069 reqHeaders := make(http.Header)
51070 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
51071 for k, v := range c.header_ {
51072 reqHeaders[k] = v
51073 }
51074 reqHeaders.Set("User-Agent", c.s.userAgent())
51075 if c.ifNoneMatch_ != "" {
51076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51077 }
51078 var body io.Reader = nil
51079 c.urlParams_.Set("alt", alt)
51080 c.urlParams_.Set("prettyPrint", "false")
51081 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
51082 urls += "?" + c.urlParams_.Encode()
51083 req, err := http.NewRequest("GET", urls, body)
51084 if err != nil {
51085 return nil, err
51086 }
51087 req.Header = reqHeaders
51088 googleapi.Expand(req.URL, map[string]string{
51089 "profileId": strconv.FormatInt(c.profileId, 10),
51090 })
51091 return gensupport.SendRequest(c.ctx_, c.s.client, req)
51092 }
51093
51094
51095
51096
51097
51098
51099
51100
51101 func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
51102 gensupport.SetOptions(c.urlParams_, opts...)
51103 res, err := c.doRequest("json")
51104 if res != nil && res.StatusCode == http.StatusNotModified {
51105 if res.Body != nil {
51106 res.Body.Close()
51107 }
51108 return nil, &googleapi.Error{
51109 Code: res.StatusCode,
51110 Header: res.Header,
51111 }
51112 }
51113 if err != nil {
51114 return nil, err
51115 }
51116 defer googleapi.CloseBody(res)
51117 if err := googleapi.CheckResponse(res); err != nil {
51118 return nil, err
51119 }
51120 ret := &UserRolesListResponse{
51121 ServerResponse: googleapi.ServerResponse{
51122 Header: res.Header,
51123 HTTPStatusCode: res.StatusCode,
51124 },
51125 }
51126 target := &ret
51127 if err := gensupport.DecodeResponse(target, res); err != nil {
51128 return nil, err
51129 }
51130 return ret, nil
51131
51132
51133
51134
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222 }
51223
51224
51225
51226
51227 func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
51228 c.ctx_ = ctx
51229 defer c.PageToken(c.urlParams_.Get("pageToken"))
51230 for {
51231 x, err := c.Do()
51232 if err != nil {
51233 return err
51234 }
51235 if err := f(x); err != nil {
51236 return err
51237 }
51238 if x.NextPageToken == "" {
51239 return nil
51240 }
51241 c.PageToken(x.NextPageToken)
51242 }
51243 }
51244
51245
51246
51247 type UserRolesPatchCall struct {
51248 s *Service
51249 profileId int64
51250 userrole *UserRole
51251 urlParams_ gensupport.URLParams
51252 ctx_ context.Context
51253 header_ http.Header
51254 }
51255
51256
51257
51258
51259
51260
51261 func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
51262 c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51263 c.profileId = profileId
51264 c.urlParams_.Set("id", fmt.Sprint(id))
51265 c.userrole = userrole
51266 return c
51267 }
51268
51269
51270
51271
51272 func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
51273 c.urlParams_.Set("fields", googleapi.CombineFields(s))
51274 return c
51275 }
51276
51277
51278
51279
51280 func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
51281 c.ctx_ = ctx
51282 return c
51283 }
51284
51285
51286
51287 func (c *UserRolesPatchCall) Header() http.Header {
51288 if c.header_ == nil {
51289 c.header_ = make(http.Header)
51290 }
51291 return c.header_
51292 }
51293
51294 func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
51295 reqHeaders := make(http.Header)
51296 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
51297 for k, v := range c.header_ {
51298 reqHeaders[k] = v
51299 }
51300 reqHeaders.Set("User-Agent", c.s.userAgent())
51301 var body io.Reader = nil
51302 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
51303 if err != nil {
51304 return nil, err
51305 }
51306 reqHeaders.Set("Content-Type", "application/json")
51307 c.urlParams_.Set("alt", alt)
51308 c.urlParams_.Set("prettyPrint", "false")
51309 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
51310 urls += "?" + c.urlParams_.Encode()
51311 req, err := http.NewRequest("PATCH", urls, body)
51312 if err != nil {
51313 return nil, err
51314 }
51315 req.Header = reqHeaders
51316 googleapi.Expand(req.URL, map[string]string{
51317 "profileId": strconv.FormatInt(c.profileId, 10),
51318 })
51319 return gensupport.SendRequest(c.ctx_, c.s.client, req)
51320 }
51321
51322
51323
51324
51325
51326
51327
51328
51329 func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
51330 gensupport.SetOptions(c.urlParams_, opts...)
51331 res, err := c.doRequest("json")
51332 if res != nil && res.StatusCode == http.StatusNotModified {
51333 if res.Body != nil {
51334 res.Body.Close()
51335 }
51336 return nil, &googleapi.Error{
51337 Code: res.StatusCode,
51338 Header: res.Header,
51339 }
51340 }
51341 if err != nil {
51342 return nil, err
51343 }
51344 defer googleapi.CloseBody(res)
51345 if err := googleapi.CheckResponse(res); err != nil {
51346 return nil, err
51347 }
51348 ret := &UserRole{
51349 ServerResponse: googleapi.ServerResponse{
51350 Header: res.Header,
51351 HTTPStatusCode: res.StatusCode,
51352 },
51353 }
51354 target := &ret
51355 if err := gensupport.DecodeResponse(target, res); err != nil {
51356 return nil, err
51357 }
51358 return ret, nil
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396 }
51397
51398
51399
51400 type UserRolesUpdateCall struct {
51401 s *Service
51402 profileId int64
51403 userrole *UserRole
51404 urlParams_ gensupport.URLParams
51405 ctx_ context.Context
51406 header_ http.Header
51407 }
51408
51409
51410
51411
51412 func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
51413 c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51414 c.profileId = profileId
51415 c.userrole = userrole
51416 return c
51417 }
51418
51419
51420
51421
51422 func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
51423 c.urlParams_.Set("fields", googleapi.CombineFields(s))
51424 return c
51425 }
51426
51427
51428
51429
51430 func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
51431 c.ctx_ = ctx
51432 return c
51433 }
51434
51435
51436
51437 func (c *UserRolesUpdateCall) Header() http.Header {
51438 if c.header_ == nil {
51439 c.header_ = make(http.Header)
51440 }
51441 return c.header_
51442 }
51443
51444 func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
51445 reqHeaders := make(http.Header)
51446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
51447 for k, v := range c.header_ {
51448 reqHeaders[k] = v
51449 }
51450 reqHeaders.Set("User-Agent", c.s.userAgent())
51451 var body io.Reader = nil
51452 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
51453 if err != nil {
51454 return nil, err
51455 }
51456 reqHeaders.Set("Content-Type", "application/json")
51457 c.urlParams_.Set("alt", alt)
51458 c.urlParams_.Set("prettyPrint", "false")
51459 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/userRoles")
51460 urls += "?" + c.urlParams_.Encode()
51461 req, err := http.NewRequest("PUT", urls, body)
51462 if err != nil {
51463 return nil, err
51464 }
51465 req.Header = reqHeaders
51466 googleapi.Expand(req.URL, map[string]string{
51467 "profileId": strconv.FormatInt(c.profileId, 10),
51468 })
51469 return gensupport.SendRequest(c.ctx_, c.s.client, req)
51470 }
51471
51472
51473
51474
51475
51476
51477
51478
51479 func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
51480 gensupport.SetOptions(c.urlParams_, opts...)
51481 res, err := c.doRequest("json")
51482 if res != nil && res.StatusCode == http.StatusNotModified {
51483 if res.Body != nil {
51484 res.Body.Close()
51485 }
51486 return nil, &googleapi.Error{
51487 Code: res.StatusCode,
51488 Header: res.Header,
51489 }
51490 }
51491 if err != nil {
51492 return nil, err
51493 }
51494 defer googleapi.CloseBody(res)
51495 if err := googleapi.CheckResponse(res); err != nil {
51496 return nil, err
51497 }
51498 ret := &UserRole{
51499 ServerResponse: googleapi.ServerResponse{
51500 Header: res.Header,
51501 HTTPStatusCode: res.StatusCode,
51502 },
51503 }
51504 target := &ret
51505 if err := gensupport.DecodeResponse(target, res); err != nil {
51506 return nil, err
51507 }
51508 return ret, nil
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538 }
51539
51540
51541
51542 type VideoFormatsGetCall struct {
51543 s *Service
51544 profileId int64
51545 id int64
51546 urlParams_ gensupport.URLParams
51547 ifNoneMatch_ string
51548 ctx_ context.Context
51549 header_ http.Header
51550 }
51551
51552
51553
51554
51555
51556 func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
51557 c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51558 c.profileId = profileId
51559 c.id = id
51560 return c
51561 }
51562
51563
51564
51565
51566 func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
51567 c.urlParams_.Set("fields", googleapi.CombineFields(s))
51568 return c
51569 }
51570
51571
51572
51573
51574
51575
51576 func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
51577 c.ifNoneMatch_ = entityTag
51578 return c
51579 }
51580
51581
51582
51583
51584 func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
51585 c.ctx_ = ctx
51586 return c
51587 }
51588
51589
51590
51591 func (c *VideoFormatsGetCall) Header() http.Header {
51592 if c.header_ == nil {
51593 c.header_ = make(http.Header)
51594 }
51595 return c.header_
51596 }
51597
51598 func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
51599 reqHeaders := make(http.Header)
51600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
51601 for k, v := range c.header_ {
51602 reqHeaders[k] = v
51603 }
51604 reqHeaders.Set("User-Agent", c.s.userAgent())
51605 if c.ifNoneMatch_ != "" {
51606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51607 }
51608 var body io.Reader = nil
51609 c.urlParams_.Set("alt", alt)
51610 c.urlParams_.Set("prettyPrint", "false")
51611 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats/{id}")
51612 urls += "?" + c.urlParams_.Encode()
51613 req, err := http.NewRequest("GET", urls, body)
51614 if err != nil {
51615 return nil, err
51616 }
51617 req.Header = reqHeaders
51618 googleapi.Expand(req.URL, map[string]string{
51619 "profileId": strconv.FormatInt(c.profileId, 10),
51620 "id": strconv.FormatInt(c.id, 10),
51621 })
51622 return gensupport.SendRequest(c.ctx_, c.s.client, req)
51623 }
51624
51625
51626
51627
51628
51629
51630
51631
51632 func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
51633 gensupport.SetOptions(c.urlParams_, opts...)
51634 res, err := c.doRequest("json")
51635 if res != nil && res.StatusCode == http.StatusNotModified {
51636 if res.Body != nil {
51637 res.Body.Close()
51638 }
51639 return nil, &googleapi.Error{
51640 Code: res.StatusCode,
51641 Header: res.Header,
51642 }
51643 }
51644 if err != nil {
51645 return nil, err
51646 }
51647 defer googleapi.CloseBody(res)
51648 if err := googleapi.CheckResponse(res); err != nil {
51649 return nil, err
51650 }
51651 ret := &VideoFormat{
51652 ServerResponse: googleapi.ServerResponse{
51653 Header: res.Header,
51654 HTTPStatusCode: res.StatusCode,
51655 },
51656 }
51657 target := &ret
51658 if err := gensupport.DecodeResponse(target, res); err != nil {
51659 return nil, err
51660 }
51661 return ret, nil
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696 }
51697
51698
51699
51700 type VideoFormatsListCall struct {
51701 s *Service
51702 profileId int64
51703 urlParams_ gensupport.URLParams
51704 ifNoneMatch_ string
51705 ctx_ context.Context
51706 header_ http.Header
51707 }
51708
51709
51710
51711
51712 func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
51713 c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51714 c.profileId = profileId
51715 return c
51716 }
51717
51718
51719
51720
51721 func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
51722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
51723 return c
51724 }
51725
51726
51727
51728
51729
51730
51731 func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
51732 c.ifNoneMatch_ = entityTag
51733 return c
51734 }
51735
51736
51737
51738
51739 func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
51740 c.ctx_ = ctx
51741 return c
51742 }
51743
51744
51745
51746 func (c *VideoFormatsListCall) Header() http.Header {
51747 if c.header_ == nil {
51748 c.header_ = make(http.Header)
51749 }
51750 return c.header_
51751 }
51752
51753 func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
51754 reqHeaders := make(http.Header)
51755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version)
51756 for k, v := range c.header_ {
51757 reqHeaders[k] = v
51758 }
51759 reqHeaders.Set("User-Agent", c.s.userAgent())
51760 if c.ifNoneMatch_ != "" {
51761 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51762 }
51763 var body io.Reader = nil
51764 c.urlParams_.Set("alt", alt)
51765 c.urlParams_.Set("prettyPrint", "false")
51766 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/videoFormats")
51767 urls += "?" + c.urlParams_.Encode()
51768 req, err := http.NewRequest("GET", urls, body)
51769 if err != nil {
51770 return nil, err
51771 }
51772 req.Header = reqHeaders
51773 googleapi.Expand(req.URL, map[string]string{
51774 "profileId": strconv.FormatInt(c.profileId, 10),
51775 })
51776 return gensupport.SendRequest(c.ctx_, c.s.client, req)
51777 }
51778
51779
51780
51781
51782
51783
51784
51785
51786 func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
51787 gensupport.SetOptions(c.urlParams_, opts...)
51788 res, err := c.doRequest("json")
51789 if res != nil && res.StatusCode == http.StatusNotModified {
51790 if res.Body != nil {
51791 res.Body.Close()
51792 }
51793 return nil, &googleapi.Error{
51794 Code: res.StatusCode,
51795 Header: res.Header,
51796 }
51797 }
51798 if err != nil {
51799 return nil, err
51800 }
51801 defer googleapi.CloseBody(res)
51802 if err := googleapi.CheckResponse(res); err != nil {
51803 return nil, err
51804 }
51805 ret := &VideoFormatsListResponse{
51806 ServerResponse: googleapi.ServerResponse{
51807 Header: res.Header,
51808 HTTPStatusCode: res.StatusCode,
51809 },
51810 }
51811 target := &ret
51812 if err := gensupport.DecodeResponse(target, res); err != nil {
51813 return nil, err
51814 }
51815 return ret, nil
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842 }
51843
View as plain text