1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56 package dfareporting
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "net/http"
66 "net/url"
67 "strconv"
68 "strings"
69
70 googleapi "google.golang.org/api/googleapi"
71 internal "google.golang.org/api/internal"
72 gensupport "google.golang.org/api/internal/gensupport"
73 option "google.golang.org/api/option"
74 internaloption "google.golang.org/api/option/internaloption"
75 htransport "google.golang.org/api/transport/http"
76 )
77
78
79
80 var _ = bytes.NewBuffer
81 var _ = strconv.Itoa
82 var _ = fmt.Sprintf
83 var _ = json.NewDecoder
84 var _ = io.Copy
85 var _ = url.Parse
86 var _ = gensupport.MarshalJSON
87 var _ = googleapi.Version
88 var _ = errors.New
89 var _ = strings.Replace
90 var _ = context.Canceled
91 var _ = internaloption.WithDefaultEndpoint
92 var _ = internal.Version
93
94 const apiId = "dfareporting:v4"
95 const apiName = "dfareporting"
96 const apiVersion = "v4"
97 const basePath = "https://dfareporting.googleapis.com/dfareporting/v4/"
98 const basePathTemplate = "https://dfareporting.UNIVERSE_DOMAIN/dfareporting/v4/"
99 const mtlsBasePath = "https://dfareporting.mtls.googleapis.com/dfareporting/v4/"
100
101
102 const (
103
104 DdmconversionsScope = "https://www.googleapis.com/auth/ddmconversions"
105
106
107 DfareportingScope = "https://www.googleapis.com/auth/dfareporting"
108
109
110
111 DfatraffickingScope = "https://www.googleapis.com/auth/dfatrafficking"
112 )
113
114
115 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
116 scopesOption := internaloption.WithDefaultScopes(
117 "https://www.googleapis.com/auth/ddmconversions",
118 "https://www.googleapis.com/auth/dfareporting",
119 "https://www.googleapis.com/auth/dfatrafficking",
120 )
121
122 opts = append([]option.ClientOption{scopesOption}, opts...)
123 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
124 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
125 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
126 opts = append(opts, internaloption.EnableNewAuthLibrary())
127 client, endpoint, err := htransport.NewClient(ctx, opts...)
128 if err != nil {
129 return nil, err
130 }
131 s, err := New(client)
132 if err != nil {
133 return nil, err
134 }
135 if endpoint != "" {
136 s.BasePath = endpoint
137 }
138 return s, nil
139 }
140
141
142
143
144
145
146 func New(client *http.Client) (*Service, error) {
147 if client == nil {
148 return nil, errors.New("client is nil")
149 }
150 s := &Service{client: client, BasePath: basePath}
151 s.AccountActiveAdSummaries = NewAccountActiveAdSummariesService(s)
152 s.AccountPermissionGroups = NewAccountPermissionGroupsService(s)
153 s.AccountPermissions = NewAccountPermissionsService(s)
154 s.AccountUserProfiles = NewAccountUserProfilesService(s)
155 s.Accounts = NewAccountsService(s)
156 s.Ads = NewAdsService(s)
157 s.AdvertiserGroups = NewAdvertiserGroupsService(s)
158 s.AdvertiserInvoices = NewAdvertiserInvoicesService(s)
159 s.AdvertiserLandingPages = NewAdvertiserLandingPagesService(s)
160 s.Advertisers = NewAdvertisersService(s)
161 s.BillingAssignments = NewBillingAssignmentsService(s)
162 s.BillingProfiles = NewBillingProfilesService(s)
163 s.BillingRates = NewBillingRatesService(s)
164 s.Browsers = NewBrowsersService(s)
165 s.CampaignCreativeAssociations = NewCampaignCreativeAssociationsService(s)
166 s.Campaigns = NewCampaignsService(s)
167 s.ChangeLogs = NewChangeLogsService(s)
168 s.Cities = NewCitiesService(s)
169 s.ConnectionTypes = NewConnectionTypesService(s)
170 s.ContentCategories = NewContentCategoriesService(s)
171 s.Conversions = NewConversionsService(s)
172 s.Countries = NewCountriesService(s)
173 s.CreativeAssets = NewCreativeAssetsService(s)
174 s.CreativeFieldValues = NewCreativeFieldValuesService(s)
175 s.CreativeFields = NewCreativeFieldsService(s)
176 s.CreativeGroups = NewCreativeGroupsService(s)
177 s.Creatives = NewCreativesService(s)
178 s.DimensionValues = NewDimensionValuesService(s)
179 s.DirectorySites = NewDirectorySitesService(s)
180 s.DynamicTargetingKeys = NewDynamicTargetingKeysService(s)
181 s.EventTags = NewEventTagsService(s)
182 s.Files = NewFilesService(s)
183 s.FloodlightActivities = NewFloodlightActivitiesService(s)
184 s.FloodlightActivityGroups = NewFloodlightActivityGroupsService(s)
185 s.FloodlightConfigurations = NewFloodlightConfigurationsService(s)
186 s.InventoryItems = NewInventoryItemsService(s)
187 s.Languages = NewLanguagesService(s)
188 s.Metros = NewMetrosService(s)
189 s.MobileApps = NewMobileAppsService(s)
190 s.MobileCarriers = NewMobileCarriersService(s)
191 s.OperatingSystemVersions = NewOperatingSystemVersionsService(s)
192 s.OperatingSystems = NewOperatingSystemsService(s)
193 s.Orders = NewOrdersService(s)
194 s.PlacementGroups = NewPlacementGroupsService(s)
195 s.PlacementStrategies = NewPlacementStrategiesService(s)
196 s.Placements = NewPlacementsService(s)
197 s.PlatformTypes = NewPlatformTypesService(s)
198 s.PostalCodes = NewPostalCodesService(s)
199 s.Projects = NewProjectsService(s)
200 s.Regions = NewRegionsService(s)
201 s.RemarketingListShares = NewRemarketingListSharesService(s)
202 s.RemarketingLists = NewRemarketingListsService(s)
203 s.Reports = NewReportsService(s)
204 s.Sites = NewSitesService(s)
205 s.Sizes = NewSizesService(s)
206 s.Subaccounts = NewSubaccountsService(s)
207 s.TargetableRemarketingLists = NewTargetableRemarketingListsService(s)
208 s.TargetingTemplates = NewTargetingTemplatesService(s)
209 s.UserProfiles = NewUserProfilesService(s)
210 s.UserRolePermissionGroups = NewUserRolePermissionGroupsService(s)
211 s.UserRolePermissions = NewUserRolePermissionsService(s)
212 s.UserRoles = NewUserRolesService(s)
213 s.VideoFormats = NewVideoFormatsService(s)
214 return s, nil
215 }
216
217 type Service struct {
218 client *http.Client
219 BasePath string
220 UserAgent string
221
222 AccountActiveAdSummaries *AccountActiveAdSummariesService
223
224 AccountPermissionGroups *AccountPermissionGroupsService
225
226 AccountPermissions *AccountPermissionsService
227
228 AccountUserProfiles *AccountUserProfilesService
229
230 Accounts *AccountsService
231
232 Ads *AdsService
233
234 AdvertiserGroups *AdvertiserGroupsService
235
236 AdvertiserInvoices *AdvertiserInvoicesService
237
238 AdvertiserLandingPages *AdvertiserLandingPagesService
239
240 Advertisers *AdvertisersService
241
242 BillingAssignments *BillingAssignmentsService
243
244 BillingProfiles *BillingProfilesService
245
246 BillingRates *BillingRatesService
247
248 Browsers *BrowsersService
249
250 CampaignCreativeAssociations *CampaignCreativeAssociationsService
251
252 Campaigns *CampaignsService
253
254 ChangeLogs *ChangeLogsService
255
256 Cities *CitiesService
257
258 ConnectionTypes *ConnectionTypesService
259
260 ContentCategories *ContentCategoriesService
261
262 Conversions *ConversionsService
263
264 Countries *CountriesService
265
266 CreativeAssets *CreativeAssetsService
267
268 CreativeFieldValues *CreativeFieldValuesService
269
270 CreativeFields *CreativeFieldsService
271
272 CreativeGroups *CreativeGroupsService
273
274 Creatives *CreativesService
275
276 DimensionValues *DimensionValuesService
277
278 DirectorySites *DirectorySitesService
279
280 DynamicTargetingKeys *DynamicTargetingKeysService
281
282 EventTags *EventTagsService
283
284 Files *FilesService
285
286 FloodlightActivities *FloodlightActivitiesService
287
288 FloodlightActivityGroups *FloodlightActivityGroupsService
289
290 FloodlightConfigurations *FloodlightConfigurationsService
291
292 InventoryItems *InventoryItemsService
293
294 Languages *LanguagesService
295
296 Metros *MetrosService
297
298 MobileApps *MobileAppsService
299
300 MobileCarriers *MobileCarriersService
301
302 OperatingSystemVersions *OperatingSystemVersionsService
303
304 OperatingSystems *OperatingSystemsService
305
306 Orders *OrdersService
307
308 PlacementGroups *PlacementGroupsService
309
310 PlacementStrategies *PlacementStrategiesService
311
312 Placements *PlacementsService
313
314 PlatformTypes *PlatformTypesService
315
316 PostalCodes *PostalCodesService
317
318 Projects *ProjectsService
319
320 Regions *RegionsService
321
322 RemarketingListShares *RemarketingListSharesService
323
324 RemarketingLists *RemarketingListsService
325
326 Reports *ReportsService
327
328 Sites *SitesService
329
330 Sizes *SizesService
331
332 Subaccounts *SubaccountsService
333
334 TargetableRemarketingLists *TargetableRemarketingListsService
335
336 TargetingTemplates *TargetingTemplatesService
337
338 UserProfiles *UserProfilesService
339
340 UserRolePermissionGroups *UserRolePermissionGroupsService
341
342 UserRolePermissions *UserRolePermissionsService
343
344 UserRoles *UserRolesService
345
346 VideoFormats *VideoFormatsService
347 }
348
349 func (s *Service) userAgent() string {
350 if s.UserAgent == "" {
351 return googleapi.UserAgent
352 }
353 return googleapi.UserAgent + " " + s.UserAgent
354 }
355
356 func NewAccountActiveAdSummariesService(s *Service) *AccountActiveAdSummariesService {
357 rs := &AccountActiveAdSummariesService{s: s}
358 return rs
359 }
360
361 type AccountActiveAdSummariesService struct {
362 s *Service
363 }
364
365 func NewAccountPermissionGroupsService(s *Service) *AccountPermissionGroupsService {
366 rs := &AccountPermissionGroupsService{s: s}
367 return rs
368 }
369
370 type AccountPermissionGroupsService struct {
371 s *Service
372 }
373
374 func NewAccountPermissionsService(s *Service) *AccountPermissionsService {
375 rs := &AccountPermissionsService{s: s}
376 return rs
377 }
378
379 type AccountPermissionsService struct {
380 s *Service
381 }
382
383 func NewAccountUserProfilesService(s *Service) *AccountUserProfilesService {
384 rs := &AccountUserProfilesService{s: s}
385 return rs
386 }
387
388 type AccountUserProfilesService struct {
389 s *Service
390 }
391
392 func NewAccountsService(s *Service) *AccountsService {
393 rs := &AccountsService{s: s}
394 return rs
395 }
396
397 type AccountsService struct {
398 s *Service
399 }
400
401 func NewAdsService(s *Service) *AdsService {
402 rs := &AdsService{s: s}
403 return rs
404 }
405
406 type AdsService struct {
407 s *Service
408 }
409
410 func NewAdvertiserGroupsService(s *Service) *AdvertiserGroupsService {
411 rs := &AdvertiserGroupsService{s: s}
412 return rs
413 }
414
415 type AdvertiserGroupsService struct {
416 s *Service
417 }
418
419 func NewAdvertiserInvoicesService(s *Service) *AdvertiserInvoicesService {
420 rs := &AdvertiserInvoicesService{s: s}
421 return rs
422 }
423
424 type AdvertiserInvoicesService struct {
425 s *Service
426 }
427
428 func NewAdvertiserLandingPagesService(s *Service) *AdvertiserLandingPagesService {
429 rs := &AdvertiserLandingPagesService{s: s}
430 return rs
431 }
432
433 type AdvertiserLandingPagesService struct {
434 s *Service
435 }
436
437 func NewAdvertisersService(s *Service) *AdvertisersService {
438 rs := &AdvertisersService{s: s}
439 return rs
440 }
441
442 type AdvertisersService struct {
443 s *Service
444 }
445
446 func NewBillingAssignmentsService(s *Service) *BillingAssignmentsService {
447 rs := &BillingAssignmentsService{s: s}
448 return rs
449 }
450
451 type BillingAssignmentsService struct {
452 s *Service
453 }
454
455 func NewBillingProfilesService(s *Service) *BillingProfilesService {
456 rs := &BillingProfilesService{s: s}
457 return rs
458 }
459
460 type BillingProfilesService struct {
461 s *Service
462 }
463
464 func NewBillingRatesService(s *Service) *BillingRatesService {
465 rs := &BillingRatesService{s: s}
466 return rs
467 }
468
469 type BillingRatesService struct {
470 s *Service
471 }
472
473 func NewBrowsersService(s *Service) *BrowsersService {
474 rs := &BrowsersService{s: s}
475 return rs
476 }
477
478 type BrowsersService struct {
479 s *Service
480 }
481
482 func NewCampaignCreativeAssociationsService(s *Service) *CampaignCreativeAssociationsService {
483 rs := &CampaignCreativeAssociationsService{s: s}
484 return rs
485 }
486
487 type CampaignCreativeAssociationsService struct {
488 s *Service
489 }
490
491 func NewCampaignsService(s *Service) *CampaignsService {
492 rs := &CampaignsService{s: s}
493 return rs
494 }
495
496 type CampaignsService struct {
497 s *Service
498 }
499
500 func NewChangeLogsService(s *Service) *ChangeLogsService {
501 rs := &ChangeLogsService{s: s}
502 return rs
503 }
504
505 type ChangeLogsService struct {
506 s *Service
507 }
508
509 func NewCitiesService(s *Service) *CitiesService {
510 rs := &CitiesService{s: s}
511 return rs
512 }
513
514 type CitiesService struct {
515 s *Service
516 }
517
518 func NewConnectionTypesService(s *Service) *ConnectionTypesService {
519 rs := &ConnectionTypesService{s: s}
520 return rs
521 }
522
523 type ConnectionTypesService struct {
524 s *Service
525 }
526
527 func NewContentCategoriesService(s *Service) *ContentCategoriesService {
528 rs := &ContentCategoriesService{s: s}
529 return rs
530 }
531
532 type ContentCategoriesService struct {
533 s *Service
534 }
535
536 func NewConversionsService(s *Service) *ConversionsService {
537 rs := &ConversionsService{s: s}
538 return rs
539 }
540
541 type ConversionsService struct {
542 s *Service
543 }
544
545 func NewCountriesService(s *Service) *CountriesService {
546 rs := &CountriesService{s: s}
547 return rs
548 }
549
550 type CountriesService struct {
551 s *Service
552 }
553
554 func NewCreativeAssetsService(s *Service) *CreativeAssetsService {
555 rs := &CreativeAssetsService{s: s}
556 return rs
557 }
558
559 type CreativeAssetsService struct {
560 s *Service
561 }
562
563 func NewCreativeFieldValuesService(s *Service) *CreativeFieldValuesService {
564 rs := &CreativeFieldValuesService{s: s}
565 return rs
566 }
567
568 type CreativeFieldValuesService struct {
569 s *Service
570 }
571
572 func NewCreativeFieldsService(s *Service) *CreativeFieldsService {
573 rs := &CreativeFieldsService{s: s}
574 return rs
575 }
576
577 type CreativeFieldsService struct {
578 s *Service
579 }
580
581 func NewCreativeGroupsService(s *Service) *CreativeGroupsService {
582 rs := &CreativeGroupsService{s: s}
583 return rs
584 }
585
586 type CreativeGroupsService struct {
587 s *Service
588 }
589
590 func NewCreativesService(s *Service) *CreativesService {
591 rs := &CreativesService{s: s}
592 return rs
593 }
594
595 type CreativesService struct {
596 s *Service
597 }
598
599 func NewDimensionValuesService(s *Service) *DimensionValuesService {
600 rs := &DimensionValuesService{s: s}
601 return rs
602 }
603
604 type DimensionValuesService struct {
605 s *Service
606 }
607
608 func NewDirectorySitesService(s *Service) *DirectorySitesService {
609 rs := &DirectorySitesService{s: s}
610 return rs
611 }
612
613 type DirectorySitesService struct {
614 s *Service
615 }
616
617 func NewDynamicTargetingKeysService(s *Service) *DynamicTargetingKeysService {
618 rs := &DynamicTargetingKeysService{s: s}
619 return rs
620 }
621
622 type DynamicTargetingKeysService struct {
623 s *Service
624 }
625
626 func NewEventTagsService(s *Service) *EventTagsService {
627 rs := &EventTagsService{s: s}
628 return rs
629 }
630
631 type EventTagsService struct {
632 s *Service
633 }
634
635 func NewFilesService(s *Service) *FilesService {
636 rs := &FilesService{s: s}
637 return rs
638 }
639
640 type FilesService struct {
641 s *Service
642 }
643
644 func NewFloodlightActivitiesService(s *Service) *FloodlightActivitiesService {
645 rs := &FloodlightActivitiesService{s: s}
646 return rs
647 }
648
649 type FloodlightActivitiesService struct {
650 s *Service
651 }
652
653 func NewFloodlightActivityGroupsService(s *Service) *FloodlightActivityGroupsService {
654 rs := &FloodlightActivityGroupsService{s: s}
655 return rs
656 }
657
658 type FloodlightActivityGroupsService struct {
659 s *Service
660 }
661
662 func NewFloodlightConfigurationsService(s *Service) *FloodlightConfigurationsService {
663 rs := &FloodlightConfigurationsService{s: s}
664 return rs
665 }
666
667 type FloodlightConfigurationsService struct {
668 s *Service
669 }
670
671 func NewInventoryItemsService(s *Service) *InventoryItemsService {
672 rs := &InventoryItemsService{s: s}
673 return rs
674 }
675
676 type InventoryItemsService struct {
677 s *Service
678 }
679
680 func NewLanguagesService(s *Service) *LanguagesService {
681 rs := &LanguagesService{s: s}
682 return rs
683 }
684
685 type LanguagesService struct {
686 s *Service
687 }
688
689 func NewMetrosService(s *Service) *MetrosService {
690 rs := &MetrosService{s: s}
691 return rs
692 }
693
694 type MetrosService struct {
695 s *Service
696 }
697
698 func NewMobileAppsService(s *Service) *MobileAppsService {
699 rs := &MobileAppsService{s: s}
700 return rs
701 }
702
703 type MobileAppsService struct {
704 s *Service
705 }
706
707 func NewMobileCarriersService(s *Service) *MobileCarriersService {
708 rs := &MobileCarriersService{s: s}
709 return rs
710 }
711
712 type MobileCarriersService struct {
713 s *Service
714 }
715
716 func NewOperatingSystemVersionsService(s *Service) *OperatingSystemVersionsService {
717 rs := &OperatingSystemVersionsService{s: s}
718 return rs
719 }
720
721 type OperatingSystemVersionsService struct {
722 s *Service
723 }
724
725 func NewOperatingSystemsService(s *Service) *OperatingSystemsService {
726 rs := &OperatingSystemsService{s: s}
727 return rs
728 }
729
730 type OperatingSystemsService struct {
731 s *Service
732 }
733
734 func NewOrdersService(s *Service) *OrdersService {
735 rs := &OrdersService{s: s}
736 return rs
737 }
738
739 type OrdersService struct {
740 s *Service
741 }
742
743 func NewPlacementGroupsService(s *Service) *PlacementGroupsService {
744 rs := &PlacementGroupsService{s: s}
745 return rs
746 }
747
748 type PlacementGroupsService struct {
749 s *Service
750 }
751
752 func NewPlacementStrategiesService(s *Service) *PlacementStrategiesService {
753 rs := &PlacementStrategiesService{s: s}
754 return rs
755 }
756
757 type PlacementStrategiesService struct {
758 s *Service
759 }
760
761 func NewPlacementsService(s *Service) *PlacementsService {
762 rs := &PlacementsService{s: s}
763 return rs
764 }
765
766 type PlacementsService struct {
767 s *Service
768 }
769
770 func NewPlatformTypesService(s *Service) *PlatformTypesService {
771 rs := &PlatformTypesService{s: s}
772 return rs
773 }
774
775 type PlatformTypesService struct {
776 s *Service
777 }
778
779 func NewPostalCodesService(s *Service) *PostalCodesService {
780 rs := &PostalCodesService{s: s}
781 return rs
782 }
783
784 type PostalCodesService struct {
785 s *Service
786 }
787
788 func NewProjectsService(s *Service) *ProjectsService {
789 rs := &ProjectsService{s: s}
790 return rs
791 }
792
793 type ProjectsService struct {
794 s *Service
795 }
796
797 func NewRegionsService(s *Service) *RegionsService {
798 rs := &RegionsService{s: s}
799 return rs
800 }
801
802 type RegionsService struct {
803 s *Service
804 }
805
806 func NewRemarketingListSharesService(s *Service) *RemarketingListSharesService {
807 rs := &RemarketingListSharesService{s: s}
808 return rs
809 }
810
811 type RemarketingListSharesService struct {
812 s *Service
813 }
814
815 func NewRemarketingListsService(s *Service) *RemarketingListsService {
816 rs := &RemarketingListsService{s: s}
817 return rs
818 }
819
820 type RemarketingListsService struct {
821 s *Service
822 }
823
824 func NewReportsService(s *Service) *ReportsService {
825 rs := &ReportsService{s: s}
826 rs.CompatibleFields = NewReportsCompatibleFieldsService(s)
827 rs.Files = NewReportsFilesService(s)
828 return rs
829 }
830
831 type ReportsService struct {
832 s *Service
833
834 CompatibleFields *ReportsCompatibleFieldsService
835
836 Files *ReportsFilesService
837 }
838
839 func NewReportsCompatibleFieldsService(s *Service) *ReportsCompatibleFieldsService {
840 rs := &ReportsCompatibleFieldsService{s: s}
841 return rs
842 }
843
844 type ReportsCompatibleFieldsService struct {
845 s *Service
846 }
847
848 func NewReportsFilesService(s *Service) *ReportsFilesService {
849 rs := &ReportsFilesService{s: s}
850 return rs
851 }
852
853 type ReportsFilesService struct {
854 s *Service
855 }
856
857 func NewSitesService(s *Service) *SitesService {
858 rs := &SitesService{s: s}
859 return rs
860 }
861
862 type SitesService struct {
863 s *Service
864 }
865
866 func NewSizesService(s *Service) *SizesService {
867 rs := &SizesService{s: s}
868 return rs
869 }
870
871 type SizesService struct {
872 s *Service
873 }
874
875 func NewSubaccountsService(s *Service) *SubaccountsService {
876 rs := &SubaccountsService{s: s}
877 return rs
878 }
879
880 type SubaccountsService struct {
881 s *Service
882 }
883
884 func NewTargetableRemarketingListsService(s *Service) *TargetableRemarketingListsService {
885 rs := &TargetableRemarketingListsService{s: s}
886 return rs
887 }
888
889 type TargetableRemarketingListsService struct {
890 s *Service
891 }
892
893 func NewTargetingTemplatesService(s *Service) *TargetingTemplatesService {
894 rs := &TargetingTemplatesService{s: s}
895 return rs
896 }
897
898 type TargetingTemplatesService struct {
899 s *Service
900 }
901
902 func NewUserProfilesService(s *Service) *UserProfilesService {
903 rs := &UserProfilesService{s: s}
904 return rs
905 }
906
907 type UserProfilesService struct {
908 s *Service
909 }
910
911 func NewUserRolePermissionGroupsService(s *Service) *UserRolePermissionGroupsService {
912 rs := &UserRolePermissionGroupsService{s: s}
913 return rs
914 }
915
916 type UserRolePermissionGroupsService struct {
917 s *Service
918 }
919
920 func NewUserRolePermissionsService(s *Service) *UserRolePermissionsService {
921 rs := &UserRolePermissionsService{s: s}
922 return rs
923 }
924
925 type UserRolePermissionsService struct {
926 s *Service
927 }
928
929 func NewUserRolesService(s *Service) *UserRolesService {
930 rs := &UserRolesService{s: s}
931 return rs
932 }
933
934 type UserRolesService struct {
935 s *Service
936 }
937
938 func NewVideoFormatsService(s *Service) *VideoFormatsService {
939 rs := &VideoFormatsService{s: s}
940 return rs
941 }
942
943 type VideoFormatsService struct {
944 s *Service
945 }
946
947
948 type Account struct {
949
950 AccountPermissionIds googleapi.Int64s `json:"accountPermissionIds,omitempty"`
951
952
953
954
955
956
957
958 AccountProfile string `json:"accountProfile,omitempty"`
959
960 Active bool `json:"active,omitempty"`
961
962
963
964
965
966
967
968
969
970
971
972 ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
973
974
975 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
976
977
978 AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
979
980 CountryId int64 `json:"countryId,omitempty,string"`
981
982
983
984
985
986
987
988
989
990
991
992
993 CurrencyId int64 `json:"currencyId,omitempty,string"`
994
995 DefaultCreativeSizeId int64 `json:"defaultCreativeSizeId,omitempty,string"`
996
997 Description string `json:"description,omitempty"`
998
999 Id int64 `json:"id,omitempty,string"`
1000
1001
1002 Kind string `json:"kind,omitempty"`
1003
1004
1005
1006
1007
1008
1009 Locale string `json:"locale,omitempty"`
1010
1011
1012 MaximumImageSize int64 `json:"maximumImageSize,omitempty,string"`
1013
1014
1015 Name string `json:"name,omitempty"`
1016
1017
1018 NielsenOcrEnabled bool `json:"nielsenOcrEnabled,omitempty"`
1019
1020 ReportsConfiguration *ReportsConfiguration `json:"reportsConfiguration,omitempty"`
1021
1022 ShareReportsWithTwitter bool `json:"shareReportsWithTwitter,omitempty"`
1023
1024
1025 TeaserSizeLimit int64 `json:"teaserSizeLimit,omitempty,string"`
1026
1027
1028 googleapi.ServerResponse `json:"-"`
1029
1030
1031
1032
1033
1034 ForceSendFields []string `json:"-"`
1035
1036
1037
1038
1039 NullFields []string `json:"-"`
1040 }
1041
1042 func (s *Account) MarshalJSON() ([]byte, error) {
1043 type NoMethod Account
1044 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1045 }
1046
1047
1048 type AccountActiveAdSummary struct {
1049
1050 AccountId int64 `json:"accountId,omitempty,string"`
1051
1052 ActiveAds int64 `json:"activeAds,omitempty,string"`
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064 ActiveAdsLimitTier string `json:"activeAdsLimitTier,omitempty"`
1065
1066 AvailableAds int64 `json:"availableAds,omitempty,string"`
1067
1068
1069 Kind string `json:"kind,omitempty"`
1070
1071
1072 googleapi.ServerResponse `json:"-"`
1073
1074
1075
1076
1077
1078 ForceSendFields []string `json:"-"`
1079
1080
1081
1082
1083 NullFields []string `json:"-"`
1084 }
1085
1086 func (s *AccountActiveAdSummary) MarshalJSON() ([]byte, error) {
1087 type NoMethod AccountActiveAdSummary
1088 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1089 }
1090
1091
1092
1093
1094 type AccountPermission struct {
1095
1096
1097
1098
1099
1100
1101
1102 AccountProfiles []string `json:"accountProfiles,omitempty"`
1103
1104 Id int64 `json:"id,omitempty,string"`
1105
1106
1107 Kind string `json:"kind,omitempty"`
1108
1109
1110
1111
1112
1113 Level string `json:"level,omitempty"`
1114
1115 Name string `json:"name,omitempty"`
1116
1117 PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
1118
1119
1120 googleapi.ServerResponse `json:"-"`
1121
1122
1123
1124
1125
1126 ForceSendFields []string `json:"-"`
1127
1128
1129
1130
1131 NullFields []string `json:"-"`
1132 }
1133
1134 func (s *AccountPermission) MarshalJSON() ([]byte, error) {
1135 type NoMethod AccountPermission
1136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1137 }
1138
1139
1140
1141
1142 type AccountPermissionGroup struct {
1143
1144 Id int64 `json:"id,omitempty,string"`
1145
1146
1147 Kind string `json:"kind,omitempty"`
1148
1149 Name string `json:"name,omitempty"`
1150
1151
1152 googleapi.ServerResponse `json:"-"`
1153
1154
1155
1156
1157
1158 ForceSendFields []string `json:"-"`
1159
1160
1161
1162
1163 NullFields []string `json:"-"`
1164 }
1165
1166 func (s *AccountPermissionGroup) MarshalJSON() ([]byte, error) {
1167 type NoMethod AccountPermissionGroup
1168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1169 }
1170
1171
1172 type AccountPermissionGroupsListResponse struct {
1173
1174 AccountPermissionGroups []*AccountPermissionGroup `json:"accountPermissionGroups,omitempty"`
1175
1176
1177 Kind string `json:"kind,omitempty"`
1178
1179
1180 googleapi.ServerResponse `json:"-"`
1181
1182
1183
1184
1185
1186 ForceSendFields []string `json:"-"`
1187
1188
1189
1190
1191 NullFields []string `json:"-"`
1192 }
1193
1194 func (s *AccountPermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
1195 type NoMethod AccountPermissionGroupsListResponse
1196 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1197 }
1198
1199
1200 type AccountPermissionsListResponse struct {
1201
1202 AccountPermissions []*AccountPermission `json:"accountPermissions,omitempty"`
1203
1204
1205 Kind string `json:"kind,omitempty"`
1206
1207
1208 googleapi.ServerResponse `json:"-"`
1209
1210
1211
1212
1213
1214 ForceSendFields []string `json:"-"`
1215
1216
1217
1218
1219 NullFields []string `json:"-"`
1220 }
1221
1222 func (s *AccountPermissionsListResponse) MarshalJSON() ([]byte, error) {
1223 type NoMethod AccountPermissionsListResponse
1224 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1225 }
1226
1227
1228
1229
1230 type AccountUserProfile struct {
1231
1232
1233 AccountId int64 `json:"accountId,omitempty,string"`
1234
1235
1236 Active bool `json:"active,omitempty"`
1237
1238
1239 AdvertiserFilter *ObjectFilter `json:"advertiserFilter,omitempty"`
1240
1241
1242 CampaignFilter *ObjectFilter `json:"campaignFilter,omitempty"`
1243
1244 Comments string `json:"comments,omitempty"`
1245
1246
1247
1248 Email string `json:"email,omitempty"`
1249
1250 Id int64 `json:"id,omitempty,string"`
1251
1252
1253 Kind string `json:"kind,omitempty"`
1254
1255
1256
1257
1258
1259
1260 Locale string `json:"locale,omitempty"`
1261
1262
1263
1264 Name string `json:"name,omitempty"`
1265
1266
1267 SiteFilter *ObjectFilter `json:"siteFilter,omitempty"`
1268
1269
1270 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1271
1272
1273
1274
1275
1276
1277
1278 TraffickerType string `json:"traffickerType,omitempty"`
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289 UserAccessType string `json:"userAccessType,omitempty"`
1290
1291
1292 UserRoleFilter *ObjectFilter `json:"userRoleFilter,omitempty"`
1293
1294 UserRoleId int64 `json:"userRoleId,omitempty,string"`
1295
1296
1297 googleapi.ServerResponse `json:"-"`
1298
1299
1300
1301
1302
1303 ForceSendFields []string `json:"-"`
1304
1305
1306
1307
1308 NullFields []string `json:"-"`
1309 }
1310
1311 func (s *AccountUserProfile) MarshalJSON() ([]byte, error) {
1312 type NoMethod AccountUserProfile
1313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1314 }
1315
1316
1317 type AccountUserProfilesListResponse struct {
1318
1319 AccountUserProfiles []*AccountUserProfile `json:"accountUserProfiles,omitempty"`
1320
1321
1322 Kind string `json:"kind,omitempty"`
1323
1324 NextPageToken string `json:"nextPageToken,omitempty"`
1325
1326
1327 googleapi.ServerResponse `json:"-"`
1328
1329
1330
1331
1332
1333 ForceSendFields []string `json:"-"`
1334
1335
1336
1337
1338 NullFields []string `json:"-"`
1339 }
1340
1341 func (s *AccountUserProfilesListResponse) MarshalJSON() ([]byte, error) {
1342 type NoMethod AccountUserProfilesListResponse
1343 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1344 }
1345
1346
1347 type AccountsListResponse struct {
1348
1349 Accounts []*Account `json:"accounts,omitempty"`
1350
1351
1352 Kind string `json:"kind,omitempty"`
1353
1354 NextPageToken string `json:"nextPageToken,omitempty"`
1355
1356
1357 googleapi.ServerResponse `json:"-"`
1358
1359
1360
1361
1362
1363 ForceSendFields []string `json:"-"`
1364
1365
1366
1367
1368 NullFields []string `json:"-"`
1369 }
1370
1371 func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
1372 type NoMethod AccountsListResponse
1373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1374 }
1375
1376
1377 type Activities struct {
1378
1379
1380 Filters []*DimensionValue `json:"filters,omitempty"`
1381
1382 Kind string `json:"kind,omitempty"`
1383
1384 MetricNames []string `json:"metricNames,omitempty"`
1385
1386
1387
1388
1389
1390 ForceSendFields []string `json:"-"`
1391
1392
1393
1394
1395 NullFields []string `json:"-"`
1396 }
1397
1398 func (s *Activities) MarshalJSON() ([]byte, error) {
1399 type NoMethod Activities
1400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1401 }
1402
1403
1404 type Ad struct {
1405
1406
1407 AccountId int64 `json:"accountId,omitempty,string"`
1408
1409 Active bool `json:"active,omitempty"`
1410
1411
1412 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
1413
1414
1415 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
1416
1417 Archived bool `json:"archived,omitempty"`
1418
1419
1420 AudienceSegmentId int64 `json:"audienceSegmentId,omitempty,string"`
1421
1422 CampaignId int64 `json:"campaignId,omitempty,string"`
1423
1424
1425 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
1426
1427
1428 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
1429
1430
1431
1432 ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
1433
1434 Comments string `json:"comments,omitempty"`
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451 Compatibility string `json:"compatibility,omitempty"`
1452
1453
1454 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
1455
1456
1457
1458 CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
1459
1460
1461
1462
1463 CreativeRotation *CreativeRotation `json:"creativeRotation,omitempty"`
1464
1465
1466
1467 DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
1468
1469
1470 DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
1471
1472
1473
1474
1475 DeliverySchedule *DeliverySchedule `json:"deliverySchedule,omitempty"`
1476
1477
1478
1479 DynamicClickTracker bool `json:"dynamicClickTracker,omitempty"`
1480 EndTime string `json:"endTime,omitempty"`
1481
1482 EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
1483
1484
1485
1486 GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
1487
1488 Id int64 `json:"id,omitempty,string"`
1489
1490
1491 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1492
1493
1494
1495 KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
1496
1497
1498 Kind string `json:"kind,omitempty"`
1499
1500
1501
1502 LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
1503
1504
1505 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
1506
1507
1508 Name string `json:"name,omitempty"`
1509
1510 PlacementAssignments []*PlacementAssignment `json:"placementAssignments,omitempty"`
1511
1512
1513
1514 RemarketingListExpression *ListTargetingExpression `json:"remarketingListExpression,omitempty"`
1515
1516 Size *Size `json:"size,omitempty"`
1517
1518
1519 SslCompliant bool `json:"sslCompliant,omitempty"`
1520
1521
1522 SslRequired bool `json:"sslRequired,omitempty"`
1523 StartTime string `json:"startTime,omitempty"`
1524
1525
1526 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1527
1528
1529
1530
1531
1532 TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
1533
1534
1535
1536 TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547 Type string `json:"type,omitempty"`
1548
1549
1550 googleapi.ServerResponse `json:"-"`
1551
1552
1553
1554
1555
1556 ForceSendFields []string `json:"-"`
1557
1558
1559
1560
1561 NullFields []string `json:"-"`
1562 }
1563
1564 func (s *Ad) MarshalJSON() ([]byte, error) {
1565 type NoMethod Ad
1566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1567 }
1568
1569
1570 type AdBlockingConfiguration struct {
1571
1572
1573
1574
1575
1576 Enabled bool `json:"enabled,omitempty"`
1577
1578
1579
1580
1581
1582 ForceSendFields []string `json:"-"`
1583
1584
1585
1586
1587 NullFields []string `json:"-"`
1588 }
1589
1590 func (s *AdBlockingConfiguration) MarshalJSON() ([]byte, error) {
1591 type NoMethod AdBlockingConfiguration
1592 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1593 }
1594
1595
1596 type AdSlot struct {
1597
1598 Comment string `json:"comment,omitempty"`
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612 Compatibility string `json:"compatibility,omitempty"`
1613
1614 Height int64 `json:"height,omitempty,string"`
1615
1616
1617 LinkedPlacementId int64 `json:"linkedPlacementId,omitempty,string"`
1618
1619 Name string `json:"name,omitempty"`
1620
1621
1622
1623
1624
1625 PaymentSourceType string `json:"paymentSourceType,omitempty"`
1626
1627 Primary bool `json:"primary,omitempty"`
1628
1629 Width int64 `json:"width,omitempty,string"`
1630
1631
1632
1633
1634
1635 ForceSendFields []string `json:"-"`
1636
1637
1638
1639
1640 NullFields []string `json:"-"`
1641 }
1642
1643 func (s *AdSlot) MarshalJSON() ([]byte, error) {
1644 type NoMethod AdSlot
1645 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1646 }
1647
1648
1649 type AdsListResponse struct {
1650
1651 Ads []*Ad `json:"ads,omitempty"`
1652
1653
1654 Kind string `json:"kind,omitempty"`
1655
1656 NextPageToken string `json:"nextPageToken,omitempty"`
1657
1658
1659 googleapi.ServerResponse `json:"-"`
1660
1661
1662
1663
1664
1665 ForceSendFields []string `json:"-"`
1666
1667
1668
1669
1670 NullFields []string `json:"-"`
1671 }
1672
1673 func (s *AdsListResponse) MarshalJSON() ([]byte, error) {
1674 type NoMethod AdsListResponse
1675 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1676 }
1677
1678
1679 type Advertiser struct {
1680
1681
1682 AccountId int64 `json:"accountId,omitempty,string"`
1683
1684
1685
1686 AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
1687
1688
1689 ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
1690
1691
1692 DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
1693
1694 DefaultEmail string `json:"defaultEmail,omitempty"`
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
1705
1706
1707 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
1708
1709 Id int64 `json:"id,omitempty,string"`
1710
1711
1712 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
1713
1714
1715 Kind string `json:"kind,omitempty"`
1716
1717
1718 MeasurementPartnerLink *MeasurementPartnerAdvertiserLink `json:"measurementPartnerLink,omitempty"`
1719
1720
1721 Name string `json:"name,omitempty"`
1722
1723
1724
1725
1726
1727
1728 OriginalFloodlightConfigurationId int64 `json:"originalFloodlightConfigurationId,omitempty,string"`
1729
1730
1731
1732
1733
1734 Status string `json:"status,omitempty"`
1735
1736
1737 SubaccountId int64 `json:"subaccountId,omitempty,string"`
1738
1739 Suspended bool `json:"suspended,omitempty"`
1740
1741
1742 googleapi.ServerResponse `json:"-"`
1743
1744
1745
1746
1747
1748 ForceSendFields []string `json:"-"`
1749
1750
1751
1752
1753 NullFields []string `json:"-"`
1754 }
1755
1756 func (s *Advertiser) MarshalJSON() ([]byte, error) {
1757 type NoMethod Advertiser
1758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1759 }
1760
1761
1762
1763 type AdvertiserGroup struct {
1764
1765
1766 AccountId int64 `json:"accountId,omitempty,string"`
1767
1768 Id int64 `json:"id,omitempty,string"`
1769
1770
1771 Kind string `json:"kind,omitempty"`
1772
1773
1774
1775 Name string `json:"name,omitempty"`
1776
1777
1778 googleapi.ServerResponse `json:"-"`
1779
1780
1781
1782
1783
1784 ForceSendFields []string `json:"-"`
1785
1786
1787
1788
1789 NullFields []string `json:"-"`
1790 }
1791
1792 func (s *AdvertiserGroup) MarshalJSON() ([]byte, error) {
1793 type NoMethod AdvertiserGroup
1794 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1795 }
1796
1797
1798 type AdvertiserGroupsListResponse struct {
1799
1800 AdvertiserGroups []*AdvertiserGroup `json:"advertiserGroups,omitempty"`
1801
1802
1803 Kind string `json:"kind,omitempty"`
1804
1805 NextPageToken string `json:"nextPageToken,omitempty"`
1806
1807
1808 googleapi.ServerResponse `json:"-"`
1809
1810
1811
1812
1813
1814 ForceSendFields []string `json:"-"`
1815
1816
1817
1818
1819 NullFields []string `json:"-"`
1820 }
1821
1822 func (s *AdvertiserGroupsListResponse) MarshalJSON() ([]byte, error) {
1823 type NoMethod AdvertiserGroupsListResponse
1824 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1825 }
1826
1827
1828 type AdvertiserInvoicesListResponse struct {
1829
1830 Invoices []*Invoice `json:"invoices,omitempty"`
1831
1832
1833 Kind string `json:"kind,omitempty"`
1834
1835 NextPageToken string `json:"nextPageToken,omitempty"`
1836
1837
1838 googleapi.ServerResponse `json:"-"`
1839
1840
1841
1842
1843
1844 ForceSendFields []string `json:"-"`
1845
1846
1847
1848
1849 NullFields []string `json:"-"`
1850 }
1851
1852 func (s *AdvertiserInvoicesListResponse) MarshalJSON() ([]byte, error) {
1853 type NoMethod AdvertiserInvoicesListResponse
1854 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1855 }
1856
1857
1858 type AdvertiserLandingPagesListResponse struct {
1859
1860
1861 Kind string `json:"kind,omitempty"`
1862
1863 LandingPages []*LandingPage `json:"landingPages,omitempty"`
1864
1865 NextPageToken string `json:"nextPageToken,omitempty"`
1866
1867
1868 googleapi.ServerResponse `json:"-"`
1869
1870
1871
1872
1873
1874 ForceSendFields []string `json:"-"`
1875
1876
1877
1878
1879 NullFields []string `json:"-"`
1880 }
1881
1882 func (s *AdvertiserLandingPagesListResponse) MarshalJSON() ([]byte, error) {
1883 type NoMethod AdvertiserLandingPagesListResponse
1884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1885 }
1886
1887
1888 type AdvertisersListResponse struct {
1889
1890 Advertisers []*Advertiser `json:"advertisers,omitempty"`
1891
1892
1893 Kind string `json:"kind,omitempty"`
1894
1895 NextPageToken string `json:"nextPageToken,omitempty"`
1896
1897
1898 googleapi.ServerResponse `json:"-"`
1899
1900
1901
1902
1903
1904 ForceSendFields []string `json:"-"`
1905
1906
1907
1908
1909 NullFields []string `json:"-"`
1910 }
1911
1912 func (s *AdvertisersListResponse) MarshalJSON() ([]byte, error) {
1913 type NoMethod AdvertisersListResponse
1914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1915 }
1916
1917
1918 type AudienceSegment struct {
1919
1920
1921
1922 Allocation int64 `json:"allocation,omitempty"`
1923
1924 Id int64 `json:"id,omitempty,string"`
1925
1926
1927 Name string `json:"name,omitempty"`
1928
1929
1930
1931
1932
1933 ForceSendFields []string `json:"-"`
1934
1935
1936
1937
1938 NullFields []string `json:"-"`
1939 }
1940
1941 func (s *AudienceSegment) MarshalJSON() ([]byte, error) {
1942 type NoMethod AudienceSegment
1943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1944 }
1945
1946
1947 type AudienceSegmentGroup struct {
1948
1949
1950 AudienceSegments []*AudienceSegment `json:"audienceSegments,omitempty"`
1951
1952
1953 Id int64 `json:"id,omitempty,string"`
1954
1955
1956 Name string `json:"name,omitempty"`
1957
1958
1959
1960
1961
1962 ForceSendFields []string `json:"-"`
1963
1964
1965
1966
1967 NullFields []string `json:"-"`
1968 }
1969
1970 func (s *AudienceSegmentGroup) MarshalJSON() ([]byte, error) {
1971 type NoMethod AudienceSegmentGroup
1972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1973 }
1974
1975
1976
1977 type BillingAssignment struct {
1978
1979
1980 AccountId string `json:"accountId,omitempty"`
1981
1982
1983
1984 AdvertiserId string `json:"advertiserId,omitempty"`
1985
1986
1987 CampaignId string `json:"campaignId,omitempty"`
1988
1989
1990 Kind string `json:"kind,omitempty"`
1991
1992
1993
1994 SubaccountId string `json:"subaccountId,omitempty"`
1995
1996
1997 googleapi.ServerResponse `json:"-"`
1998
1999
2000
2001
2002
2003 ForceSendFields []string `json:"-"`
2004
2005
2006
2007
2008 NullFields []string `json:"-"`
2009 }
2010
2011 func (s *BillingAssignment) MarshalJSON() ([]byte, error) {
2012 type NoMethod BillingAssignment
2013 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2014 }
2015
2016
2017 type BillingAssignmentsListResponse struct {
2018
2019 BillingAssignments []*BillingAssignment `json:"billingAssignments,omitempty"`
2020
2021
2022 Kind string `json:"kind,omitempty"`
2023
2024
2025 googleapi.ServerResponse `json:"-"`
2026
2027
2028
2029
2030
2031 ForceSendFields []string `json:"-"`
2032
2033
2034
2035
2036 NullFields []string `json:"-"`
2037 }
2038
2039 func (s *BillingAssignmentsListResponse) MarshalJSON() ([]byte, error) {
2040 type NoMethod BillingAssignmentsListResponse
2041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2042 }
2043
2044
2045 type BillingProfile struct {
2046
2047
2048 ConsolidatedInvoice bool `json:"consolidatedInvoice,omitempty"`
2049
2050 CountryCode string `json:"countryCode,omitempty"`
2051
2052
2053 CurrencyCode string `json:"currencyCode,omitempty"`
2054
2055 Id int64 `json:"id,omitempty,string"`
2056
2057
2058
2059
2060
2061
2062
2063 InvoiceLevel string `json:"invoiceLevel,omitempty"`
2064
2065
2066 IsDefault bool `json:"isDefault,omitempty"`
2067
2068
2069 Kind string `json:"kind,omitempty"`
2070
2071
2072
2073 Name string `json:"name,omitempty"`
2074
2075
2076 PaymentsAccountId string `json:"paymentsAccountId,omitempty"`
2077
2078
2079 PaymentsCustomerId string `json:"paymentsCustomerId,omitempty"`
2080
2081
2082 PurchaseOrder string `json:"purchaseOrder,omitempty"`
2083
2084
2085 SecondaryPaymentsCustomerId string `json:"secondaryPaymentsCustomerId,omitempty"`
2086
2087
2088
2089
2090
2091
2092 Status string `json:"status,omitempty"`
2093
2094
2095 googleapi.ServerResponse `json:"-"`
2096
2097
2098
2099
2100
2101 ForceSendFields []string `json:"-"`
2102
2103
2104
2105
2106 NullFields []string `json:"-"`
2107 }
2108
2109 func (s *BillingProfile) MarshalJSON() ([]byte, error) {
2110 type NoMethod BillingProfile
2111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2112 }
2113
2114
2115 type BillingProfilesListResponse struct {
2116
2117 BillingProfiles []*BillingProfile `json:"billingProfiles,omitempty"`
2118
2119
2120 Kind string `json:"kind,omitempty"`
2121
2122 NextPageToken string `json:"nextPageToken,omitempty"`
2123
2124
2125 googleapi.ServerResponse `json:"-"`
2126
2127
2128
2129
2130
2131 ForceSendFields []string `json:"-"`
2132
2133
2134
2135
2136 NullFields []string `json:"-"`
2137 }
2138
2139 func (s *BillingProfilesListResponse) MarshalJSON() ([]byte, error) {
2140 type NoMethod BillingProfilesListResponse
2141 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2142 }
2143
2144 type BillingRate struct {
2145
2146 CurrencyCode string `json:"currencyCode,omitempty"`
2147
2148 EndDate string `json:"endDate,omitempty"`
2149
2150 Id int64 `json:"id,omitempty,string"`
2151
2152 Name string `json:"name,omitempty"`
2153
2154
2155 RateInMicros int64 `json:"rateInMicros,omitempty,string"`
2156
2157 StartDate string `json:"startDate,omitempty"`
2158
2159
2160 TieredRates []*BillingRateTieredRate `json:"tieredRates,omitempty"`
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196 Type string `json:"type,omitempty"`
2197
2198
2199
2200
2201
2202
2203
2204 UnitOfMeasure string `json:"unitOfMeasure,omitempty"`
2205
2206
2207
2208
2209
2210 ForceSendFields []string `json:"-"`
2211
2212
2213
2214
2215 NullFields []string `json:"-"`
2216 }
2217
2218 func (s *BillingRate) MarshalJSON() ([]byte, error) {
2219 type NoMethod BillingRate
2220 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2221 }
2222
2223 type BillingRateTieredRate struct {
2224
2225 HighValue int64 `json:"highValue,omitempty,string"`
2226
2227 LowValue int64 `json:"lowValue,omitempty,string"`
2228
2229 RateInMicros int64 `json:"rateInMicros,omitempty,string"`
2230
2231
2232
2233
2234
2235 ForceSendFields []string `json:"-"`
2236
2237
2238
2239
2240 NullFields []string `json:"-"`
2241 }
2242
2243 func (s *BillingRateTieredRate) MarshalJSON() ([]byte, error) {
2244 type NoMethod BillingRateTieredRate
2245 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2246 }
2247
2248
2249 type BillingRatesListResponse struct {
2250
2251 BillingRates []*BillingRate `json:"billingRates,omitempty"`
2252
2253
2254 Kind string `json:"kind,omitempty"`
2255
2256 NextPageToken string `json:"nextPageToken,omitempty"`
2257
2258
2259 googleapi.ServerResponse `json:"-"`
2260
2261
2262
2263
2264
2265 ForceSendFields []string `json:"-"`
2266
2267
2268
2269
2270 NullFields []string `json:"-"`
2271 }
2272
2273 func (s *BillingRatesListResponse) MarshalJSON() ([]byte, error) {
2274 type NoMethod BillingRatesListResponse
2275 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2276 }
2277
2278
2279 type Browser struct {
2280
2281
2282 BrowserVersionId int64 `json:"browserVersionId,omitempty,string"`
2283
2284
2285 DartId int64 `json:"dartId,omitempty,string"`
2286
2287
2288 Kind string `json:"kind,omitempty"`
2289
2290
2291
2292
2293
2294
2295
2296
2297 MajorVersion string `json:"majorVersion,omitempty"`
2298
2299
2300
2301
2302
2303
2304
2305
2306 MinorVersion string `json:"minorVersion,omitempty"`
2307
2308 Name string `json:"name,omitempty"`
2309
2310
2311
2312
2313
2314 ForceSendFields []string `json:"-"`
2315
2316
2317
2318
2319 NullFields []string `json:"-"`
2320 }
2321
2322 func (s *Browser) MarshalJSON() ([]byte, error) {
2323 type NoMethod Browser
2324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2325 }
2326
2327
2328 type BrowsersListResponse struct {
2329
2330 Browsers []*Browser `json:"browsers,omitempty"`
2331
2332
2333 Kind string `json:"kind,omitempty"`
2334
2335
2336 googleapi.ServerResponse `json:"-"`
2337
2338
2339
2340
2341
2342 ForceSendFields []string `json:"-"`
2343
2344
2345
2346
2347 NullFields []string `json:"-"`
2348 }
2349
2350 func (s *BrowsersListResponse) MarshalJSON() ([]byte, error) {
2351 type NoMethod BrowsersListResponse
2352 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2353 }
2354
2355
2356 type Campaign struct {
2357
2358
2359 AccountId int64 `json:"accountId,omitempty,string"`
2360
2361 AdBlockingConfiguration *AdBlockingConfiguration `json:"adBlockingConfiguration,omitempty"`
2362
2363
2364 AdditionalCreativeOptimizationConfigurations []*CreativeOptimizationConfiguration `json:"additionalCreativeOptimizationConfigurations,omitempty"`
2365
2366 AdvertiserGroupId int64 `json:"advertiserGroupId,omitempty,string"`
2367
2368 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
2369
2370
2371 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
2372
2373 Archived bool `json:"archived,omitempty"`
2374
2375
2376 AudienceSegmentGroups []*AudienceSegmentGroup `json:"audienceSegmentGroups,omitempty"`
2377
2378
2379 BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2380
2381
2382 ClickThroughUrlSuffixProperties *ClickThroughUrlSuffixProperties `json:"clickThroughUrlSuffixProperties,omitempty"`
2383
2384
2385 Comment string `json:"comment,omitempty"`
2386
2387
2388 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
2389
2390
2391 CreativeGroupIds googleapi.Int64s `json:"creativeGroupIds,omitempty"`
2392
2393
2394 CreativeOptimizationConfiguration *CreativeOptimizationConfiguration `json:"creativeOptimizationConfiguration,omitempty"`
2395
2396
2397 DefaultClickThroughEventTagProperties *DefaultClickThroughEventTagProperties `json:"defaultClickThroughEventTagProperties,omitempty"`
2398
2399 DefaultLandingPageId int64 `json:"defaultLandingPageId,omitempty,string"`
2400 EndDate string `json:"endDate,omitempty"`
2401
2402
2403 EventTagOverrides []*EventTagOverride `json:"eventTagOverrides,omitempty"`
2404
2405 ExternalId string `json:"externalId,omitempty"`
2406
2407 Id int64 `json:"id,omitempty,string"`
2408
2409
2410 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
2411
2412
2413 Kind string `json:"kind,omitempty"`
2414
2415
2416 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
2417
2418 MeasurementPartnerLink *MeasurementPartnerCampaignLink `json:"measurementPartnerLink,omitempty"`
2419
2420
2421 Name string `json:"name,omitempty"`
2422 StartDate string `json:"startDate,omitempty"`
2423
2424
2425 SubaccountId int64 `json:"subaccountId,omitempty,string"`
2426
2427
2428 googleapi.ServerResponse `json:"-"`
2429
2430
2431
2432
2433
2434 ForceSendFields []string `json:"-"`
2435
2436
2437
2438
2439 NullFields []string `json:"-"`
2440 }
2441
2442 func (s *Campaign) MarshalJSON() ([]byte, error) {
2443 type NoMethod Campaign
2444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2445 }
2446
2447
2448
2449 type CampaignCreativeAssociation struct {
2450
2451
2452 CreativeId int64 `json:"creativeId,omitempty,string"`
2453
2454
2455 Kind string `json:"kind,omitempty"`
2456
2457
2458 googleapi.ServerResponse `json:"-"`
2459
2460
2461
2462
2463
2464 ForceSendFields []string `json:"-"`
2465
2466
2467
2468
2469 NullFields []string `json:"-"`
2470 }
2471
2472 func (s *CampaignCreativeAssociation) MarshalJSON() ([]byte, error) {
2473 type NoMethod CampaignCreativeAssociation
2474 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2475 }
2476
2477
2478
2479 type CampaignCreativeAssociationsListResponse struct {
2480
2481 CampaignCreativeAssociations []*CampaignCreativeAssociation `json:"campaignCreativeAssociations,omitempty"`
2482
2483
2484 Kind string `json:"kind,omitempty"`
2485
2486 NextPageToken string `json:"nextPageToken,omitempty"`
2487
2488
2489 googleapi.ServerResponse `json:"-"`
2490
2491
2492
2493
2494
2495 ForceSendFields []string `json:"-"`
2496
2497
2498
2499
2500 NullFields []string `json:"-"`
2501 }
2502
2503 func (s *CampaignCreativeAssociationsListResponse) MarshalJSON() ([]byte, error) {
2504 type NoMethod CampaignCreativeAssociationsListResponse
2505 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2506 }
2507
2508
2509
2510 type CampaignSummary struct {
2511
2512 BillingInvoiceCode string `json:"billingInvoiceCode,omitempty"`
2513
2514 CampaignId int64 `json:"campaignId,omitempty,string"`
2515
2516
2517 PreTaxAmountMicros int64 `json:"preTaxAmountMicros,omitempty,string"`
2518
2519
2520 TaxAmountMicros int64 `json:"taxAmountMicros,omitempty,string"`
2521
2522
2523 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
2524
2525
2526
2527
2528
2529 ForceSendFields []string `json:"-"`
2530
2531
2532
2533
2534 NullFields []string `json:"-"`
2535 }
2536
2537 func (s *CampaignSummary) MarshalJSON() ([]byte, error) {
2538 type NoMethod CampaignSummary
2539 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2540 }
2541
2542
2543 type CampaignsListResponse struct {
2544
2545 Campaigns []*Campaign `json:"campaigns,omitempty"`
2546
2547
2548 Kind string `json:"kind,omitempty"`
2549
2550 NextPageToken string `json:"nextPageToken,omitempty"`
2551
2552
2553 googleapi.ServerResponse `json:"-"`
2554
2555
2556
2557
2558
2559 ForceSendFields []string `json:"-"`
2560
2561
2562
2563
2564 NullFields []string `json:"-"`
2565 }
2566
2567 func (s *CampaignsListResponse) MarshalJSON() ([]byte, error) {
2568 type NoMethod CampaignsListResponse
2569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2570 }
2571
2572
2573 type ChangeLog struct {
2574
2575 AccountId int64 `json:"accountId,omitempty,string"`
2576
2577 Action string `json:"action,omitempty"`
2578 ChangeTime string `json:"changeTime,omitempty"`
2579
2580 FieldName string `json:"fieldName,omitempty"`
2581
2582 Id int64 `json:"id,omitempty,string"`
2583
2584
2585 Kind string `json:"kind,omitempty"`
2586
2587 NewValue string `json:"newValue,omitempty"`
2588
2589
2590 ObjectId int64 `json:"objectId,omitempty,string"`
2591
2592 ObjectType string `json:"objectType,omitempty"`
2593
2594 OldValue string `json:"oldValue,omitempty"`
2595
2596 SubaccountId int64 `json:"subaccountId,omitempty,string"`
2597
2598
2599
2600 TransactionId int64 `json:"transactionId,omitempty,string"`
2601
2602 UserProfileId int64 `json:"userProfileId,omitempty,string"`
2603
2604 UserProfileName string `json:"userProfileName,omitempty"`
2605
2606
2607 googleapi.ServerResponse `json:"-"`
2608
2609
2610
2611
2612
2613 ForceSendFields []string `json:"-"`
2614
2615
2616
2617
2618 NullFields []string `json:"-"`
2619 }
2620
2621 func (s *ChangeLog) MarshalJSON() ([]byte, error) {
2622 type NoMethod ChangeLog
2623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2624 }
2625
2626
2627 type ChangeLogsListResponse struct {
2628
2629 ChangeLogs []*ChangeLog `json:"changeLogs,omitempty"`
2630
2631
2632 Kind string `json:"kind,omitempty"`
2633
2634 NextPageToken string `json:"nextPageToken,omitempty"`
2635
2636
2637 googleapi.ServerResponse `json:"-"`
2638
2639
2640
2641
2642
2643 ForceSendFields []string `json:"-"`
2644
2645
2646
2647
2648 NullFields []string `json:"-"`
2649 }
2650
2651 func (s *ChangeLogsListResponse) MarshalJSON() ([]byte, error) {
2652 type NoMethod ChangeLogsListResponse
2653 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2654 }
2655
2656
2657 type ChannelGrouping struct {
2658
2659 FallbackName string `json:"fallbackName,omitempty"`
2660
2661
2662 Kind string `json:"kind,omitempty"`
2663
2664 Name string `json:"name,omitempty"`
2665
2666 Rules []*ChannelGroupingRule `json:"rules,omitempty"`
2667
2668
2669
2670
2671
2672 ForceSendFields []string `json:"-"`
2673
2674
2675
2676
2677 NullFields []string `json:"-"`
2678 }
2679
2680 func (s *ChannelGrouping) MarshalJSON() ([]byte, error) {
2681 type NoMethod ChannelGrouping
2682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2683 }
2684
2685
2686 type ChannelGroupingRule struct {
2687
2688
2689 DisjunctiveMatchStatements []*DisjunctiveMatchStatement `json:"disjunctiveMatchStatements,omitempty"`
2690
2691
2692 Kind string `json:"kind,omitempty"`
2693
2694 Name string `json:"name,omitempty"`
2695
2696
2697
2698
2699
2700 ForceSendFields []string `json:"-"`
2701
2702
2703
2704
2705 NullFields []string `json:"-"`
2706 }
2707
2708 func (s *ChannelGroupingRule) MarshalJSON() ([]byte, error) {
2709 type NoMethod ChannelGroupingRule
2710 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2711 }
2712
2713
2714 type CitiesListResponse struct {
2715
2716 Cities []*City `json:"cities,omitempty"`
2717
2718
2719 Kind string `json:"kind,omitempty"`
2720
2721
2722 googleapi.ServerResponse `json:"-"`
2723
2724
2725
2726
2727
2728 ForceSendFields []string `json:"-"`
2729
2730
2731
2732
2733 NullFields []string `json:"-"`
2734 }
2735
2736 func (s *CitiesListResponse) MarshalJSON() ([]byte, error) {
2737 type NoMethod CitiesListResponse
2738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2739 }
2740
2741
2742 type City struct {
2743
2744 CountryCode string `json:"countryCode,omitempty"`
2745
2746 CountryDartId int64 `json:"countryDartId,omitempty,string"`
2747
2748
2749 DartId int64 `json:"dartId,omitempty,string"`
2750
2751
2752 Kind string `json:"kind,omitempty"`
2753
2754
2755 MetroCode string `json:"metroCode,omitempty"`
2756
2757 MetroDmaId int64 `json:"metroDmaId,omitempty,string"`
2758
2759 Name string `json:"name,omitempty"`
2760
2761 RegionCode string `json:"regionCode,omitempty"`
2762
2763 RegionDartId int64 `json:"regionDartId,omitempty,string"`
2764
2765
2766
2767
2768
2769 ForceSendFields []string `json:"-"`
2770
2771
2772
2773
2774 NullFields []string `json:"-"`
2775 }
2776
2777 func (s *City) MarshalJSON() ([]byte, error) {
2778 type NoMethod City
2779 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2780 }
2781
2782
2783 type ClickTag struct {
2784
2785
2786 ClickThroughUrl *CreativeClickThroughUrl `json:"clickThroughUrl,omitempty"`
2787
2788
2789
2790 EventName string `json:"eventName,omitempty"`
2791
2792
2793
2794 Name string `json:"name,omitempty"`
2795
2796
2797
2798
2799
2800 ForceSendFields []string `json:"-"`
2801
2802
2803
2804
2805 NullFields []string `json:"-"`
2806 }
2807
2808 func (s *ClickTag) MarshalJSON() ([]byte, error) {
2809 type NoMethod ClickTag
2810 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2811 }
2812
2813
2814 type ClickThroughUrl struct {
2815
2816
2817
2818
2819
2820
2821
2822 ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
2823
2824
2825
2826 CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
2827
2828 DefaultLandingPage bool `json:"defaultLandingPage,omitempty"`
2829
2830
2831 LandingPageId int64 `json:"landingPageId,omitempty,string"`
2832
2833
2834
2835
2836
2837 ForceSendFields []string `json:"-"`
2838
2839
2840
2841
2842 NullFields []string `json:"-"`
2843 }
2844
2845 func (s *ClickThroughUrl) MarshalJSON() ([]byte, error) {
2846 type NoMethod ClickThroughUrl
2847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2848 }
2849
2850
2851 type ClickThroughUrlSuffixProperties struct {
2852
2853
2854 ClickThroughUrlSuffix string `json:"clickThroughUrlSuffix,omitempty"`
2855
2856
2857 OverrideInheritedSuffix bool `json:"overrideInheritedSuffix,omitempty"`
2858
2859
2860
2861
2862
2863 ForceSendFields []string `json:"-"`
2864
2865
2866
2867
2868 NullFields []string `json:"-"`
2869 }
2870
2871 func (s *ClickThroughUrlSuffixProperties) MarshalJSON() ([]byte, error) {
2872 type NoMethod ClickThroughUrlSuffixProperties
2873 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2874 }
2875
2876
2877 type CompanionClickThroughOverride struct {
2878
2879 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
2880
2881 CreativeId int64 `json:"creativeId,omitempty,string"`
2882
2883
2884
2885
2886
2887 ForceSendFields []string `json:"-"`
2888
2889
2890
2891
2892 NullFields []string `json:"-"`
2893 }
2894
2895 func (s *CompanionClickThroughOverride) MarshalJSON() ([]byte, error) {
2896 type NoMethod CompanionClickThroughOverride
2897 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2898 }
2899
2900
2901 type CompanionSetting struct {
2902
2903 CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
2904
2905
2906 EnabledSizes []*Size `json:"enabledSizes,omitempty"`
2907
2908 ImageOnly bool `json:"imageOnly,omitempty"`
2909
2910
2911 Kind string `json:"kind,omitempty"`
2912
2913
2914
2915
2916
2917 ForceSendFields []string `json:"-"`
2918
2919
2920
2921
2922 NullFields []string `json:"-"`
2923 }
2924
2925 func (s *CompanionSetting) MarshalJSON() ([]byte, error) {
2926 type NoMethod CompanionSetting
2927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2928 }
2929
2930
2931 type CompatibleFields struct {
2932
2933
2934 CrossDimensionReachReportCompatibleFields *CrossDimensionReachReportCompatibleFields `json:"crossDimensionReachReportCompatibleFields,omitempty"`
2935
2936
2937 FloodlightReportCompatibleFields *FloodlightReportCompatibleFields `json:"floodlightReportCompatibleFields,omitempty"`
2938
2939
2940 Kind string `json:"kind,omitempty"`
2941
2942
2943 PathAttributionReportCompatibleFields *PathReportCompatibleFields `json:"pathAttributionReportCompatibleFields,omitempty"`
2944
2945
2946 PathReportCompatibleFields *PathReportCompatibleFields `json:"pathReportCompatibleFields,omitempty"`
2947
2948
2949 PathToConversionReportCompatibleFields *PathToConversionReportCompatibleFields `json:"pathToConversionReportCompatibleFields,omitempty"`
2950
2951
2952 ReachReportCompatibleFields *ReachReportCompatibleFields `json:"reachReportCompatibleFields,omitempty"`
2953
2954
2955 ReportCompatibleFields *ReportCompatibleFields `json:"reportCompatibleFields,omitempty"`
2956
2957
2958 googleapi.ServerResponse `json:"-"`
2959
2960
2961
2962
2963
2964
2965 ForceSendFields []string `json:"-"`
2966
2967
2968
2969
2970
2971 NullFields []string `json:"-"`
2972 }
2973
2974 func (s *CompatibleFields) MarshalJSON() ([]byte, error) {
2975 type NoMethod CompatibleFields
2976 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2977 }
2978
2979
2980
2981
2982 type ConnectionType struct {
2983
2984 Id int64 `json:"id,omitempty,string"`
2985
2986
2987 Kind string `json:"kind,omitempty"`
2988
2989 Name string `json:"name,omitempty"`
2990
2991
2992 googleapi.ServerResponse `json:"-"`
2993
2994
2995
2996
2997
2998 ForceSendFields []string `json:"-"`
2999
3000
3001
3002
3003 NullFields []string `json:"-"`
3004 }
3005
3006 func (s *ConnectionType) MarshalJSON() ([]byte, error) {
3007 type NoMethod ConnectionType
3008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3009 }
3010
3011
3012 type ConnectionTypesListResponse struct {
3013
3014
3015 ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
3016
3017
3018 Kind string `json:"kind,omitempty"`
3019
3020
3021 googleapi.ServerResponse `json:"-"`
3022
3023
3024
3025
3026
3027 ForceSendFields []string `json:"-"`
3028
3029
3030
3031
3032 NullFields []string `json:"-"`
3033 }
3034
3035 func (s *ConnectionTypesListResponse) MarshalJSON() ([]byte, error) {
3036 type NoMethod ConnectionTypesListResponse
3037 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3038 }
3039
3040
3041 type ContentCategoriesListResponse struct {
3042
3043 ContentCategories []*ContentCategory `json:"contentCategories,omitempty"`
3044
3045
3046 Kind string `json:"kind,omitempty"`
3047
3048 NextPageToken string `json:"nextPageToken,omitempty"`
3049
3050
3051 googleapi.ServerResponse `json:"-"`
3052
3053
3054
3055
3056
3057 ForceSendFields []string `json:"-"`
3058
3059
3060
3061
3062 NullFields []string `json:"-"`
3063 }
3064
3065 func (s *ContentCategoriesListResponse) MarshalJSON() ([]byte, error) {
3066 type NoMethod ContentCategoriesListResponse
3067 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3068 }
3069
3070 type ContentCategory struct {
3071
3072
3073 AccountId int64 `json:"accountId,omitempty,string"`
3074
3075 Id int64 `json:"id,omitempty,string"`
3076
3077
3078 Kind string `json:"kind,omitempty"`
3079
3080
3081
3082 Name string `json:"name,omitempty"`
3083
3084
3085 googleapi.ServerResponse `json:"-"`
3086
3087
3088
3089
3090
3091 ForceSendFields []string `json:"-"`
3092
3093
3094
3095
3096 NullFields []string `json:"-"`
3097 }
3098
3099 func (s *ContentCategory) MarshalJSON() ([]byte, error) {
3100 type NoMethod ContentCategory
3101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3102 }
3103
3104
3105
3106 type Conversion struct {
3107
3108
3109
3110
3111
3112 AdUserDataConsent string `json:"adUserDataConsent,omitempty"`
3113
3114
3115 ChildDirectedTreatment bool `json:"childDirectedTreatment,omitempty"`
3116
3117
3118 CustomVariables []*CustomFloodlightVariable `json:"customVariables,omitempty"`
3119
3120
3121
3122
3123
3124 Dclid string `json:"dclid,omitempty"`
3125
3126
3127
3128
3129
3130 EncryptedUserId string `json:"encryptedUserId,omitempty"`
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140 EncryptedUserIdCandidates []string `json:"encryptedUserIdCandidates,omitempty"`
3141
3142
3143 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
3144
3145
3146 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
3147
3148
3149
3150
3151
3152 Gclid string `json:"gclid,omitempty"`
3153
3154
3155
3156 ImpressionId string `json:"impressionId,omitempty"`
3157
3158
3159 Kind string `json:"kind,omitempty"`
3160
3161
3162
3163 LimitAdTracking bool `json:"limitAdTracking,omitempty"`
3164
3165
3166
3167
3168
3169
3170 MatchId string `json:"matchId,omitempty"`
3171
3172
3173
3174
3175 MobileDeviceId string `json:"mobileDeviceId,omitempty"`
3176
3177 NonPersonalizedAd bool `json:"nonPersonalizedAd,omitempty"`
3178
3179
3180
3181 Ordinal string `json:"ordinal,omitempty"`
3182
3183 Quantity int64 `json:"quantity,omitempty,string"`
3184
3185
3186 TimestampMicros int64 `json:"timestampMicros,omitempty,string"`
3187
3188
3189
3190 TreatmentForUnderage bool `json:"treatmentForUnderage,omitempty"`
3191
3192
3193 UserIdentifiers []*UserIdentifier `json:"userIdentifiers,omitempty"`
3194
3195 Value float64 `json:"value,omitempty"`
3196
3197
3198
3199
3200
3201 ForceSendFields []string `json:"-"`
3202
3203
3204
3205
3206 NullFields []string `json:"-"`
3207 }
3208
3209 func (s *Conversion) MarshalJSON() ([]byte, error) {
3210 type NoMethod Conversion
3211 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3212 }
3213
3214 func (s *Conversion) UnmarshalJSON(data []byte) error {
3215 type NoMethod Conversion
3216 var s1 struct {
3217 Value gensupport.JSONFloat64 `json:"value"`
3218 *NoMethod
3219 }
3220 s1.NoMethod = (*NoMethod)(s)
3221 if err := json.Unmarshal(data, &s1); err != nil {
3222 return err
3223 }
3224 s.Value = float64(s1.Value)
3225 return nil
3226 }
3227
3228
3229
3230 type ConversionError struct {
3231
3232
3233
3234
3235
3236
3237
3238 Code string `json:"code,omitempty"`
3239
3240
3241 Kind string `json:"kind,omitempty"`
3242
3243 Message string `json:"message,omitempty"`
3244
3245
3246
3247
3248
3249 ForceSendFields []string `json:"-"`
3250
3251
3252
3253
3254 NullFields []string `json:"-"`
3255 }
3256
3257 func (s *ConversionError) MarshalJSON() ([]byte, error) {
3258 type NoMethod ConversionError
3259 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3260 }
3261
3262
3263
3264 type ConversionStatus struct {
3265
3266 Conversion *Conversion `json:"conversion,omitempty"`
3267
3268 Errors []*ConversionError `json:"errors,omitempty"`
3269
3270
3271 Kind string `json:"kind,omitempty"`
3272
3273
3274
3275
3276
3277 ForceSendFields []string `json:"-"`
3278
3279
3280
3281
3282 NullFields []string `json:"-"`
3283 }
3284
3285 func (s *ConversionStatus) MarshalJSON() ([]byte, error) {
3286 type NoMethod ConversionStatus
3287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3288 }
3289
3290
3291 type ConversionsBatchInsertRequest struct {
3292
3293 Conversions []*Conversion `json:"conversions,omitempty"`
3294
3295
3296
3297 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3298
3299
3300 Kind string `json:"kind,omitempty"`
3301
3302
3303
3304
3305
3306 ForceSendFields []string `json:"-"`
3307
3308
3309
3310
3311 NullFields []string `json:"-"`
3312 }
3313
3314 func (s *ConversionsBatchInsertRequest) MarshalJSON() ([]byte, error) {
3315 type NoMethod ConversionsBatchInsertRequest
3316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3317 }
3318
3319
3320 type ConversionsBatchInsertResponse struct {
3321
3322 HasFailures bool `json:"hasFailures,omitempty"`
3323
3324
3325 Kind string `json:"kind,omitempty"`
3326
3327
3328 Status []*ConversionStatus `json:"status,omitempty"`
3329
3330
3331 googleapi.ServerResponse `json:"-"`
3332
3333
3334
3335
3336
3337 ForceSendFields []string `json:"-"`
3338
3339
3340
3341
3342 NullFields []string `json:"-"`
3343 }
3344
3345 func (s *ConversionsBatchInsertResponse) MarshalJSON() ([]byte, error) {
3346 type NoMethod ConversionsBatchInsertResponse
3347 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3348 }
3349
3350
3351 type ConversionsBatchUpdateRequest struct {
3352
3353 Conversions []*Conversion `json:"conversions,omitempty"`
3354
3355
3356 EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"`
3357
3358
3359 Kind string `json:"kind,omitempty"`
3360
3361
3362
3363
3364
3365 ForceSendFields []string `json:"-"`
3366
3367
3368
3369
3370 NullFields []string `json:"-"`
3371 }
3372
3373 func (s *ConversionsBatchUpdateRequest) MarshalJSON() ([]byte, error) {
3374 type NoMethod ConversionsBatchUpdateRequest
3375 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3376 }
3377
3378
3379 type ConversionsBatchUpdateResponse struct {
3380
3381 HasFailures bool `json:"hasFailures,omitempty"`
3382
3383
3384 Kind string `json:"kind,omitempty"`
3385
3386
3387 Status []*ConversionStatus `json:"status,omitempty"`
3388
3389
3390 googleapi.ServerResponse `json:"-"`
3391
3392
3393
3394
3395
3396 ForceSendFields []string `json:"-"`
3397
3398
3399
3400
3401 NullFields []string `json:"-"`
3402 }
3403
3404 func (s *ConversionsBatchUpdateResponse) MarshalJSON() ([]byte, error) {
3405 type NoMethod ConversionsBatchUpdateResponse
3406 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3407 }
3408
3409
3410 type CountriesListResponse struct {
3411
3412 Countries []*Country `json:"countries,omitempty"`
3413
3414
3415 Kind string `json:"kind,omitempty"`
3416
3417
3418 googleapi.ServerResponse `json:"-"`
3419
3420
3421
3422
3423
3424 ForceSendFields []string `json:"-"`
3425
3426
3427
3428
3429 NullFields []string `json:"-"`
3430 }
3431
3432 func (s *CountriesListResponse) MarshalJSON() ([]byte, error) {
3433 type NoMethod CountriesListResponse
3434 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3435 }
3436
3437
3438 type Country struct {
3439
3440 CountryCode string `json:"countryCode,omitempty"`
3441
3442
3443 DartId int64 `json:"dartId,omitempty,string"`
3444
3445
3446 Kind string `json:"kind,omitempty"`
3447
3448 Name string `json:"name,omitempty"`
3449
3450 SslEnabled bool `json:"sslEnabled,omitempty"`
3451
3452
3453 googleapi.ServerResponse `json:"-"`
3454
3455
3456
3457
3458
3459 ForceSendFields []string `json:"-"`
3460
3461
3462
3463
3464 NullFields []string `json:"-"`
3465 }
3466
3467 func (s *Country) MarshalJSON() ([]byte, error) {
3468 type NoMethod Country
3469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3470 }
3471
3472
3473 type Creative struct {
3474
3475
3476
3477 AccountId int64 `json:"accountId,omitempty,string"`
3478
3479 Active bool `json:"active,omitempty"`
3480
3481
3482 AdParameters string `json:"adParameters,omitempty"`
3483
3484
3485
3486
3487
3488 AdTagKeys []string `json:"adTagKeys,omitempty"`
3489
3490
3491
3492
3493 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3494
3495
3496 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
3497
3498
3499
3500 AllowScriptAccess bool `json:"allowScriptAccess,omitempty"`
3501
3502
3503 Archived bool `json:"archived,omitempty"`
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514 ArtworkType string `json:"artworkType,omitempty"`
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528 AuthoringSource string `json:"authoringSource,omitempty"`
3529
3530
3531
3532
3533
3534
3535 AuthoringTool string `json:"authoringTool,omitempty"`
3536
3537
3538
3539 AutoAdvanceImages bool `json:"autoAdvanceImages,omitempty"`
3540
3541
3542
3543 BackgroundColor string `json:"backgroundColor,omitempty"`
3544
3545
3546 BackupImageClickThroughUrl *CreativeClickThroughUrl `json:"backupImageClickThroughUrl,omitempty"`
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624 BackupImageFeatures []string `json:"backupImageFeatures,omitempty"`
3625
3626
3627
3628 BackupImageReportingLabel string `json:"backupImageReportingLabel,omitempty"`
3629
3630
3631
3632 BackupImageTargetWindow *TargetWindow `json:"backupImageTargetWindow,omitempty"`
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645 ClickTags []*ClickTag `json:"clickTags,omitempty"`
3646
3647
3648 CommercialId string `json:"commercialId,omitempty"`
3649
3650
3651
3652
3653
3654 CompanionCreatives googleapi.Int64s `json:"companionCreatives,omitempty"`
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674 Compatibility []string `json:"compatibility,omitempty"`
3675
3676
3677
3678
3679
3680
3681 ConvertFlashToHtml5 bool `json:"convertFlashToHtml5,omitempty"`
3682
3683
3684
3685
3686 CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
3687
3688 CreativeAssetSelection *CreativeAssetSelection `json:"creativeAssetSelection,omitempty"`
3689
3690
3691
3692 CreativeAssets []*CreativeAsset `json:"creativeAssets,omitempty"`
3693
3694
3695 CreativeFieldAssignments []*CreativeFieldAssignment `json:"creativeFieldAssignments,omitempty"`
3696
3697
3698
3699
3700
3701 CustomKeyValues []string `json:"customKeyValues,omitempty"`
3702
3703
3704
3705
3706
3707 DynamicAssetSelection bool `json:"dynamicAssetSelection,omitempty"`
3708
3709
3710
3711
3712
3713
3714 ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
3715
3716
3717
3718
3719 FsCommand *FsCommand `json:"fsCommand,omitempty"`
3720
3721
3722
3723
3724 HtmlCode string `json:"htmlCode,omitempty"`
3725
3726
3727
3728 HtmlCodeLocked bool `json:"htmlCodeLocked,omitempty"`
3729
3730
3731 Id int64 `json:"id,omitempty,string"`
3732
3733
3734 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
3735
3736
3737 Kind string `json:"kind,omitempty"`
3738
3739
3740 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
3741
3742
3743
3744 LatestTraffickedCreativeId int64 `json:"latestTraffickedCreativeId,omitempty,string"`
3745
3746
3747 MediaDescription string `json:"mediaDescription,omitempty"`
3748
3749
3750
3751 MediaDuration float64 `json:"mediaDuration,omitempty"`
3752
3753
3754 Name string `json:"name,omitempty"`
3755
3756
3757 ObaIcon *ObaIcon `json:"obaIcon,omitempty"`
3758
3759
3760 OverrideCss string `json:"overrideCss,omitempty"`
3761
3762
3763 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
3764
3765
3766
3767
3768
3769
3770
3771 RedirectUrl string `json:"redirectUrl,omitempty"`
3772
3773
3774 RenderingId int64 `json:"renderingId,omitempty,string"`
3775
3776
3777 RenderingIdDimensionValue *DimensionValue `json:"renderingIdDimensionValue,omitempty"`
3778
3779
3780
3781 RequiredFlashPluginVersion string `json:"requiredFlashPluginVersion,omitempty"`
3782
3783
3784
3785
3786 RequiredFlashVersion int64 `json:"requiredFlashVersion,omitempty"`
3787
3788
3789
3790
3791
3792
3793
3794
3795 Size *Size `json:"size,omitempty"`
3796
3797
3798 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
3799
3800
3801 Skippable bool `json:"skippable,omitempty"`
3802
3803
3804 SslCompliant bool `json:"sslCompliant,omitempty"`
3805
3806
3807 SslOverride bool `json:"sslOverride,omitempty"`
3808
3809
3810
3811 StudioAdvertiserId int64 `json:"studioAdvertiserId,omitempty,string"`
3812
3813
3814
3815 StudioCreativeId int64 `json:"studioCreativeId,omitempty,string"`
3816
3817
3818
3819 StudioTraffickedCreativeId int64 `json:"studioTraffickedCreativeId,omitempty,string"`
3820
3821
3822
3823 SubaccountId int64 `json:"subaccountId,omitempty,string"`
3824
3825
3826
3827 ThirdPartyBackupImageImpressionsUrl string `json:"thirdPartyBackupImageImpressionsUrl,omitempty"`
3828
3829
3830 ThirdPartyRichMediaImpressionsUrl string `json:"thirdPartyRichMediaImpressionsUrl,omitempty"`
3831
3832
3833
3834 ThirdPartyUrls []*ThirdPartyTrackingUrl `json:"thirdPartyUrls,omitempty"`
3835
3836
3837
3838
3839
3840 TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
3841
3842
3843
3844 TotalFileSize int64 `json:"totalFileSize,omitempty,string"`
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876 Type string `json:"type,omitempty"`
3877
3878
3879 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"`
3880
3881
3882
3883
3884
3885
3886
3887
3888 Version int64 `json:"version,omitempty"`
3889
3890
3891 googleapi.ServerResponse `json:"-"`
3892
3893
3894
3895
3896
3897 ForceSendFields []string `json:"-"`
3898
3899
3900
3901
3902 NullFields []string `json:"-"`
3903 }
3904
3905 func (s *Creative) MarshalJSON() ([]byte, error) {
3906 type NoMethod Creative
3907 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3908 }
3909
3910 func (s *Creative) UnmarshalJSON(data []byte) error {
3911 type NoMethod Creative
3912 var s1 struct {
3913 MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
3914 *NoMethod
3915 }
3916 s1.NoMethod = (*NoMethod)(s)
3917 if err := json.Unmarshal(data, &s1); err != nil {
3918 return err
3919 }
3920 s.MediaDuration = float64(s1.MediaDuration)
3921 return nil
3922 }
3923
3924
3925 type CreativeAsset struct {
3926
3927
3928
3929 ActionScript3 bool `json:"actionScript3,omitempty"`
3930
3931
3932
3933 Active bool `json:"active,omitempty"`
3934
3935
3936
3937 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947 Alignment string `json:"alignment,omitempty"`
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957 ArtworkType string `json:"artworkType,omitempty"`
3958
3959
3960
3961
3962 AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
3963
3964
3965
3966 AudioBitRate int64 `json:"audioBitRate,omitempty"`
3967
3968
3969
3970 AudioSampleRate int64 `json:"audioSampleRate,omitempty"`
3971
3972
3973 BackupImageExit *CreativeCustomEvent `json:"backupImageExit,omitempty"`
3974
3975
3976
3977 BitRate int64 `json:"bitRate,omitempty"`
3978
3979
3980
3981
3982
3983
3984
3985
3986 ChildAssetType string `json:"childAssetType,omitempty"`
3987
3988
3989
3990
3991 CollapsedSize *Size `json:"collapsedSize,omitempty"`
3992
3993
3994
3995
3996 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"`
3997
3998
3999
4000 CustomStartTimeValue int64 `json:"customStartTimeValue,omitempty"`
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075 DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092 DisplayType string `json:"displayType,omitempty"`
4093
4094
4095
4096 Duration int64 `json:"duration,omitempty"`
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106 DurationType string `json:"durationType,omitempty"`
4107
4108
4109
4110 ExpandedDimension *Size `json:"expandedDimension,omitempty"`
4111
4112
4113
4114 FileSize int64 `json:"fileSize,omitempty,string"`
4115
4116
4117
4118
4119 FlashVersion int64 `json:"flashVersion,omitempty"`
4120
4121
4122
4123 FrameRate float64 `json:"frameRate,omitempty"`
4124
4125
4126 HideFlashObjects bool `json:"hideFlashObjects,omitempty"`
4127
4128
4129 HideSelectionBoxes bool `json:"hideSelectionBoxes,omitempty"`
4130
4131
4132 HorizontallyLocked bool `json:"horizontallyLocked,omitempty"`
4133
4134
4135
4136 Id int64 `json:"id,omitempty,string"`
4137
4138
4139 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4140
4141
4142
4143 MediaDuration float64 `json:"mediaDuration,omitempty"`
4144
4145
4146
4147 MimeType string `json:"mimeType,omitempty"`
4148
4149
4150
4151
4152 Offset *OffsetPosition `json:"offset,omitempty"`
4153
4154
4155
4156
4157
4158
4159
4160 Orientation string `json:"orientation,omitempty"`
4161
4162
4163
4164 OriginalBackup bool `json:"originalBackup,omitempty"`
4165
4166 PoliteLoad bool `json:"politeLoad,omitempty"`
4167
4168
4169 Position *OffsetPosition `json:"position,omitempty"`
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179 PositionLeftUnit string `json:"positionLeftUnit,omitempty"`
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190 PositionTopUnit string `json:"positionTopUnit,omitempty"`
4191
4192
4193
4194 ProgressiveServingUrl string `json:"progressiveServingUrl,omitempty"`
4195
4196
4197
4198
4199 Pushdown bool `json:"pushdown,omitempty"`
4200
4201
4202
4203
4204
4205 PushdownDuration float64 `json:"pushdownDuration,omitempty"`
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242 Role string `json:"role,omitempty"`
4243
4244
4245
4246
4247
4248
4249
4250 Size *Size `json:"size,omitempty"`
4251
4252
4253
4254 SslCompliant bool `json:"sslCompliant,omitempty"`
4255
4256
4257
4258
4259
4260
4261
4262 StartTimeType string `json:"startTimeType,omitempty"`
4263
4264
4265
4266 StreamingServingUrl string `json:"streamingServingUrl,omitempty"`
4267
4268
4269
4270 Transparency bool `json:"transparency,omitempty"`
4271
4272
4273 VerticallyLocked bool `json:"verticallyLocked,omitempty"`
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284 WindowMode string `json:"windowMode,omitempty"`
4285
4286
4287
4288
4289
4290 ZIndex int64 `json:"zIndex,omitempty"`
4291
4292
4293 ZipFilename string `json:"zipFilename,omitempty"`
4294
4295
4296 ZipFilesize string `json:"zipFilesize,omitempty"`
4297
4298
4299
4300
4301
4302 ForceSendFields []string `json:"-"`
4303
4304
4305
4306
4307 NullFields []string `json:"-"`
4308 }
4309
4310 func (s *CreativeAsset) MarshalJSON() ([]byte, error) {
4311 type NoMethod CreativeAsset
4312 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4313 }
4314
4315 func (s *CreativeAsset) UnmarshalJSON(data []byte) error {
4316 type NoMethod CreativeAsset
4317 var s1 struct {
4318 FrameRate gensupport.JSONFloat64 `json:"frameRate"`
4319 MediaDuration gensupport.JSONFloat64 `json:"mediaDuration"`
4320 PushdownDuration gensupport.JSONFloat64 `json:"pushdownDuration"`
4321 *NoMethod
4322 }
4323 s1.NoMethod = (*NoMethod)(s)
4324 if err := json.Unmarshal(data, &s1); err != nil {
4325 return err
4326 }
4327 s.FrameRate = float64(s1.FrameRate)
4328 s.MediaDuration = float64(s1.MediaDuration)
4329 s.PushdownDuration = float64(s1.PushdownDuration)
4330 return nil
4331 }
4332
4333
4334 type CreativeAssetId struct {
4335
4336
4337
4338
4339 Name string `json:"name,omitempty"`
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350 Type string `json:"type,omitempty"`
4351
4352
4353
4354
4355
4356 ForceSendFields []string `json:"-"`
4357
4358
4359
4360
4361 NullFields []string `json:"-"`
4362 }
4363
4364 func (s *CreativeAssetId) MarshalJSON() ([]byte, error) {
4365 type NoMethod CreativeAssetId
4366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4367 }
4368
4369
4370
4371
4372 type CreativeAssetMetadata struct {
4373
4374 AssetIdentifier *CreativeAssetId `json:"assetIdentifier,omitempty"`
4375
4376
4377 ClickTags []*ClickTag `json:"clickTags,omitempty"`
4378
4379
4380
4381 CounterCustomEvents []*CreativeCustomEvent `json:"counterCustomEvents,omitempty"`
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454 DetectedFeatures []string `json:"detectedFeatures,omitempty"`
4455
4456
4457 ExitCustomEvents []*CreativeCustomEvent `json:"exitCustomEvents,omitempty"`
4458
4459 Id int64 `json:"id,omitempty,string"`
4460
4461
4462 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
4463
4464
4465 Kind string `json:"kind,omitempty"`
4466
4467
4468 RichMedia bool `json:"richMedia,omitempty"`
4469
4470
4471 TimerCustomEvents []*CreativeCustomEvent `json:"timerCustomEvents,omitempty"`
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
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 WarnedValidationRules []string `json:"warnedValidationRules,omitempty"`
4524
4525
4526 googleapi.ServerResponse `json:"-"`
4527
4528
4529
4530
4531
4532 ForceSendFields []string `json:"-"`
4533
4534
4535
4536
4537 NullFields []string `json:"-"`
4538 }
4539
4540 func (s *CreativeAssetMetadata) MarshalJSON() ([]byte, error) {
4541 type NoMethod CreativeAssetMetadata
4542 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4543 }
4544
4545
4546
4547
4548 type CreativeAssetSelection struct {
4549
4550
4551
4552 DefaultAssetId int64 `json:"defaultAssetId,omitempty,string"`
4553
4554
4555
4556 Rules []*Rule `json:"rules,omitempty"`
4557
4558
4559
4560
4561
4562 ForceSendFields []string `json:"-"`
4563
4564
4565
4566
4567 NullFields []string `json:"-"`
4568 }
4569
4570 func (s *CreativeAssetSelection) MarshalJSON() ([]byte, error) {
4571 type NoMethod CreativeAssetSelection
4572 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4573 }
4574
4575
4576 type CreativeAssignment struct {
4577
4578
4579 Active bool `json:"active,omitempty"`
4580
4581
4582
4583
4584 ApplyEventTags bool `json:"applyEventTags,omitempty"`
4585
4586 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
4587
4588
4589 CompanionCreativeOverrides []*CompanionClickThroughOverride `json:"companionCreativeOverrides,omitempty"`
4590
4591
4592
4593 CreativeGroupAssignments []*CreativeGroupAssignment `json:"creativeGroupAssignments,omitempty"`
4594
4595 CreativeId int64 `json:"creativeId,omitempty,string"`
4596
4597
4598 CreativeIdDimensionValue *DimensionValue `json:"creativeIdDimensionValue,omitempty"`
4599 EndTime string `json:"endTime,omitempty"`
4600
4601
4602
4603
4604
4605
4606 RichMediaExitOverrides []*RichMediaExitOverride `json:"richMediaExitOverrides,omitempty"`
4607
4608
4609
4610 Sequence int64 `json:"sequence,omitempty"`
4611
4612
4613 SslCompliant bool `json:"sslCompliant,omitempty"`
4614 StartTime string `json:"startTime,omitempty"`
4615
4616
4617 Weight int64 `json:"weight,omitempty"`
4618
4619
4620
4621
4622
4623 ForceSendFields []string `json:"-"`
4624
4625
4626
4627
4628 NullFields []string `json:"-"`
4629 }
4630
4631 func (s *CreativeAssignment) MarshalJSON() ([]byte, error) {
4632 type NoMethod CreativeAssignment
4633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4634 }
4635
4636
4637 type CreativeClickThroughUrl struct {
4638
4639
4640
4641
4642
4643 ComputedClickThroughUrl string `json:"computedClickThroughUrl,omitempty"`
4644
4645
4646 CustomClickThroughUrl string `json:"customClickThroughUrl,omitempty"`
4647
4648 LandingPageId int64 `json:"landingPageId,omitempty,string"`
4649
4650
4651
4652
4653
4654 ForceSendFields []string `json:"-"`
4655
4656
4657
4658
4659 NullFields []string `json:"-"`
4660 }
4661
4662 func (s *CreativeClickThroughUrl) MarshalJSON() ([]byte, error) {
4663 type NoMethod CreativeClickThroughUrl
4664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4665 }
4666
4667
4668 type CreativeCustomEvent struct {
4669
4670
4671 AdvertiserCustomEventId int64 `json:"advertiserCustomEventId,omitempty,string"`
4672
4673 AdvertiserCustomEventName string `json:"advertiserCustomEventName,omitempty"`
4674
4675
4676
4677
4678
4679
4680 AdvertiserCustomEventType string `json:"advertiserCustomEventType,omitempty"`
4681
4682
4683
4684 ArtworkLabel string `json:"artworkLabel,omitempty"`
4685
4686
4687
4688
4689
4690
4691
4692
4693 ArtworkType string `json:"artworkType,omitempty"`
4694
4695
4696 ExitClickThroughUrl *CreativeClickThroughUrl `json:"exitClickThroughUrl,omitempty"`
4697
4698
4699 Id int64 `json:"id,omitempty,string"`
4700
4701
4702 PopupWindowProperties *PopupWindowProperties `json:"popupWindowProperties,omitempty"`
4703
4704
4705
4706
4707
4708
4709
4710
4711 TargetType string `json:"targetType,omitempty"`
4712
4713
4714 VideoReportingId string `json:"videoReportingId,omitempty"`
4715
4716
4717
4718
4719
4720 ForceSendFields []string `json:"-"`
4721
4722
4723
4724
4725 NullFields []string `json:"-"`
4726 }
4727
4728 func (s *CreativeCustomEvent) MarshalJSON() ([]byte, error) {
4729 type NoMethod CreativeCustomEvent
4730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4731 }
4732
4733
4734 type CreativeField struct {
4735
4736
4737 AccountId int64 `json:"accountId,omitempty,string"`
4738
4739
4740 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4741
4742
4743 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
4744
4745 Id int64 `json:"id,omitempty,string"`
4746
4747
4748 Kind string `json:"kind,omitempty"`
4749
4750
4751
4752 Name string `json:"name,omitempty"`
4753
4754
4755 SubaccountId int64 `json:"subaccountId,omitempty,string"`
4756
4757
4758 googleapi.ServerResponse `json:"-"`
4759
4760
4761
4762
4763
4764 ForceSendFields []string `json:"-"`
4765
4766
4767
4768
4769 NullFields []string `json:"-"`
4770 }
4771
4772 func (s *CreativeField) MarshalJSON() ([]byte, error) {
4773 type NoMethod CreativeField
4774 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4775 }
4776
4777
4778 type CreativeFieldAssignment struct {
4779
4780 CreativeFieldId int64 `json:"creativeFieldId,omitempty,string"`
4781
4782 CreativeFieldValueId int64 `json:"creativeFieldValueId,omitempty,string"`
4783
4784
4785
4786
4787
4788 ForceSendFields []string `json:"-"`
4789
4790
4791
4792
4793 NullFields []string `json:"-"`
4794 }
4795
4796 func (s *CreativeFieldAssignment) MarshalJSON() ([]byte, error) {
4797 type NoMethod CreativeFieldAssignment
4798 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4799 }
4800
4801
4802 type CreativeFieldValue struct {
4803
4804
4805 Id int64 `json:"id,omitempty,string"`
4806
4807
4808 Kind string `json:"kind,omitempty"`
4809
4810
4811 Value string `json:"value,omitempty"`
4812
4813
4814 googleapi.ServerResponse `json:"-"`
4815
4816
4817
4818
4819
4820 ForceSendFields []string `json:"-"`
4821
4822
4823
4824
4825 NullFields []string `json:"-"`
4826 }
4827
4828 func (s *CreativeFieldValue) MarshalJSON() ([]byte, error) {
4829 type NoMethod CreativeFieldValue
4830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4831 }
4832
4833
4834 type CreativeFieldValuesListResponse struct {
4835
4836 CreativeFieldValues []*CreativeFieldValue `json:"creativeFieldValues,omitempty"`
4837
4838
4839 Kind string `json:"kind,omitempty"`
4840
4841 NextPageToken string `json:"nextPageToken,omitempty"`
4842
4843
4844 googleapi.ServerResponse `json:"-"`
4845
4846
4847
4848
4849
4850 ForceSendFields []string `json:"-"`
4851
4852
4853
4854
4855 NullFields []string `json:"-"`
4856 }
4857
4858 func (s *CreativeFieldValuesListResponse) MarshalJSON() ([]byte, error) {
4859 type NoMethod CreativeFieldValuesListResponse
4860 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4861 }
4862
4863
4864 type CreativeFieldsListResponse struct {
4865
4866 CreativeFields []*CreativeField `json:"creativeFields,omitempty"`
4867
4868
4869 Kind string `json:"kind,omitempty"`
4870
4871 NextPageToken string `json:"nextPageToken,omitempty"`
4872
4873
4874 googleapi.ServerResponse `json:"-"`
4875
4876
4877
4878
4879
4880 ForceSendFields []string `json:"-"`
4881
4882
4883
4884
4885 NullFields []string `json:"-"`
4886 }
4887
4888 func (s *CreativeFieldsListResponse) MarshalJSON() ([]byte, error) {
4889 type NoMethod CreativeFieldsListResponse
4890 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4891 }
4892
4893
4894 type CreativeGroup struct {
4895
4896
4897 AccountId int64 `json:"accountId,omitempty,string"`
4898
4899
4900 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
4901
4902
4903 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
4904
4905
4906
4907
4908 GroupNumber int64 `json:"groupNumber,omitempty"`
4909
4910 Id int64 `json:"id,omitempty,string"`
4911
4912
4913 Kind string `json:"kind,omitempty"`
4914
4915
4916
4917 Name string `json:"name,omitempty"`
4918
4919
4920 SubaccountId int64 `json:"subaccountId,omitempty,string"`
4921
4922
4923 googleapi.ServerResponse `json:"-"`
4924
4925
4926
4927
4928
4929 ForceSendFields []string `json:"-"`
4930
4931
4932
4933
4934 NullFields []string `json:"-"`
4935 }
4936
4937 func (s *CreativeGroup) MarshalJSON() ([]byte, error) {
4938 type NoMethod CreativeGroup
4939 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4940 }
4941
4942
4943 type CreativeGroupAssignment struct {
4944
4945 CreativeGroupId int64 `json:"creativeGroupId,omitempty,string"`
4946
4947
4948
4949
4950
4951 CreativeGroupNumber string `json:"creativeGroupNumber,omitempty"`
4952
4953
4954
4955
4956
4957 ForceSendFields []string `json:"-"`
4958
4959
4960
4961
4962 NullFields []string `json:"-"`
4963 }
4964
4965 func (s *CreativeGroupAssignment) MarshalJSON() ([]byte, error) {
4966 type NoMethod CreativeGroupAssignment
4967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4968 }
4969
4970
4971 type CreativeGroupsListResponse struct {
4972
4973 CreativeGroups []*CreativeGroup `json:"creativeGroups,omitempty"`
4974
4975
4976 Kind string `json:"kind,omitempty"`
4977
4978 NextPageToken string `json:"nextPageToken,omitempty"`
4979
4980
4981 googleapi.ServerResponse `json:"-"`
4982
4983
4984
4985
4986
4987 ForceSendFields []string `json:"-"`
4988
4989
4990
4991
4992 NullFields []string `json:"-"`
4993 }
4994
4995 func (s *CreativeGroupsListResponse) MarshalJSON() ([]byte, error) {
4996 type NoMethod CreativeGroupsListResponse
4997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
4998 }
4999
5000
5001 type CreativeOptimizationConfiguration struct {
5002
5003
5004
5005 Id int64 `json:"id,omitempty,string"`
5006
5007
5008 Name string `json:"name,omitempty"`
5009
5010
5011 OptimizationActivitys []*OptimizationActivity `json:"optimizationActivitys,omitempty"`
5012
5013
5014
5015
5016
5017
5018
5019
5020 OptimizationModel string `json:"optimizationModel,omitempty"`
5021
5022
5023
5024
5025
5026 ForceSendFields []string `json:"-"`
5027
5028
5029
5030
5031 NullFields []string `json:"-"`
5032 }
5033
5034 func (s *CreativeOptimizationConfiguration) MarshalJSON() ([]byte, error) {
5035 type NoMethod CreativeOptimizationConfiguration
5036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5037 }
5038
5039
5040 type CreativeRotation struct {
5041
5042 CreativeAssignments []*CreativeAssignment `json:"creativeAssignments,omitempty"`
5043
5044
5045
5046
5047 CreativeOptimizationConfigurationId int64 `json:"creativeOptimizationConfigurationId,omitempty,string"`
5048
5049
5050
5051
5052
5053
5054
5055
5056 Type string `json:"type,omitempty"`
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074 WeightCalculationStrategy string `json:"weightCalculationStrategy,omitempty"`
5075
5076
5077
5078
5079
5080 ForceSendFields []string `json:"-"`
5081
5082
5083
5084
5085 NullFields []string `json:"-"`
5086 }
5087
5088 func (s *CreativeRotation) MarshalJSON() ([]byte, error) {
5089 type NoMethod CreativeRotation
5090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5091 }
5092
5093
5094 type CreativesListResponse struct {
5095
5096 Creatives []*Creative `json:"creatives,omitempty"`
5097
5098
5099 Kind string `json:"kind,omitempty"`
5100
5101 NextPageToken string `json:"nextPageToken,omitempty"`
5102
5103
5104 googleapi.ServerResponse `json:"-"`
5105
5106
5107
5108
5109
5110 ForceSendFields []string `json:"-"`
5111
5112
5113
5114
5115 NullFields []string `json:"-"`
5116 }
5117
5118 func (s *CreativesListResponse) MarshalJSON() ([]byte, error) {
5119 type NoMethod CreativesListResponse
5120 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5121 }
5122
5123
5124
5125 type CrossDimensionReachReportCompatibleFields struct {
5126
5127
5128 Breakdown []*Dimension `json:"breakdown,omitempty"`
5129
5130
5131 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
5132
5133
5134 Kind string `json:"kind,omitempty"`
5135
5136
5137 Metrics []*Metric `json:"metrics,omitempty"`
5138
5139
5140 OverlapMetrics []*Metric `json:"overlapMetrics,omitempty"`
5141
5142
5143
5144
5145
5146 ForceSendFields []string `json:"-"`
5147
5148
5149
5150
5151 NullFields []string `json:"-"`
5152 }
5153
5154 func (s *CrossDimensionReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
5155 type NoMethod CrossDimensionReachReportCompatibleFields
5156 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5157 }
5158
5159
5160
5161 type CustomFloodlightVariable struct {
5162
5163
5164 Kind string `json:"kind,omitempty"`
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269 Type string `json:"type,omitempty"`
5270
5271
5272 Value string `json:"value,omitempty"`
5273
5274
5275
5276
5277
5278 ForceSendFields []string `json:"-"`
5279
5280
5281
5282
5283 NullFields []string `json:"-"`
5284 }
5285
5286 func (s *CustomFloodlightVariable) MarshalJSON() ([]byte, error) {
5287 type NoMethod CustomFloodlightVariable
5288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5289 }
5290
5291
5292 type CustomRichMediaEvents struct {
5293
5294
5295 FilteredEventIds []*DimensionValue `json:"filteredEventIds,omitempty"`
5296
5297
5298 Kind string `json:"kind,omitempty"`
5299
5300
5301
5302
5303
5304 ForceSendFields []string `json:"-"`
5305
5306
5307
5308
5309 NullFields []string `json:"-"`
5310 }
5311
5312 func (s *CustomRichMediaEvents) MarshalJSON() ([]byte, error) {
5313 type NoMethod CustomRichMediaEvents
5314 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5315 }
5316
5317
5318 type CustomViewabilityMetric struct {
5319
5320 Configuration *CustomViewabilityMetricConfiguration `json:"configuration,omitempty"`
5321
5322 Id int64 `json:"id,omitempty,string"`
5323
5324 Name string `json:"name,omitempty"`
5325
5326
5327
5328
5329
5330 ForceSendFields []string `json:"-"`
5331
5332
5333
5334
5335 NullFields []string `json:"-"`
5336 }
5337
5338 func (s *CustomViewabilityMetric) MarshalJSON() ([]byte, error) {
5339 type NoMethod CustomViewabilityMetric
5340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5341 }
5342
5343
5344
5345 type CustomViewabilityMetricConfiguration struct {
5346
5347 Audible bool `json:"audible,omitempty"`
5348
5349
5350
5351 TimeMillis int64 `json:"timeMillis,omitempty"`
5352
5353
5354
5355 TimePercent int64 `json:"timePercent,omitempty"`
5356
5357
5358 ViewabilityPercent int64 `json:"viewabilityPercent,omitempty"`
5359
5360
5361
5362
5363
5364 ForceSendFields []string `json:"-"`
5365
5366
5367
5368
5369 NullFields []string `json:"-"`
5370 }
5371
5372 func (s *CustomViewabilityMetricConfiguration) MarshalJSON() ([]byte, error) {
5373 type NoMethod CustomViewabilityMetricConfiguration
5374 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5375 }
5376
5377
5378 type DateRange struct {
5379 EndDate string `json:"endDate,omitempty"`
5380
5381 Kind string `json:"kind,omitempty"`
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403 RelativeDateRange string `json:"relativeDateRange,omitempty"`
5404 StartDate string `json:"startDate,omitempty"`
5405
5406
5407
5408
5409
5410 ForceSendFields []string `json:"-"`
5411
5412
5413
5414
5415 NullFields []string `json:"-"`
5416 }
5417
5418 func (s *DateRange) MarshalJSON() ([]byte, error) {
5419 type NoMethod DateRange
5420 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5421 }
5422
5423
5424 type DayPartTargeting struct {
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437 DaysOfWeek []string `json:"daysOfWeek,omitempty"`
5438
5439
5440
5441
5442
5443
5444
5445 HoursOfDay []int64 `json:"hoursOfDay,omitempty"`
5446
5447
5448 UserLocalTime bool `json:"userLocalTime,omitempty"`
5449
5450
5451
5452
5453
5454 ForceSendFields []string `json:"-"`
5455
5456
5457
5458
5459 NullFields []string `json:"-"`
5460 }
5461
5462 func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
5463 type NoMethod DayPartTargeting
5464 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5465 }
5466
5467
5468 type DeepLink struct {
5469
5470 AppUrl string `json:"appUrl,omitempty"`
5471
5472
5473 FallbackUrl string `json:"fallbackUrl,omitempty"`
5474
5475
5476 Kind string `json:"kind,omitempty"`
5477
5478 MobileApp *MobileApp `json:"mobileApp,omitempty"`
5479
5480
5481 RemarketingListIds googleapi.Int64s `json:"remarketingListIds,omitempty"`
5482
5483
5484
5485
5486
5487 ForceSendFields []string `json:"-"`
5488
5489
5490
5491
5492 NullFields []string `json:"-"`
5493 }
5494
5495 func (s *DeepLink) MarshalJSON() ([]byte, error) {
5496 type NoMethod DeepLink
5497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5498 }
5499
5500
5501
5502
5503
5504 type DefaultClickThroughEventTagProperties struct {
5505
5506
5507 DefaultClickThroughEventTagId int64 `json:"defaultClickThroughEventTagId,omitempty,string"`
5508
5509
5510 OverrideInheritedEventTag bool `json:"overrideInheritedEventTag,omitempty"`
5511
5512
5513
5514
5515
5516 ForceSendFields []string `json:"-"`
5517
5518
5519
5520
5521 NullFields []string `json:"-"`
5522 }
5523
5524 func (s *DefaultClickThroughEventTagProperties) MarshalJSON() ([]byte, error) {
5525 type NoMethod DefaultClickThroughEventTagProperties
5526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5527 }
5528
5529
5530 type DeliverySchedule struct {
5531
5532
5533 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"`
5534
5535
5536
5537 HardCutoff bool `json:"hardCutoff,omitempty"`
5538
5539
5540
5541
5542
5543 ImpressionRatio int64 `json:"impressionRatio,omitempty,string"`
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564 Priority string `json:"priority,omitempty"`
5565
5566
5567
5568
5569
5570 ForceSendFields []string `json:"-"`
5571
5572
5573
5574
5575 NullFields []string `json:"-"`
5576 }
5577
5578 func (s *DeliverySchedule) MarshalJSON() ([]byte, error) {
5579 type NoMethod DeliverySchedule
5580 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5581 }
5582
5583
5584 type DfpSettings struct {
5585
5586 DfpNetworkCode string `json:"dfpNetworkCode,omitempty"`
5587
5588 DfpNetworkName string `json:"dfpNetworkName,omitempty"`
5589
5590
5591 ProgrammaticPlacementAccepted bool `json:"programmaticPlacementAccepted,omitempty"`
5592
5593
5594 PubPaidPlacementAccepted bool `json:"pubPaidPlacementAccepted,omitempty"`
5595
5596
5597 PublisherPortalOnly bool `json:"publisherPortalOnly,omitempty"`
5598
5599
5600
5601
5602
5603 ForceSendFields []string `json:"-"`
5604
5605
5606
5607
5608 NullFields []string `json:"-"`
5609 }
5610
5611 func (s *DfpSettings) MarshalJSON() ([]byte, error) {
5612 type NoMethod DfpSettings
5613 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5614 }
5615
5616
5617 type Dimension struct {
5618
5619 Kind string `json:"kind,omitempty"`
5620
5621 Name string `json:"name,omitempty"`
5622
5623
5624
5625
5626
5627 ForceSendFields []string `json:"-"`
5628
5629
5630
5631
5632 NullFields []string `json:"-"`
5633 }
5634
5635 func (s *Dimension) MarshalJSON() ([]byte, error) {
5636 type NoMethod Dimension
5637 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5638 }
5639
5640
5641 type DimensionFilter struct {
5642
5643 DimensionName string `json:"dimensionName,omitempty"`
5644
5645
5646 Kind string `json:"kind,omitempty"`
5647
5648 Value string `json:"value,omitempty"`
5649
5650
5651
5652
5653
5654 ForceSendFields []string `json:"-"`
5655
5656
5657
5658
5659 NullFields []string `json:"-"`
5660 }
5661
5662 func (s *DimensionFilter) MarshalJSON() ([]byte, error) {
5663 type NoMethod DimensionFilter
5664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5665 }
5666
5667
5668 type DimensionValue struct {
5669
5670 DimensionName string `json:"dimensionName,omitempty"`
5671
5672 Etag string `json:"etag,omitempty"`
5673
5674 Id string `json:"id,omitempty"`
5675
5676
5677 Kind string `json:"kind,omitempty"`
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689 MatchType string `json:"matchType,omitempty"`
5690
5691 Value string `json:"value,omitempty"`
5692
5693
5694
5695
5696
5697 ForceSendFields []string `json:"-"`
5698
5699
5700
5701
5702 NullFields []string `json:"-"`
5703 }
5704
5705 func (s *DimensionValue) MarshalJSON() ([]byte, error) {
5706 type NoMethod DimensionValue
5707 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5708 }
5709
5710
5711 type DimensionValueList struct {
5712
5713 Etag string `json:"etag,omitempty"`
5714
5715 Items []*DimensionValue `json:"items,omitempty"`
5716
5717
5718 Kind string `json:"kind,omitempty"`
5719
5720
5721
5722
5723 NextPageToken string `json:"nextPageToken,omitempty"`
5724
5725
5726 googleapi.ServerResponse `json:"-"`
5727
5728
5729
5730
5731
5732 ForceSendFields []string `json:"-"`
5733
5734
5735
5736
5737 NullFields []string `json:"-"`
5738 }
5739
5740 func (s *DimensionValueList) MarshalJSON() ([]byte, error) {
5741 type NoMethod DimensionValueList
5742 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5743 }
5744
5745
5746 type DimensionValueRequest struct {
5747
5748
5749 DimensionName string `json:"dimensionName,omitempty"`
5750 EndDate string `json:"endDate,omitempty"`
5751
5752
5753 Filters []*DimensionFilter `json:"filters,omitempty"`
5754
5755
5756 Kind string `json:"kind,omitempty"`
5757 StartDate string `json:"startDate,omitempty"`
5758
5759
5760
5761
5762
5763 ForceSendFields []string `json:"-"`
5764
5765
5766
5767
5768 NullFields []string `json:"-"`
5769 }
5770
5771 func (s *DimensionValueRequest) MarshalJSON() ([]byte, error) {
5772 type NoMethod DimensionValueRequest
5773 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5774 }
5775
5776
5777
5778
5779 type DirectorySite struct {
5780
5781 Id int64 `json:"id,omitempty,string"`
5782
5783
5784 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794 InpageTagFormats []string `json:"inpageTagFormats,omitempty"`
5795
5796
5797
5798
5799
5800
5801
5802
5803 InterstitialTagFormats []string `json:"interstitialTagFormats,omitempty"`
5804
5805
5806 Kind string `json:"kind,omitempty"`
5807
5808 Name string `json:"name,omitempty"`
5809
5810 Settings *DirectorySiteSettings `json:"settings,omitempty"`
5811
5812 Url string `json:"url,omitempty"`
5813
5814
5815 googleapi.ServerResponse `json:"-"`
5816
5817
5818
5819
5820
5821 ForceSendFields []string `json:"-"`
5822
5823
5824
5825
5826 NullFields []string `json:"-"`
5827 }
5828
5829 func (s *DirectorySite) MarshalJSON() ([]byte, error) {
5830 type NoMethod DirectorySite
5831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5832 }
5833
5834
5835 type DirectorySiteSettings struct {
5836
5837
5838 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
5839
5840 DfpSettings *DfpSettings `json:"dfpSettings,omitempty"`
5841
5842
5843 InstreamVideoPlacementAccepted bool `json:"instreamVideoPlacementAccepted,omitempty"`
5844
5845 InterstitialPlacementAccepted bool `json:"interstitialPlacementAccepted,omitempty"`
5846
5847
5848
5849
5850
5851 ForceSendFields []string `json:"-"`
5852
5853
5854
5855
5856 NullFields []string `json:"-"`
5857 }
5858
5859 func (s *DirectorySiteSettings) MarshalJSON() ([]byte, error) {
5860 type NoMethod DirectorySiteSettings
5861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5862 }
5863
5864
5865 type DirectorySitesListResponse struct {
5866
5867 DirectorySites []*DirectorySite `json:"directorySites,omitempty"`
5868
5869
5870 Kind string `json:"kind,omitempty"`
5871
5872 NextPageToken string `json:"nextPageToken,omitempty"`
5873
5874
5875 googleapi.ServerResponse `json:"-"`
5876
5877
5878
5879
5880
5881 ForceSendFields []string `json:"-"`
5882
5883
5884
5885
5886 NullFields []string `json:"-"`
5887 }
5888
5889 func (s *DirectorySitesListResponse) MarshalJSON() ([]byte, error) {
5890 type NoMethod DirectorySitesListResponse
5891 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5892 }
5893
5894
5895
5896
5897 type DisjunctiveMatchStatement struct {
5898
5899
5900 EventFilters []*EventFilter `json:"eventFilters,omitempty"`
5901
5902
5903 Kind string `json:"kind,omitempty"`
5904
5905
5906
5907
5908
5909 ForceSendFields []string `json:"-"`
5910
5911
5912
5913
5914 NullFields []string `json:"-"`
5915 }
5916
5917 func (s *DisjunctiveMatchStatement) MarshalJSON() ([]byte, error) {
5918 type NoMethod DisjunctiveMatchStatement
5919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5920 }
5921
5922
5923
5924
5925
5926
5927
5928 type DynamicTargetingKey struct {
5929
5930
5931 Kind string `json:"kind,omitempty"`
5932
5933
5934
5935 Name string `json:"name,omitempty"`
5936
5937
5938 ObjectId int64 `json:"objectId,omitempty,string"`
5939
5940
5941
5942
5943
5944
5945
5946
5947 ObjectType string `json:"objectType,omitempty"`
5948
5949
5950 googleapi.ServerResponse `json:"-"`
5951
5952
5953
5954
5955
5956 ForceSendFields []string `json:"-"`
5957
5958
5959
5960
5961 NullFields []string `json:"-"`
5962 }
5963
5964 func (s *DynamicTargetingKey) MarshalJSON() ([]byte, error) {
5965 type NoMethod DynamicTargetingKey
5966 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5967 }
5968
5969
5970 type DynamicTargetingKeysListResponse struct {
5971
5972 DynamicTargetingKeys []*DynamicTargetingKey `json:"dynamicTargetingKeys,omitempty"`
5973
5974
5975 Kind string `json:"kind,omitempty"`
5976
5977
5978 googleapi.ServerResponse `json:"-"`
5979
5980
5981
5982
5983
5984 ForceSendFields []string `json:"-"`
5985
5986
5987
5988
5989 NullFields []string `json:"-"`
5990 }
5991
5992 func (s *DynamicTargetingKeysListResponse) MarshalJSON() ([]byte, error) {
5993 type NoMethod DynamicTargetingKeysListResponse
5994 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
5995 }
5996
5997
5998 type EncryptionInfo struct {
5999
6000
6001 EncryptionEntityId int64 `json:"encryptionEntityId,omitempty,string"`
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013 EncryptionEntityType string `json:"encryptionEntityType,omitempty"`
6014
6015
6016
6017
6018
6019
6020
6021 EncryptionSource string `json:"encryptionSource,omitempty"`
6022
6023
6024 Kind string `json:"kind,omitempty"`
6025
6026
6027
6028
6029
6030 ForceSendFields []string `json:"-"`
6031
6032
6033
6034
6035 NullFields []string `json:"-"`
6036 }
6037
6038 func (s *EncryptionInfo) MarshalJSON() ([]byte, error) {
6039 type NoMethod EncryptionInfo
6040 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6041 }
6042
6043
6044 type EventFilter struct {
6045
6046 DimensionFilter *PathReportDimensionValue `json:"dimensionFilter,omitempty"`
6047
6048 Kind string `json:"kind,omitempty"`
6049
6050 UvarFilter *UvarFilter `json:"uvarFilter,omitempty"`
6051
6052
6053
6054
6055
6056 ForceSendFields []string `json:"-"`
6057
6058
6059
6060
6061 NullFields []string `json:"-"`
6062 }
6063
6064 func (s *EventFilter) MarshalJSON() ([]byte, error) {
6065 type NoMethod EventFilter
6066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6067 }
6068
6069
6070 type EventTag struct {
6071
6072
6073 AccountId int64 `json:"accountId,omitempty,string"`
6074
6075
6076 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6077
6078
6079 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6080
6081
6082 CampaignId int64 `json:"campaignId,omitempty,string"`
6083
6084
6085 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
6086
6087
6088 EnabledByDefault bool `json:"enabledByDefault,omitempty"`
6089
6090
6091
6092
6093 ExcludeFromAdxRequests bool `json:"excludeFromAdxRequests,omitempty"`
6094
6095 Id int64 `json:"id,omitempty,string"`
6096
6097
6098 Kind string `json:"kind,omitempty"`
6099
6100
6101 Name string `json:"name,omitempty"`
6102
6103
6104
6105
6106
6107
6108
6109 SiteFilterType string `json:"siteFilterType,omitempty"`
6110
6111
6112 SiteIds googleapi.Int64s `json:"siteIds,omitempty"`
6113
6114
6115 SslCompliant bool `json:"sslCompliant,omitempty"`
6116
6117
6118
6119
6120
6121
6122 Status string `json:"status,omitempty"`
6123
6124
6125 SubaccountId int64 `json:"subaccountId,omitempty,string"`
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137 Type string `json:"type,omitempty"`
6138
6139
6140
6141 Url string `json:"url,omitempty"`
6142
6143
6144
6145 UrlEscapeLevels int64 `json:"urlEscapeLevels,omitempty"`
6146
6147
6148 googleapi.ServerResponse `json:"-"`
6149
6150
6151
6152
6153
6154 ForceSendFields []string `json:"-"`
6155
6156
6157
6158
6159 NullFields []string `json:"-"`
6160 }
6161
6162 func (s *EventTag) MarshalJSON() ([]byte, error) {
6163 type NoMethod EventTag
6164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6165 }
6166
6167
6168 type EventTagOverride struct {
6169
6170 Enabled bool `json:"enabled,omitempty"`
6171
6172
6173 Id int64 `json:"id,omitempty,string"`
6174
6175
6176
6177
6178
6179 ForceSendFields []string `json:"-"`
6180
6181
6182
6183
6184 NullFields []string `json:"-"`
6185 }
6186
6187 func (s *EventTagOverride) MarshalJSON() ([]byte, error) {
6188 type NoMethod EventTagOverride
6189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6190 }
6191
6192
6193 type EventTagsListResponse struct {
6194
6195 EventTags []*EventTag `json:"eventTags,omitempty"`
6196
6197
6198 Kind string `json:"kind,omitempty"`
6199
6200
6201 googleapi.ServerResponse `json:"-"`
6202
6203
6204
6205
6206
6207 ForceSendFields []string `json:"-"`
6208
6209
6210
6211
6212 NullFields []string `json:"-"`
6213 }
6214
6215 func (s *EventTagsListResponse) MarshalJSON() ([]byte, error) {
6216 type NoMethod EventTagsListResponse
6217 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6218 }
6219
6220
6221
6222
6223 type File struct {
6224
6225
6226 DateRange *DateRange `json:"dateRange,omitempty"`
6227
6228 Etag string `json:"etag,omitempty"`
6229
6230 FileName string `json:"fileName,omitempty"`
6231
6232
6233
6234
6235
6236
6237 Format string `json:"format,omitempty"`
6238
6239 Id int64 `json:"id,omitempty,string"`
6240
6241
6242 Kind string `json:"kind,omitempty"`
6243
6244
6245 LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
6246
6247 ReportId int64 `json:"reportId,omitempty,string"`
6248
6249
6250
6251
6252
6253
6254
6255
6256 Status string `json:"status,omitempty"`
6257
6258 Urls *FileUrls `json:"urls,omitempty"`
6259
6260
6261 googleapi.ServerResponse `json:"-"`
6262
6263
6264
6265
6266
6267 ForceSendFields []string `json:"-"`
6268
6269
6270
6271
6272 NullFields []string `json:"-"`
6273 }
6274
6275 func (s *File) MarshalJSON() ([]byte, error) {
6276 type NoMethod File
6277 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6278 }
6279
6280
6281 type FileUrls struct {
6282
6283 ApiUrl string `json:"apiUrl,omitempty"`
6284
6285 BrowserUrl string `json:"browserUrl,omitempty"`
6286
6287
6288
6289
6290
6291 ForceSendFields []string `json:"-"`
6292
6293
6294
6295
6296 NullFields []string `json:"-"`
6297 }
6298
6299 func (s *FileUrls) MarshalJSON() ([]byte, error) {
6300 type NoMethod FileUrls
6301 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6302 }
6303
6304
6305 type FileList struct {
6306
6307 Etag string `json:"etag,omitempty"`
6308
6309 Items []*File `json:"items,omitempty"`
6310
6311
6312 Kind string `json:"kind,omitempty"`
6313
6314
6315
6316
6317 NextPageToken string `json:"nextPageToken,omitempty"`
6318
6319
6320 googleapi.ServerResponse `json:"-"`
6321
6322
6323
6324
6325
6326 ForceSendFields []string `json:"-"`
6327
6328
6329
6330
6331 NullFields []string `json:"-"`
6332 }
6333
6334 func (s *FileList) MarshalJSON() ([]byte, error) {
6335 type NoMethod FileList
6336 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6337 }
6338
6339
6340 type Flight struct {
6341 EndDate string `json:"endDate,omitempty"`
6342
6343 RateOrCost int64 `json:"rateOrCost,omitempty,string"`
6344 StartDate string `json:"startDate,omitempty"`
6345
6346 Units int64 `json:"units,omitempty,string"`
6347
6348
6349
6350
6351
6352 ForceSendFields []string `json:"-"`
6353
6354
6355
6356
6357 NullFields []string `json:"-"`
6358 }
6359
6360 func (s *Flight) MarshalJSON() ([]byte, error) {
6361 type NoMethod Flight
6362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6363 }
6364
6365
6366
6367 type FloodlightActivitiesGenerateTagResponse struct {
6368
6369
6370 FloodlightActivityTag string `json:"floodlightActivityTag,omitempty"`
6371
6372
6373
6374
6375 GlobalSiteTagGlobalSnippet string `json:"globalSiteTagGlobalSnippet,omitempty"`
6376
6377
6378 Kind string `json:"kind,omitempty"`
6379
6380
6381 googleapi.ServerResponse `json:"-"`
6382
6383
6384
6385
6386
6387 ForceSendFields []string `json:"-"`
6388
6389
6390
6391
6392 NullFields []string `json:"-"`
6393 }
6394
6395 func (s *FloodlightActivitiesGenerateTagResponse) MarshalJSON() ([]byte, error) {
6396 type NoMethod FloodlightActivitiesGenerateTagResponse
6397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6398 }
6399
6400
6401 type FloodlightActivitiesListResponse struct {
6402
6403 FloodlightActivities []*FloodlightActivity `json:"floodlightActivities,omitempty"`
6404
6405
6406 Kind string `json:"kind,omitempty"`
6407
6408 NextPageToken string `json:"nextPageToken,omitempty"`
6409
6410
6411 googleapi.ServerResponse `json:"-"`
6412
6413
6414
6415
6416
6417 ForceSendFields []string `json:"-"`
6418
6419
6420
6421
6422 NullFields []string `json:"-"`
6423 }
6424
6425 func (s *FloodlightActivitiesListResponse) MarshalJSON() ([]byte, error) {
6426 type NoMethod FloodlightActivitiesListResponse
6427 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6428 }
6429
6430
6431 type FloodlightActivity struct {
6432
6433
6434 AccountId int64 `json:"accountId,omitempty,string"`
6435
6436
6437
6438 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6439
6440
6441 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6442
6443 AttributionEnabled bool `json:"attributionEnabled,omitempty"`
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454 CacheBustingType string `json:"cacheBustingType,omitempty"`
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468 CountingMethod string `json:"countingMethod,omitempty"`
6469
6470 DefaultTags []*FloodlightActivityDynamicTag `json:"defaultTags,omitempty"`
6471
6472
6473 ExpectedUrl string `json:"expectedUrl,omitempty"`
6474
6475
6476 FloodlightActivityGroupId int64 `json:"floodlightActivityGroupId,omitempty,string"`
6477
6478
6479 FloodlightActivityGroupName string `json:"floodlightActivityGroupName,omitempty"`
6480
6481
6482 FloodlightActivityGroupTagString string `json:"floodlightActivityGroupTagString,omitempty"`
6483
6484
6485
6486
6487
6488
6489 FloodlightActivityGroupType string `json:"floodlightActivityGroupType,omitempty"`
6490
6491
6492
6493
6494 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
6495
6496
6497 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
6498
6499
6500
6501
6502
6503
6504
6505 FloodlightTagType string `json:"floodlightTagType,omitempty"`
6506
6507
6508 Id int64 `json:"id,omitempty,string"`
6509
6510
6511 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6512
6513
6514 Kind string `json:"kind,omitempty"`
6515
6516
6517 Name string `json:"name,omitempty"`
6518
6519 Notes string `json:"notes,omitempty"`
6520
6521 PublisherTags []*FloodlightActivityPublisherDynamicTag `json:"publisherTags,omitempty"`
6522
6523 Secure bool `json:"secure,omitempty"`
6524
6525
6526 SslCompliant bool `json:"sslCompliant,omitempty"`
6527
6528 SslRequired bool `json:"sslRequired,omitempty"`
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540 Status string `json:"status,omitempty"`
6541
6542
6543 SubaccountId int64 `json:"subaccountId,omitempty,string"`
6544
6545
6546
6547
6548
6549
6550 TagFormat string `json:"tagFormat,omitempty"`
6551
6552
6553
6554
6555
6556
6557 TagString string `json:"tagString,omitempty"`
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663 UserDefinedVariableTypes []string `json:"userDefinedVariableTypes,omitempty"`
6664
6665
6666 googleapi.ServerResponse `json:"-"`
6667
6668
6669
6670
6671
6672 ForceSendFields []string `json:"-"`
6673
6674
6675
6676
6677 NullFields []string `json:"-"`
6678 }
6679
6680 func (s *FloodlightActivity) MarshalJSON() ([]byte, error) {
6681 type NoMethod FloodlightActivity
6682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6683 }
6684
6685
6686 type FloodlightActivityDynamicTag struct {
6687
6688 Id int64 `json:"id,omitempty,string"`
6689
6690 Name string `json:"name,omitempty"`
6691
6692 Tag string `json:"tag,omitempty"`
6693
6694
6695
6696
6697
6698 ForceSendFields []string `json:"-"`
6699
6700
6701
6702
6703 NullFields []string `json:"-"`
6704 }
6705
6706 func (s *FloodlightActivityDynamicTag) MarshalJSON() ([]byte, error) {
6707 type NoMethod FloodlightActivityDynamicTag
6708 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6709 }
6710
6711
6712 type FloodlightActivityGroup struct {
6713
6714
6715 AccountId int64 `json:"accountId,omitempty,string"`
6716
6717
6718
6719 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6720
6721
6722 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6723
6724
6725 FloodlightConfigurationId int64 `json:"floodlightConfigurationId,omitempty,string"`
6726
6727
6728 FloodlightConfigurationIdDimensionValue *DimensionValue `json:"floodlightConfigurationIdDimensionValue,omitempty"`
6729
6730
6731 Id int64 `json:"id,omitempty,string"`
6732
6733
6734 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6735
6736
6737 Kind string `json:"kind,omitempty"`
6738
6739
6740 Name string `json:"name,omitempty"`
6741
6742
6743 SubaccountId int64 `json:"subaccountId,omitempty,string"`
6744
6745
6746
6747
6748
6749
6750 TagString string `json:"tagString,omitempty"`
6751
6752
6753
6754
6755
6756
6757 Type string `json:"type,omitempty"`
6758
6759
6760 googleapi.ServerResponse `json:"-"`
6761
6762
6763
6764
6765
6766 ForceSendFields []string `json:"-"`
6767
6768
6769
6770
6771 NullFields []string `json:"-"`
6772 }
6773
6774 func (s *FloodlightActivityGroup) MarshalJSON() ([]byte, error) {
6775 type NoMethod FloodlightActivityGroup
6776 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6777 }
6778
6779
6780
6781 type FloodlightActivityGroupsListResponse struct {
6782
6783 FloodlightActivityGroups []*FloodlightActivityGroup `json:"floodlightActivityGroups,omitempty"`
6784
6785
6786 Kind string `json:"kind,omitempty"`
6787
6788 NextPageToken string `json:"nextPageToken,omitempty"`
6789
6790
6791 googleapi.ServerResponse `json:"-"`
6792
6793
6794
6795
6796
6797 ForceSendFields []string `json:"-"`
6798
6799
6800
6801
6802 NullFields []string `json:"-"`
6803 }
6804
6805 func (s *FloodlightActivityGroupsListResponse) MarshalJSON() ([]byte, error) {
6806 type NoMethod FloodlightActivityGroupsListResponse
6807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6808 }
6809
6810
6811 type FloodlightActivityPublisherDynamicTag struct {
6812
6813 ClickThrough bool `json:"clickThrough,omitempty"`
6814
6815
6816
6817 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
6818
6819 DynamicTag *FloodlightActivityDynamicTag `json:"dynamicTag,omitempty"`
6820
6821 SiteId int64 `json:"siteId,omitempty,string"`
6822
6823
6824 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
6825
6826 ViewThrough bool `json:"viewThrough,omitempty"`
6827
6828
6829
6830
6831
6832 ForceSendFields []string `json:"-"`
6833
6834
6835
6836
6837 NullFields []string `json:"-"`
6838 }
6839
6840 func (s *FloodlightActivityPublisherDynamicTag) MarshalJSON() ([]byte, error) {
6841 type NoMethod FloodlightActivityPublisherDynamicTag
6842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6843 }
6844
6845
6846 type FloodlightConfiguration struct {
6847
6848
6849 AccountId int64 `json:"accountId,omitempty,string"`
6850
6851
6852 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
6853
6854
6855 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
6856
6857
6858 AnalyticsDataSharingEnabled bool `json:"analyticsDataSharingEnabled,omitempty"`
6859
6860
6861 CustomViewabilityMetric *CustomViewabilityMetric `json:"customViewabilityMetric,omitempty"`
6862
6863
6864
6865 ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
6866
6867
6868
6869 FirstDayOfWeek string `json:"firstDayOfWeek,omitempty"`
6870
6871
6872 Id int64 `json:"id,omitempty,string"`
6873
6874
6875 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
6876
6877
6878 InAppAttributionTrackingEnabled bool `json:"inAppAttributionTrackingEnabled,omitempty"`
6879
6880
6881 Kind string `json:"kind,omitempty"`
6882
6883
6884 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
6885
6886
6887
6888
6889
6890
6891
6892 NaturalSearchConversionAttributionOption string `json:"naturalSearchConversionAttributionOption,omitempty"`
6893
6894 OmnitureSettings *OmnitureSettings `json:"omnitureSettings,omitempty"`
6895
6896
6897 SubaccountId int64 `json:"subaccountId,omitempty,string"`
6898
6899 TagSettings *TagSettings `json:"tagSettings,omitempty"`
6900
6901
6902 ThirdPartyAuthenticationTokens []*ThirdPartyAuthenticationToken `json:"thirdPartyAuthenticationTokens,omitempty"`
6903
6904
6905 UserDefinedVariableConfigurations []*UserDefinedVariableConfiguration `json:"userDefinedVariableConfigurations,omitempty"`
6906
6907
6908 googleapi.ServerResponse `json:"-"`
6909
6910
6911
6912
6913
6914 ForceSendFields []string `json:"-"`
6915
6916
6917
6918
6919 NullFields []string `json:"-"`
6920 }
6921
6922 func (s *FloodlightConfiguration) MarshalJSON() ([]byte, error) {
6923 type NoMethod FloodlightConfiguration
6924 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6925 }
6926
6927
6928 type FloodlightConfigurationsListResponse struct {
6929
6930 FloodlightConfigurations []*FloodlightConfiguration `json:"floodlightConfigurations,omitempty"`
6931
6932
6933 Kind string `json:"kind,omitempty"`
6934
6935
6936 googleapi.ServerResponse `json:"-"`
6937
6938
6939
6940
6941
6942 ForceSendFields []string `json:"-"`
6943
6944
6945
6946
6947 NullFields []string `json:"-"`
6948 }
6949
6950 func (s *FloodlightConfigurationsListResponse) MarshalJSON() ([]byte, error) {
6951 type NoMethod FloodlightConfigurationsListResponse
6952 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6953 }
6954
6955
6956
6957 type FloodlightReportCompatibleFields struct {
6958
6959
6960 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
6961
6962
6963 Dimensions []*Dimension `json:"dimensions,omitempty"`
6964
6965
6966 Kind string `json:"kind,omitempty"`
6967
6968
6969 Metrics []*Metric `json:"metrics,omitempty"`
6970
6971
6972
6973
6974
6975 ForceSendFields []string `json:"-"`
6976
6977
6978
6979
6980 NullFields []string `json:"-"`
6981 }
6982
6983 func (s *FloodlightReportCompatibleFields) MarshalJSON() ([]byte, error) {
6984 type NoMethod FloodlightReportCompatibleFields
6985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
6986 }
6987
6988
6989 type FrequencyCap struct {
6990
6991
6992 Duration int64 `json:"duration,omitempty,string"`
6993
6994
6995 Impressions int64 `json:"impressions,omitempty,string"`
6996
6997
6998
6999
7000
7001 ForceSendFields []string `json:"-"`
7002
7003
7004
7005
7006 NullFields []string `json:"-"`
7007 }
7008
7009 func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
7010 type NoMethod FrequencyCap
7011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7012 }
7013
7014
7015 type FsCommand struct {
7016
7017
7018 Left int64 `json:"left,omitempty"`
7019
7020
7021
7022
7023
7024
7025 PositionOption string `json:"positionOption,omitempty"`
7026
7027
7028 Top int64 `json:"top,omitempty"`
7029
7030 WindowHeight int64 `json:"windowHeight,omitempty"`
7031
7032 WindowWidth int64 `json:"windowWidth,omitempty"`
7033
7034
7035
7036
7037
7038 ForceSendFields []string `json:"-"`
7039
7040
7041
7042
7043 NullFields []string `json:"-"`
7044 }
7045
7046 func (s *FsCommand) MarshalJSON() ([]byte, error) {
7047 type NoMethod FsCommand
7048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7049 }
7050
7051
7052 type GeoTargeting struct {
7053
7054
7055
7056
7057 Cities []*City `json:"cities,omitempty"`
7058
7059
7060
7061
7062
7063 Countries []*Country `json:"countries,omitempty"`
7064
7065
7066
7067 ExcludeCountries bool `json:"excludeCountries,omitempty"`
7068
7069
7070
7071 Metros []*Metro `json:"metros,omitempty"`
7072
7073
7074
7075
7076 PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
7077
7078
7079
7080
7081 Regions []*Region `json:"regions,omitempty"`
7082
7083
7084
7085
7086
7087 ForceSendFields []string `json:"-"`
7088
7089
7090
7091
7092 NullFields []string `json:"-"`
7093 }
7094
7095 func (s *GeoTargeting) MarshalJSON() ([]byte, error) {
7096 type NoMethod GeoTargeting
7097 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7098 }
7099
7100
7101 type InventoryItem struct {
7102
7103 AccountId int64 `json:"accountId,omitempty,string"`
7104
7105
7106
7107
7108 AdSlots []*AdSlot `json:"adSlots,omitempty"`
7109
7110 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7111
7112 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
7113
7114
7115 EstimatedClickThroughRate int64 `json:"estimatedClickThroughRate,omitempty,string"`
7116
7117 EstimatedConversionRate int64 `json:"estimatedConversionRate,omitempty,string"`
7118
7119 Id int64 `json:"id,omitempty,string"`
7120
7121 InPlan bool `json:"inPlan,omitempty"`
7122
7123
7124 Kind string `json:"kind,omitempty"`
7125
7126
7127 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
7128
7129
7130
7131 Name string `json:"name,omitempty"`
7132
7133 NegotiationChannelId int64 `json:"negotiationChannelId,omitempty,string"`
7134
7135 OrderId int64 `json:"orderId,omitempty,string"`
7136
7137 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
7138
7139 Pricing *Pricing `json:"pricing,omitempty"`
7140
7141 ProjectId int64 `json:"projectId,omitempty,string"`
7142
7143 RfpId int64 `json:"rfpId,omitempty,string"`
7144
7145 SiteId int64 `json:"siteId,omitempty,string"`
7146
7147 SubaccountId int64 `json:"subaccountId,omitempty,string"`
7148
7149
7150
7151
7152
7153 Type string `json:"type,omitempty"`
7154
7155
7156 googleapi.ServerResponse `json:"-"`
7157
7158
7159
7160
7161
7162 ForceSendFields []string `json:"-"`
7163
7164
7165
7166
7167 NullFields []string `json:"-"`
7168 }
7169
7170 func (s *InventoryItem) MarshalJSON() ([]byte, error) {
7171 type NoMethod InventoryItem
7172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7173 }
7174
7175
7176 type InventoryItemsListResponse struct {
7177
7178 InventoryItems []*InventoryItem `json:"inventoryItems,omitempty"`
7179
7180
7181 Kind string `json:"kind,omitempty"`
7182
7183 NextPageToken string `json:"nextPageToken,omitempty"`
7184
7185
7186 googleapi.ServerResponse `json:"-"`
7187
7188
7189
7190
7191
7192 ForceSendFields []string `json:"-"`
7193
7194
7195
7196
7197 NullFields []string `json:"-"`
7198 }
7199
7200 func (s *InventoryItemsListResponse) MarshalJSON() ([]byte, error) {
7201 type NoMethod InventoryItemsListResponse
7202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7203 }
7204
7205
7206 type Invoice struct {
7207
7208
7209 CampaignSummaries []*CampaignSummary `json:"campaign_summaries,omitempty"`
7210
7211
7212
7213 CorrectedInvoiceId string `json:"correctedInvoiceId,omitempty"`
7214
7215 CurrencyCode string `json:"currencyCode,omitempty"`
7216
7217 DueDate string `json:"dueDate,omitempty"`
7218
7219 Id string `json:"id,omitempty"`
7220
7221
7222
7223
7224
7225
7226 InvoiceType string `json:"invoiceType,omitempty"`
7227
7228 IssueDate string `json:"issueDate,omitempty"`
7229
7230
7231 Kind string `json:"kind,omitempty"`
7232
7233
7234 PaymentsAccountId string `json:"paymentsAccountId,omitempty"`
7235
7236
7237 PaymentsProfileId string `json:"paymentsProfileId,omitempty"`
7238
7239
7240
7241
7242 PdfUrl string `json:"pdfUrl,omitempty"`
7243
7244 PurchaseOrderNumber string `json:"purchaseOrderNumber,omitempty"`
7245
7246
7247
7248
7249 ReplacedInvoiceIds []string `json:"replacedInvoiceIds,omitempty"`
7250
7251 ServiceEndDate string `json:"serviceEndDate,omitempty"`
7252
7253 ServiceStartDate string `json:"serviceStartDate,omitempty"`
7254
7255
7256 SubtotalAmountMicros int64 `json:"subtotalAmountMicros,omitempty,string"`
7257
7258
7259 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"`
7260
7261
7262 TotalTaxAmountMicros int64 `json:"totalTaxAmountMicros,omitempty,string"`
7263
7264
7265
7266
7267
7268 ForceSendFields []string `json:"-"`
7269
7270
7271
7272
7273 NullFields []string `json:"-"`
7274 }
7275
7276 func (s *Invoice) MarshalJSON() ([]byte, error) {
7277 type NoMethod Invoice
7278 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7279 }
7280
7281
7282 type KeyValueTargetingExpression struct {
7283
7284 Expression string `json:"expression,omitempty"`
7285
7286
7287
7288
7289
7290 ForceSendFields []string `json:"-"`
7291
7292
7293
7294
7295 NullFields []string `json:"-"`
7296 }
7297
7298 func (s *KeyValueTargetingExpression) MarshalJSON() ([]byte, error) {
7299 type NoMethod KeyValueTargetingExpression
7300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7301 }
7302
7303
7304
7305 type LandingPage struct {
7306
7307 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
7308
7309 Archived bool `json:"archived,omitempty"`
7310
7311 DeepLinks []*DeepLink `json:"deepLinks,omitempty"`
7312
7313 Id int64 `json:"id,omitempty,string"`
7314
7315
7316 Kind string `json:"kind,omitempty"`
7317
7318
7319 Name string `json:"name,omitempty"`
7320
7321 Url string `json:"url,omitempty"`
7322
7323
7324 googleapi.ServerResponse `json:"-"`
7325
7326
7327
7328
7329
7330 ForceSendFields []string `json:"-"`
7331
7332
7333
7334
7335 NullFields []string `json:"-"`
7336 }
7337
7338 func (s *LandingPage) MarshalJSON() ([]byte, error) {
7339 type NoMethod LandingPage
7340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7341 }
7342
7343
7344 type Language struct {
7345
7346
7347 Id int64 `json:"id,omitempty,string"`
7348
7349
7350 Kind string `json:"kind,omitempty"`
7351
7352
7353
7354 LanguageCode string `json:"languageCode,omitempty"`
7355
7356 Name string `json:"name,omitempty"`
7357
7358
7359
7360
7361
7362 ForceSendFields []string `json:"-"`
7363
7364
7365
7366
7367 NullFields []string `json:"-"`
7368 }
7369
7370 func (s *Language) MarshalJSON() ([]byte, error) {
7371 type NoMethod Language
7372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7373 }
7374
7375
7376 type LanguageTargeting struct {
7377
7378
7379
7380 Languages []*Language `json:"languages,omitempty"`
7381
7382
7383
7384
7385
7386 ForceSendFields []string `json:"-"`
7387
7388
7389
7390
7391 NullFields []string `json:"-"`
7392 }
7393
7394 func (s *LanguageTargeting) MarshalJSON() ([]byte, error) {
7395 type NoMethod LanguageTargeting
7396 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7397 }
7398
7399
7400 type LanguagesListResponse struct {
7401
7402
7403 Kind string `json:"kind,omitempty"`
7404
7405 Languages []*Language `json:"languages,omitempty"`
7406
7407
7408 googleapi.ServerResponse `json:"-"`
7409
7410
7411
7412
7413
7414 ForceSendFields []string `json:"-"`
7415
7416
7417
7418
7419 NullFields []string `json:"-"`
7420 }
7421
7422 func (s *LanguagesListResponse) MarshalJSON() ([]byte, error) {
7423 type NoMethod LanguagesListResponse
7424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7425 }
7426
7427
7428 type LastModifiedInfo struct {
7429
7430 Time int64 `json:"time,omitempty,string"`
7431
7432
7433
7434
7435
7436 ForceSendFields []string `json:"-"`
7437
7438
7439
7440
7441 NullFields []string `json:"-"`
7442 }
7443
7444 func (s *LastModifiedInfo) MarshalJSON() ([]byte, error) {
7445 type NoMethod LastModifiedInfo
7446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7447 }
7448
7449
7450
7451 type ListPopulationClause struct {
7452
7453
7454 Terms []*ListPopulationTerm `json:"terms,omitempty"`
7455
7456
7457
7458
7459
7460 ForceSendFields []string `json:"-"`
7461
7462
7463
7464
7465 NullFields []string `json:"-"`
7466 }
7467
7468 func (s *ListPopulationClause) MarshalJSON() ([]byte, error) {
7469 type NoMethod ListPopulationClause
7470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7471 }
7472
7473
7474 type ListPopulationRule struct {
7475
7476
7477 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
7478
7479
7480 FloodlightActivityName string `json:"floodlightActivityName,omitempty"`
7481
7482
7483
7484 ListPopulationClauses []*ListPopulationClause `json:"listPopulationClauses,omitempty"`
7485
7486
7487
7488
7489
7490 ForceSendFields []string `json:"-"`
7491
7492
7493
7494
7495 NullFields []string `json:"-"`
7496 }
7497
7498 func (s *ListPopulationRule) MarshalJSON() ([]byte, error) {
7499 type NoMethod ListPopulationRule
7500 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7501 }
7502
7503
7504 type ListPopulationTerm struct {
7505
7506
7507
7508
7509 Contains bool `json:"contains,omitempty"`
7510
7511
7512
7513 Negation bool `json:"negation,omitempty"`
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525 Operator string `json:"operator,omitempty"`
7526
7527
7528 RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539 Type string `json:"type,omitempty"`
7540
7541
7542 Value string `json:"value,omitempty"`
7543
7544
7545
7546 VariableFriendlyName string `json:"variableFriendlyName,omitempty"`
7547
7548
7549
7550 VariableName string `json:"variableName,omitempty"`
7551
7552
7553
7554
7555
7556 ForceSendFields []string `json:"-"`
7557
7558
7559
7560
7561 NullFields []string `json:"-"`
7562 }
7563
7564 func (s *ListPopulationTerm) MarshalJSON() ([]byte, error) {
7565 type NoMethod ListPopulationTerm
7566 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7567 }
7568
7569
7570 type ListTargetingExpression struct {
7571
7572 Expression string `json:"expression,omitempty"`
7573
7574
7575
7576
7577
7578 ForceSendFields []string `json:"-"`
7579
7580
7581
7582
7583 NullFields []string `json:"-"`
7584 }
7585
7586 func (s *ListTargetingExpression) MarshalJSON() ([]byte, error) {
7587 type NoMethod ListTargetingExpression
7588 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7589 }
7590
7591
7592 type LookbackConfiguration struct {
7593
7594
7595
7596
7597
7598 ClickDuration int64 `json:"clickDuration,omitempty"`
7599
7600
7601
7602
7603
7604 PostImpressionActivitiesDuration int64 `json:"postImpressionActivitiesDuration,omitempty"`
7605
7606
7607
7608
7609
7610 ForceSendFields []string `json:"-"`
7611
7612
7613
7614
7615 NullFields []string `json:"-"`
7616 }
7617
7618 func (s *LookbackConfiguration) MarshalJSON() ([]byte, error) {
7619 type NoMethod LookbackConfiguration
7620 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7621 }
7622
7623 type MeasurementPartnerAdvertiserLink struct {
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635 LinkStatus string `json:"linkStatus,omitempty"`
7636
7637
7638
7639
7640
7641
7642 MeasurementPartner string `json:"measurementPartner,omitempty"`
7643
7644 PartnerAdvertiserId string `json:"partnerAdvertiserId,omitempty"`
7645
7646
7647
7648
7649
7650 ForceSendFields []string `json:"-"`
7651
7652
7653
7654
7655 NullFields []string `json:"-"`
7656 }
7657
7658 func (s *MeasurementPartnerAdvertiserLink) MarshalJSON() ([]byte, error) {
7659 type NoMethod MeasurementPartnerAdvertiserLink
7660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7661 }
7662
7663 type MeasurementPartnerCampaignLink struct {
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675 LinkStatus string `json:"linkStatus,omitempty"`
7676
7677
7678
7679
7680
7681
7682 MeasurementPartner string `json:"measurementPartner,omitempty"`
7683
7684
7685 PartnerCampaignId string `json:"partnerCampaignId,omitempty"`
7686
7687
7688
7689
7690
7691 ForceSendFields []string `json:"-"`
7692
7693
7694
7695
7696 NullFields []string `json:"-"`
7697 }
7698
7699 func (s *MeasurementPartnerCampaignLink) MarshalJSON() ([]byte, error) {
7700 type NoMethod MeasurementPartnerCampaignLink
7701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7702 }
7703
7704
7705 type MeasurementPartnerWrappingData struct {
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717 LinkStatus string `json:"linkStatus,omitempty"`
7718
7719
7720
7721
7722
7723
7724 MeasurementPartner string `json:"measurementPartner,omitempty"`
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742 TagWrappingMode string `json:"tagWrappingMode,omitempty"`
7743
7744 WrappedTag string `json:"wrappedTag,omitempty"`
7745
7746
7747
7748
7749
7750 ForceSendFields []string `json:"-"`
7751
7752
7753
7754
7755 NullFields []string `json:"-"`
7756 }
7757
7758 func (s *MeasurementPartnerWrappingData) MarshalJSON() ([]byte, error) {
7759 type NoMethod MeasurementPartnerWrappingData
7760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7761 }
7762
7763
7764 type Metric struct {
7765
7766 Kind string `json:"kind,omitempty"`
7767
7768 Name string `json:"name,omitempty"`
7769
7770
7771
7772
7773
7774 ForceSendFields []string `json:"-"`
7775
7776
7777
7778
7779 NullFields []string `json:"-"`
7780 }
7781
7782 func (s *Metric) MarshalJSON() ([]byte, error) {
7783 type NoMethod Metric
7784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7785 }
7786
7787
7788
7789 type Metro struct {
7790
7791 CountryCode string `json:"countryCode,omitempty"`
7792
7793 CountryDartId int64 `json:"countryDartId,omitempty,string"`
7794
7795 DartId int64 `json:"dartId,omitempty,string"`
7796
7797
7798 DmaId int64 `json:"dmaId,omitempty,string"`
7799
7800
7801 Kind string `json:"kind,omitempty"`
7802
7803 MetroCode string `json:"metroCode,omitempty"`
7804
7805 Name string `json:"name,omitempty"`
7806
7807
7808
7809
7810
7811 ForceSendFields []string `json:"-"`
7812
7813
7814
7815
7816 NullFields []string `json:"-"`
7817 }
7818
7819 func (s *Metro) MarshalJSON() ([]byte, error) {
7820 type NoMethod Metro
7821 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7822 }
7823
7824
7825 type MetrosListResponse struct {
7826
7827
7828 Kind string `json:"kind,omitempty"`
7829
7830 Metros []*Metro `json:"metros,omitempty"`
7831
7832
7833 googleapi.ServerResponse `json:"-"`
7834
7835
7836
7837
7838
7839 ForceSendFields []string `json:"-"`
7840
7841
7842
7843
7844 NullFields []string `json:"-"`
7845 }
7846
7847 func (s *MetrosListResponse) MarshalJSON() ([]byte, error) {
7848 type NoMethod MetrosListResponse
7849 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7850 }
7851
7852
7853
7854 type MobileApp struct {
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869 Directory string `json:"directory,omitempty"`
7870
7871 Id string `json:"id,omitempty"`
7872
7873
7874 Kind string `json:"kind,omitempty"`
7875
7876 PublisherName string `json:"publisherName,omitempty"`
7877
7878 Title string `json:"title,omitempty"`
7879
7880
7881 googleapi.ServerResponse `json:"-"`
7882
7883
7884
7885
7886
7887 ForceSendFields []string `json:"-"`
7888
7889
7890
7891
7892 NullFields []string `json:"-"`
7893 }
7894
7895 func (s *MobileApp) MarshalJSON() ([]byte, error) {
7896 type NoMethod MobileApp
7897 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7898 }
7899
7900
7901 type MobileAppsListResponse struct {
7902
7903
7904 Kind string `json:"kind,omitempty"`
7905
7906 MobileApps []*MobileApp `json:"mobileApps,omitempty"`
7907
7908 NextPageToken string `json:"nextPageToken,omitempty"`
7909
7910
7911 googleapi.ServerResponse `json:"-"`
7912
7913
7914
7915
7916
7917 ForceSendFields []string `json:"-"`
7918
7919
7920
7921
7922 NullFields []string `json:"-"`
7923 }
7924
7925 func (s *MobileAppsListResponse) MarshalJSON() ([]byte, error) {
7926 type NoMethod MobileAppsListResponse
7927 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7928 }
7929
7930
7931
7932 type MobileCarrier struct {
7933
7934
7935 CountryCode string `json:"countryCode,omitempty"`
7936
7937 CountryDartId int64 `json:"countryDartId,omitempty,string"`
7938
7939 Id int64 `json:"id,omitempty,string"`
7940
7941
7942 Kind string `json:"kind,omitempty"`
7943
7944 Name string `json:"name,omitempty"`
7945
7946
7947 googleapi.ServerResponse `json:"-"`
7948
7949
7950
7951
7952
7953 ForceSendFields []string `json:"-"`
7954
7955
7956
7957
7958 NullFields []string `json:"-"`
7959 }
7960
7961 func (s *MobileCarrier) MarshalJSON() ([]byte, error) {
7962 type NoMethod MobileCarrier
7963 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7964 }
7965
7966
7967 type MobileCarriersListResponse struct {
7968
7969
7970 Kind string `json:"kind,omitempty"`
7971
7972 MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
7973
7974
7975 googleapi.ServerResponse `json:"-"`
7976
7977
7978
7979
7980
7981 ForceSendFields []string `json:"-"`
7982
7983
7984
7985
7986 NullFields []string `json:"-"`
7987 }
7988
7989 func (s *MobileCarriersListResponse) MarshalJSON() ([]byte, error) {
7990 type NoMethod MobileCarriersListResponse
7991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
7992 }
7993
7994
7995 type ObaIcon struct {
7996
7997 IconClickThroughUrl string `json:"iconClickThroughUrl,omitempty"`
7998
7999 IconClickTrackingUrl string `json:"iconClickTrackingUrl,omitempty"`
8000
8001 IconViewTrackingUrl string `json:"iconViewTrackingUrl,omitempty"`
8002
8003
8004 Program string `json:"program,omitempty"`
8005
8006
8007 ResourceUrl string `json:"resourceUrl,omitempty"`
8008
8009 Size *Size `json:"size,omitempty"`
8010
8011
8012 XPosition string `json:"xPosition,omitempty"`
8013
8014
8015 YPosition string `json:"yPosition,omitempty"`
8016
8017
8018
8019
8020
8021 ForceSendFields []string `json:"-"`
8022
8023
8024
8025
8026 NullFields []string `json:"-"`
8027 }
8028
8029 func (s *ObaIcon) MarshalJSON() ([]byte, error) {
8030 type NoMethod ObaIcon
8031 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8032 }
8033
8034
8035 type ObjectFilter struct {
8036
8037
8038 Kind string `json:"kind,omitempty"`
8039
8040
8041 ObjectIds googleapi.Int64s `json:"objectIds,omitempty"`
8042
8043
8044
8045
8046
8047
8048
8049
8050 Status string `json:"status,omitempty"`
8051
8052
8053
8054
8055
8056 ForceSendFields []string `json:"-"`
8057
8058
8059
8060
8061 NullFields []string `json:"-"`
8062 }
8063
8064 func (s *ObjectFilter) MarshalJSON() ([]byte, error) {
8065 type NoMethod ObjectFilter
8066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8067 }
8068
8069
8070 type OfflineUserAddressInfo struct {
8071
8072 City string `json:"city,omitempty"`
8073
8074
8075 CountryCode string `json:"countryCode,omitempty"`
8076
8077
8078
8079 HashedFirstName string `json:"hashedFirstName,omitempty"`
8080
8081
8082 HashedLastName string `json:"hashedLastName,omitempty"`
8083
8084
8085 HashedStreetAddress string `json:"hashedStreetAddress,omitempty"`
8086
8087 PostalCode string `json:"postalCode,omitempty"`
8088
8089 State string `json:"state,omitempty"`
8090
8091
8092
8093
8094
8095 ForceSendFields []string `json:"-"`
8096
8097
8098
8099
8100 NullFields []string `json:"-"`
8101 }
8102
8103 func (s *OfflineUserAddressInfo) MarshalJSON() ([]byte, error) {
8104 type NoMethod OfflineUserAddressInfo
8105 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8106 }
8107
8108
8109 type OffsetPosition struct {
8110
8111 Left int64 `json:"left,omitempty"`
8112
8113 Top int64 `json:"top,omitempty"`
8114
8115
8116
8117
8118
8119 ForceSendFields []string `json:"-"`
8120
8121
8122
8123
8124 NullFields []string `json:"-"`
8125 }
8126
8127 func (s *OffsetPosition) MarshalJSON() ([]byte, error) {
8128 type NoMethod OffsetPosition
8129 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8130 }
8131
8132
8133 type OmnitureSettings struct {
8134
8135
8136
8137 OmnitureCostDataEnabled bool `json:"omnitureCostDataEnabled,omitempty"`
8138
8139
8140
8141 OmnitureIntegrationEnabled bool `json:"omnitureIntegrationEnabled,omitempty"`
8142
8143
8144
8145
8146
8147 ForceSendFields []string `json:"-"`
8148
8149
8150
8151
8152 NullFields []string `json:"-"`
8153 }
8154
8155 func (s *OmnitureSettings) MarshalJSON() ([]byte, error) {
8156 type NoMethod OmnitureSettings
8157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8158 }
8159
8160
8161
8162 type OperatingSystem struct {
8163
8164 DartId int64 `json:"dartId,omitempty,string"`
8165
8166 Desktop bool `json:"desktop,omitempty"`
8167
8168
8169 Kind string `json:"kind,omitempty"`
8170
8171 Mobile bool `json:"mobile,omitempty"`
8172
8173 Name string `json:"name,omitempty"`
8174
8175
8176 googleapi.ServerResponse `json:"-"`
8177
8178
8179
8180
8181
8182 ForceSendFields []string `json:"-"`
8183
8184
8185
8186
8187 NullFields []string `json:"-"`
8188 }
8189
8190 func (s *OperatingSystem) MarshalJSON() ([]byte, error) {
8191 type NoMethod OperatingSystem
8192 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8193 }
8194
8195
8196
8197 type OperatingSystemVersion struct {
8198
8199 Id int64 `json:"id,omitempty,string"`
8200
8201
8202 Kind string `json:"kind,omitempty"`
8203
8204
8205 MajorVersion string `json:"majorVersion,omitempty"`
8206
8207
8208 MinorVersion string `json:"minorVersion,omitempty"`
8209
8210 Name string `json:"name,omitempty"`
8211
8212 OperatingSystem *OperatingSystem `json:"operatingSystem,omitempty"`
8213
8214
8215 googleapi.ServerResponse `json:"-"`
8216
8217
8218
8219
8220
8221 ForceSendFields []string `json:"-"`
8222
8223
8224
8225
8226 NullFields []string `json:"-"`
8227 }
8228
8229 func (s *OperatingSystemVersion) MarshalJSON() ([]byte, error) {
8230 type NoMethod OperatingSystemVersion
8231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8232 }
8233
8234
8235 type OperatingSystemVersionsListResponse struct {
8236
8237
8238 Kind string `json:"kind,omitempty"`
8239
8240 OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
8241
8242
8243 googleapi.ServerResponse `json:"-"`
8244
8245
8246
8247
8248
8249 ForceSendFields []string `json:"-"`
8250
8251
8252
8253
8254 NullFields []string `json:"-"`
8255 }
8256
8257 func (s *OperatingSystemVersionsListResponse) MarshalJSON() ([]byte, error) {
8258 type NoMethod OperatingSystemVersionsListResponse
8259 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8260 }
8261
8262
8263 type OperatingSystemsListResponse struct {
8264
8265
8266 Kind string `json:"kind,omitempty"`
8267
8268 OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
8269
8270
8271 googleapi.ServerResponse `json:"-"`
8272
8273
8274
8275
8276
8277 ForceSendFields []string `json:"-"`
8278
8279
8280
8281
8282 NullFields []string `json:"-"`
8283 }
8284
8285 func (s *OperatingSystemsListResponse) MarshalJSON() ([]byte, error) {
8286 type NoMethod OperatingSystemsListResponse
8287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8288 }
8289
8290
8291 type OptimizationActivity struct {
8292
8293
8294 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
8295
8296
8297 FloodlightActivityIdDimensionValue *DimensionValue `json:"floodlightActivityIdDimensionValue,omitempty"`
8298
8299
8300
8301 Weight int64 `json:"weight,omitempty"`
8302
8303
8304
8305
8306
8307 ForceSendFields []string `json:"-"`
8308
8309
8310
8311
8312 NullFields []string `json:"-"`
8313 }
8314
8315 func (s *OptimizationActivity) MarshalJSON() ([]byte, error) {
8316 type NoMethod OptimizationActivity
8317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8318 }
8319
8320
8321 type Order struct {
8322
8323 AccountId int64 `json:"accountId,omitempty,string"`
8324
8325 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8326
8327
8328 ApproverUserProfileIds googleapi.Int64s `json:"approverUserProfileIds,omitempty"`
8329
8330 BuyerInvoiceId string `json:"buyerInvoiceId,omitempty"`
8331
8332 BuyerOrganizationName string `json:"buyerOrganizationName,omitempty"`
8333
8334 Comments string `json:"comments,omitempty"`
8335
8336 Contacts []*OrderContact `json:"contacts,omitempty"`
8337
8338 Id int64 `json:"id,omitempty,string"`
8339
8340
8341 Kind string `json:"kind,omitempty"`
8342
8343
8344 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8345
8346 Name string `json:"name,omitempty"`
8347
8348 Notes string `json:"notes,omitempty"`
8349
8350 PlanningTermId int64 `json:"planningTermId,omitempty,string"`
8351
8352 ProjectId int64 `json:"projectId,omitempty,string"`
8353
8354 SellerOrderId string `json:"sellerOrderId,omitempty"`
8355
8356 SellerOrganizationName string `json:"sellerOrganizationName,omitempty"`
8357
8358 SiteId googleapi.Int64s `json:"siteId,omitempty"`
8359
8360 SiteNames []string `json:"siteNames,omitempty"`
8361
8362 SubaccountId int64 `json:"subaccountId,omitempty,string"`
8363
8364 TermsAndConditions string `json:"termsAndConditions,omitempty"`
8365
8366
8367 googleapi.ServerResponse `json:"-"`
8368
8369
8370
8371
8372
8373 ForceSendFields []string `json:"-"`
8374
8375
8376
8377
8378 NullFields []string `json:"-"`
8379 }
8380
8381 func (s *Order) MarshalJSON() ([]byte, error) {
8382 type NoMethod Order
8383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8384 }
8385
8386
8387 type OrderContact struct {
8388
8389
8390
8391 ContactInfo string `json:"contactInfo,omitempty"`
8392
8393 ContactName string `json:"contactName,omitempty"`
8394
8395 ContactTitle string `json:"contactTitle,omitempty"`
8396
8397
8398
8399
8400
8401
8402 ContactType string `json:"contactType,omitempty"`
8403
8404
8405 SignatureUserProfileId int64 `json:"signatureUserProfileId,omitempty,string"`
8406
8407
8408
8409
8410
8411 ForceSendFields []string `json:"-"`
8412
8413
8414
8415
8416 NullFields []string `json:"-"`
8417 }
8418
8419 func (s *OrderContact) MarshalJSON() ([]byte, error) {
8420 type NoMethod OrderContact
8421 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8422 }
8423
8424
8425 type OrdersListResponse struct {
8426
8427
8428 Kind string `json:"kind,omitempty"`
8429
8430 NextPageToken string `json:"nextPageToken,omitempty"`
8431
8432 Orders []*Order `json:"orders,omitempty"`
8433
8434
8435 googleapi.ServerResponse `json:"-"`
8436
8437
8438
8439
8440
8441 ForceSendFields []string `json:"-"`
8442
8443
8444
8445
8446 NullFields []string `json:"-"`
8447 }
8448
8449 func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
8450 type NoMethod OrdersListResponse
8451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8452 }
8453
8454
8455 type PathFilter struct {
8456
8457 EventFilters []*EventFilter `json:"eventFilters,omitempty"`
8458
8459 Kind string `json:"kind,omitempty"`
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471 PathMatchPosition string `json:"pathMatchPosition,omitempty"`
8472
8473
8474
8475
8476
8477 ForceSendFields []string `json:"-"`
8478
8479
8480
8481
8482 NullFields []string `json:"-"`
8483 }
8484
8485 func (s *PathFilter) MarshalJSON() ([]byte, error) {
8486 type NoMethod PathFilter
8487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8488 }
8489
8490
8491
8492 type PathReportCompatibleFields struct {
8493
8494
8495 ChannelGroupings []*Dimension `json:"channelGroupings,omitempty"`
8496
8497
8498 Dimensions []*Dimension `json:"dimensions,omitempty"`
8499
8500
8501 Kind string `json:"kind,omitempty"`
8502
8503
8504 Metrics []*Metric `json:"metrics,omitempty"`
8505
8506
8507 PathFilters []*Dimension `json:"pathFilters,omitempty"`
8508
8509
8510
8511
8512
8513 ForceSendFields []string `json:"-"`
8514
8515
8516
8517
8518 NullFields []string `json:"-"`
8519 }
8520
8521 func (s *PathReportCompatibleFields) MarshalJSON() ([]byte, error) {
8522 type NoMethod PathReportCompatibleFields
8523 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8524 }
8525
8526
8527 type PathReportDimensionValue struct {
8528
8529 DimensionName string `json:"dimensionName,omitempty"`
8530
8531 Ids []string `json:"ids,omitempty"`
8532
8533
8534 Kind string `json:"kind,omitempty"`
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546 MatchType string `json:"matchType,omitempty"`
8547
8548 Values []string `json:"values,omitempty"`
8549
8550
8551
8552
8553
8554 ForceSendFields []string `json:"-"`
8555
8556
8557
8558
8559 NullFields []string `json:"-"`
8560 }
8561
8562 func (s *PathReportDimensionValue) MarshalJSON() ([]byte, error) {
8563 type NoMethod PathReportDimensionValue
8564 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8565 }
8566
8567
8568
8569 type PathToConversionReportCompatibleFields struct {
8570
8571
8572 ConversionDimensions []*Dimension `json:"conversionDimensions,omitempty"`
8573
8574
8575 CustomFloodlightVariables []*Dimension `json:"customFloodlightVariables,omitempty"`
8576
8577
8578 Kind string `json:"kind,omitempty"`
8579
8580
8581 Metrics []*Metric `json:"metrics,omitempty"`
8582
8583
8584 PerInteractionDimensions []*Dimension `json:"perInteractionDimensions,omitempty"`
8585
8586
8587
8588
8589
8590 ForceSendFields []string `json:"-"`
8591
8592
8593
8594
8595 NullFields []string `json:"-"`
8596 }
8597
8598 func (s *PathToConversionReportCompatibleFields) MarshalJSON() ([]byte, error) {
8599 type NoMethod PathToConversionReportCompatibleFields
8600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8601 }
8602
8603
8604 type Placement struct {
8605
8606 AccountId int64 `json:"accountId,omitempty,string"`
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616 ActiveStatus string `json:"activeStatus,omitempty"`
8617
8618
8619
8620 AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
8621
8622
8623 AdditionalSizes []*Size `json:"additionalSizes,omitempty"`
8624
8625 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8626
8627
8628 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
8629
8630
8631 CampaignId int64 `json:"campaignId,omitempty,string"`
8632
8633
8634 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
8635
8636 Comment string `json:"comment,omitempty"`
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651 Compatibility string `json:"compatibility,omitempty"`
8652
8653 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8654
8655
8656 ConversionDomainOverride *PlacementConversionDomainOverride `json:"conversionDomainOverride,omitempty"`
8657
8658
8659 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
8660
8661
8662
8663
8664 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
8665
8666
8667 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
8668
8669 ExternalId string `json:"externalId,omitempty"`
8670
8671 Id int64 `json:"id,omitempty,string"`
8672
8673
8674 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
8675
8676
8677 KeyName string `json:"keyName,omitempty"`
8678
8679
8680 Kind string `json:"kind,omitempty"`
8681
8682
8683 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8684
8685 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
8686
8687
8688 Name string `json:"name,omitempty"`
8689
8690
8691 PartnerWrappingData *MeasurementPartnerWrappingData `json:"partnerWrappingData,omitempty"`
8692
8693
8694 PaymentApproved bool `json:"paymentApproved,omitempty"`
8695
8696
8697
8698
8699
8700
8701 PaymentSource string `json:"paymentSource,omitempty"`
8702
8703 PlacementGroupId int64 `json:"placementGroupId,omitempty,string"`
8704
8705
8706 PlacementGroupIdDimensionValue *DimensionValue `json:"placementGroupIdDimensionValue,omitempty"`
8707
8708
8709 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8710
8711
8712 PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
8713
8714
8715
8716
8717
8718 Primary bool `json:"primary,omitempty"`
8719
8720
8721 PublisherUpdateInfo *LastModifiedInfo `json:"publisherUpdateInfo,omitempty"`
8722
8723
8724
8725
8726 SiteId int64 `json:"siteId,omitempty,string"`
8727
8728
8729 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
8730
8731
8732
8733 Size *Size `json:"size,omitempty"`
8734
8735
8736 SslRequired bool `json:"sslRequired,omitempty"`
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749 Status string `json:"status,omitempty"`
8750
8751 SubaccountId int64 `json:"subaccountId,omitempty,string"`
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785 TagFormats []string `json:"tagFormats,omitempty"`
8786
8787 TagSetting *TagSetting `json:"tagSetting,omitempty"`
8788
8789
8790
8791
8792
8793
8794
8795
8796 VideoActiveViewOptOut bool `json:"videoActiveViewOptOut,omitempty"`
8797
8798
8799
8800 VideoSettings *VideoSettings `json:"videoSettings,omitempty"`
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811 VpaidAdapterChoice string `json:"vpaidAdapterChoice,omitempty"`
8812
8813 WrappingOptOut bool `json:"wrappingOptOut,omitempty"`
8814
8815
8816 googleapi.ServerResponse `json:"-"`
8817
8818
8819
8820
8821
8822 ForceSendFields []string `json:"-"`
8823
8824
8825
8826
8827 NullFields []string `json:"-"`
8828 }
8829
8830 func (s *Placement) MarshalJSON() ([]byte, error) {
8831 type NoMethod Placement
8832 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8833 }
8834
8835
8836 type PlacementAssignment struct {
8837
8838
8839 Active bool `json:"active,omitempty"`
8840
8841 PlacementId int64 `json:"placementId,omitempty,string"`
8842
8843
8844 PlacementIdDimensionValue *DimensionValue `json:"placementIdDimensionValue,omitempty"`
8845
8846
8847 SslRequired bool `json:"sslRequired,omitempty"`
8848
8849
8850
8851
8852
8853 ForceSendFields []string `json:"-"`
8854
8855
8856
8857
8858 NullFields []string `json:"-"`
8859 }
8860
8861 func (s *PlacementAssignment) MarshalJSON() ([]byte, error) {
8862 type NoMethod PlacementAssignment
8863 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8864 }
8865
8866 type PlacementConversionDomainOverride struct {
8867 ConversionDomains []*PlacementSingleConversionDomain `json:"conversionDomains,omitempty"`
8868
8869
8870
8871
8872
8873 ForceSendFields []string `json:"-"`
8874
8875
8876
8877
8878 NullFields []string `json:"-"`
8879 }
8880
8881 func (s *PlacementConversionDomainOverride) MarshalJSON() ([]byte, error) {
8882 type NoMethod PlacementConversionDomainOverride
8883 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
8884 }
8885
8886
8887 type PlacementGroup struct {
8888
8889
8890 AccountId int64 `json:"accountId,omitempty,string"`
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900 ActiveStatus string `json:"activeStatus,omitempty"`
8901
8902
8903 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
8904
8905
8906 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
8907
8908
8909 CampaignId int64 `json:"campaignId,omitempty,string"`
8910
8911
8912 CampaignIdDimensionValue *DimensionValue `json:"campaignIdDimensionValue,omitempty"`
8913
8914
8915 ChildPlacementIds googleapi.Int64s `json:"childPlacementIds,omitempty"`
8916
8917 Comment string `json:"comment,omitempty"`
8918
8919
8920 ContentCategoryId int64 `json:"contentCategoryId,omitempty,string"`
8921
8922
8923 CreateInfo *LastModifiedInfo `json:"createInfo,omitempty"`
8924
8925
8926
8927
8928 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
8929
8930
8931 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
8932
8933 ExternalId string `json:"externalId,omitempty"`
8934
8935 Id int64 `json:"id,omitempty,string"`
8936
8937
8938 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
8939
8940
8941 Kind string `json:"kind,omitempty"`
8942
8943
8944 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
8945
8946
8947 Name string `json:"name,omitempty"`
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962 PlacementGroupType string `json:"placementGroupType,omitempty"`
8963
8964
8965 PlacementStrategyId int64 `json:"placementStrategyId,omitempty,string"`
8966
8967
8968 PricingSchedule *PricingSchedule `json:"pricingSchedule,omitempty"`
8969
8970
8971
8972
8973 PrimaryPlacementId int64 `json:"primaryPlacementId,omitempty,string"`
8974
8975
8976 PrimaryPlacementIdDimensionValue *DimensionValue `json:"primaryPlacementIdDimensionValue,omitempty"`
8977
8978
8979
8980
8981 SiteId int64 `json:"siteId,omitempty,string"`
8982
8983
8984 SiteIdDimensionValue *DimensionValue `json:"siteIdDimensionValue,omitempty"`
8985
8986
8987 SubaccountId int64 `json:"subaccountId,omitempty,string"`
8988
8989
8990 googleapi.ServerResponse `json:"-"`
8991
8992
8993
8994
8995
8996 ForceSendFields []string `json:"-"`
8997
8998
8999
9000
9001 NullFields []string `json:"-"`
9002 }
9003
9004 func (s *PlacementGroup) MarshalJSON() ([]byte, error) {
9005 type NoMethod PlacementGroup
9006 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9007 }
9008
9009
9010 type PlacementGroupsListResponse struct {
9011
9012
9013 Kind string `json:"kind,omitempty"`
9014
9015 NextPageToken string `json:"nextPageToken,omitempty"`
9016
9017 PlacementGroups []*PlacementGroup `json:"placementGroups,omitempty"`
9018
9019
9020 googleapi.ServerResponse `json:"-"`
9021
9022
9023
9024
9025
9026 ForceSendFields []string `json:"-"`
9027
9028
9029
9030
9031 NullFields []string `json:"-"`
9032 }
9033
9034 func (s *PlacementGroupsListResponse) MarshalJSON() ([]byte, error) {
9035 type NoMethod PlacementGroupsListResponse
9036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9037 }
9038
9039 type PlacementSingleConversionDomain struct {
9040 ConversionDomainId int64 `json:"conversionDomainId,omitempty,string"`
9041 ConversionDomainValue string `json:"conversionDomainValue,omitempty"`
9042
9043
9044
9045
9046
9047 ForceSendFields []string `json:"-"`
9048
9049
9050
9051
9052 NullFields []string `json:"-"`
9053 }
9054
9055 func (s *PlacementSingleConversionDomain) MarshalJSON() ([]byte, error) {
9056 type NoMethod PlacementSingleConversionDomain
9057 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9058 }
9059
9060
9061 type PlacementStrategiesListResponse struct {
9062
9063
9064 Kind string `json:"kind,omitempty"`
9065
9066 NextPageToken string `json:"nextPageToken,omitempty"`
9067
9068 PlacementStrategies []*PlacementStrategy `json:"placementStrategies,omitempty"`
9069
9070
9071 googleapi.ServerResponse `json:"-"`
9072
9073
9074
9075
9076
9077 ForceSendFields []string `json:"-"`
9078
9079
9080
9081
9082 NullFields []string `json:"-"`
9083 }
9084
9085 func (s *PlacementStrategiesListResponse) MarshalJSON() ([]byte, error) {
9086 type NoMethod PlacementStrategiesListResponse
9087 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9088 }
9089
9090
9091 type PlacementStrategy struct {
9092
9093
9094 AccountId int64 `json:"accountId,omitempty,string"`
9095
9096
9097 Id int64 `json:"id,omitempty,string"`
9098
9099
9100 Kind string `json:"kind,omitempty"`
9101
9102
9103
9104 Name string `json:"name,omitempty"`
9105
9106
9107 googleapi.ServerResponse `json:"-"`
9108
9109
9110
9111
9112
9113 ForceSendFields []string `json:"-"`
9114
9115
9116
9117
9118 NullFields []string `json:"-"`
9119 }
9120
9121 func (s *PlacementStrategy) MarshalJSON() ([]byte, error) {
9122 type NoMethod PlacementStrategy
9123 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9124 }
9125
9126
9127 type PlacementTag struct {
9128
9129 PlacementId int64 `json:"placementId,omitempty,string"`
9130
9131 TagDatas []*TagData `json:"tagDatas,omitempty"`
9132
9133
9134
9135
9136
9137 ForceSendFields []string `json:"-"`
9138
9139
9140
9141
9142 NullFields []string `json:"-"`
9143 }
9144
9145 func (s *PlacementTag) MarshalJSON() ([]byte, error) {
9146 type NoMethod PlacementTag
9147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9148 }
9149
9150
9151 type PlacementsGenerateTagsResponse struct {
9152
9153
9154 Kind string `json:"kind,omitempty"`
9155
9156 PlacementTags []*PlacementTag `json:"placementTags,omitempty"`
9157
9158
9159 googleapi.ServerResponse `json:"-"`
9160
9161
9162
9163
9164
9165 ForceSendFields []string `json:"-"`
9166
9167
9168
9169
9170 NullFields []string `json:"-"`
9171 }
9172
9173 func (s *PlacementsGenerateTagsResponse) MarshalJSON() ([]byte, error) {
9174 type NoMethod PlacementsGenerateTagsResponse
9175 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9176 }
9177
9178
9179 type PlacementsListResponse struct {
9180
9181
9182 Kind string `json:"kind,omitempty"`
9183
9184 NextPageToken string `json:"nextPageToken,omitempty"`
9185
9186 Placements []*Placement `json:"placements,omitempty"`
9187
9188
9189 googleapi.ServerResponse `json:"-"`
9190
9191
9192
9193
9194
9195 ForceSendFields []string `json:"-"`
9196
9197
9198
9199
9200 NullFields []string `json:"-"`
9201 }
9202
9203 func (s *PlacementsListResponse) MarshalJSON() ([]byte, error) {
9204 type NoMethod PlacementsListResponse
9205 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9206 }
9207
9208
9209
9210 type PlatformType struct {
9211
9212 Id int64 `json:"id,omitempty,string"`
9213
9214
9215 Kind string `json:"kind,omitempty"`
9216
9217 Name string `json:"name,omitempty"`
9218
9219
9220 googleapi.ServerResponse `json:"-"`
9221
9222
9223
9224
9225
9226 ForceSendFields []string `json:"-"`
9227
9228
9229
9230
9231 NullFields []string `json:"-"`
9232 }
9233
9234 func (s *PlatformType) MarshalJSON() ([]byte, error) {
9235 type NoMethod PlatformType
9236 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9237 }
9238
9239
9240 type PlatformTypesListResponse struct {
9241
9242
9243 Kind string `json:"kind,omitempty"`
9244
9245 PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
9246
9247
9248 googleapi.ServerResponse `json:"-"`
9249
9250
9251
9252
9253
9254 ForceSendFields []string `json:"-"`
9255
9256
9257
9258
9259 NullFields []string `json:"-"`
9260 }
9261
9262 func (s *PlatformTypesListResponse) MarshalJSON() ([]byte, error) {
9263 type NoMethod PlatformTypesListResponse
9264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9265 }
9266
9267
9268 type PopupWindowProperties struct {
9269
9270
9271 Dimension *Size `json:"dimension,omitempty"`
9272
9273
9274 Offset *OffsetPosition `json:"offset,omitempty"`
9275
9276
9277
9278
9279
9280
9281 PositionType string `json:"positionType,omitempty"`
9282
9283 ShowAddressBar bool `json:"showAddressBar,omitempty"`
9284
9285 ShowMenuBar bool `json:"showMenuBar,omitempty"`
9286
9287 ShowScrollBar bool `json:"showScrollBar,omitempty"`
9288
9289 ShowStatusBar bool `json:"showStatusBar,omitempty"`
9290
9291 ShowToolBar bool `json:"showToolBar,omitempty"`
9292
9293 Title string `json:"title,omitempty"`
9294
9295
9296
9297
9298
9299 ForceSendFields []string `json:"-"`
9300
9301
9302
9303
9304 NullFields []string `json:"-"`
9305 }
9306
9307 func (s *PopupWindowProperties) MarshalJSON() ([]byte, error) {
9308 type NoMethod PopupWindowProperties
9309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9310 }
9311
9312
9313
9314 type PostalCode struct {
9315
9316 Code string `json:"code,omitempty"`
9317
9318 CountryCode string `json:"countryCode,omitempty"`
9319
9320 CountryDartId int64 `json:"countryDartId,omitempty,string"`
9321
9322 Id string `json:"id,omitempty"`
9323
9324
9325 Kind string `json:"kind,omitempty"`
9326
9327
9328 googleapi.ServerResponse `json:"-"`
9329
9330
9331
9332
9333
9334 ForceSendFields []string `json:"-"`
9335
9336
9337
9338
9339 NullFields []string `json:"-"`
9340 }
9341
9342 func (s *PostalCode) MarshalJSON() ([]byte, error) {
9343 type NoMethod PostalCode
9344 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9345 }
9346
9347
9348 type PostalCodesListResponse struct {
9349
9350
9351 Kind string `json:"kind,omitempty"`
9352
9353 PostalCodes []*PostalCode `json:"postalCodes,omitempty"`
9354
9355
9356 googleapi.ServerResponse `json:"-"`
9357
9358
9359
9360
9361
9362 ForceSendFields []string `json:"-"`
9363
9364
9365
9366
9367 NullFields []string `json:"-"`
9368 }
9369
9370 func (s *PostalCodesListResponse) MarshalJSON() ([]byte, error) {
9371 type NoMethod PostalCodesListResponse
9372 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9373 }
9374
9375 type Pricing struct {
9376
9377
9378
9379
9380
9381
9382 CapCostType string `json:"capCostType,omitempty"`
9383 EndDate string `json:"endDate,omitempty"`
9384
9385
9386
9387 Flights []*Flight `json:"flights,omitempty"`
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405 GroupType string `json:"groupType,omitempty"`
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417 PricingType string `json:"pricingType,omitempty"`
9418 StartDate string `json:"startDate,omitempty"`
9419
9420
9421
9422
9423
9424 ForceSendFields []string `json:"-"`
9425
9426
9427
9428
9429 NullFields []string `json:"-"`
9430 }
9431
9432 func (s *Pricing) MarshalJSON() ([]byte, error) {
9433 type NoMethod Pricing
9434 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9435 }
9436
9437
9438 type PricingSchedule struct {
9439
9440
9441
9442
9443
9444
9445 CapCostOption string `json:"capCostOption,omitempty"`
9446 EndDate string `json:"endDate,omitempty"`
9447
9448
9449 Flighted bool `json:"flighted,omitempty"`
9450
9451
9452
9453 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"`
9454
9455 PricingPeriods []*PricingSchedulePricingPeriod `json:"pricingPeriods,omitempty"`
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465 PricingType string `json:"pricingType,omitempty"`
9466 StartDate string `json:"startDate,omitempty"`
9467 TestingStartDate string `json:"testingStartDate,omitempty"`
9468
9469
9470
9471
9472
9473 ForceSendFields []string `json:"-"`
9474
9475
9476
9477
9478 NullFields []string `json:"-"`
9479 }
9480
9481 func (s *PricingSchedule) MarshalJSON() ([]byte, error) {
9482 type NoMethod PricingSchedule
9483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9484 }
9485
9486
9487 type PricingSchedulePricingPeriod struct {
9488 EndDate string `json:"endDate,omitempty"`
9489
9490 PricingComment string `json:"pricingComment,omitempty"`
9491
9492
9493
9494 RateOrCostNanos int64 `json:"rateOrCostNanos,omitempty,string"`
9495 StartDate string `json:"startDate,omitempty"`
9496
9497
9498 Units int64 `json:"units,omitempty,string"`
9499
9500
9501
9502
9503
9504 ForceSendFields []string `json:"-"`
9505
9506
9507
9508
9509 NullFields []string `json:"-"`
9510 }
9511
9512 func (s *PricingSchedulePricingPeriod) MarshalJSON() ([]byte, error) {
9513 type NoMethod PricingSchedulePricingPeriod
9514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9515 }
9516
9517
9518 type Project struct {
9519
9520 AccountId int64 `json:"accountId,omitempty,string"`
9521
9522 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533 AudienceAgeGroup string `json:"audienceAgeGroup,omitempty"`
9534
9535
9536
9537
9538
9539 AudienceGender string `json:"audienceGender,omitempty"`
9540
9541
9542
9543
9544 Budget int64 `json:"budget,omitempty,string"`
9545
9546 ClientBillingCode string `json:"clientBillingCode,omitempty"`
9547
9548 ClientName string `json:"clientName,omitempty"`
9549 EndDate string `json:"endDate,omitempty"`
9550
9551 Id int64 `json:"id,omitempty,string"`
9552
9553
9554 Kind string `json:"kind,omitempty"`
9555
9556
9557 LastModifiedInfo *LastModifiedInfo `json:"lastModifiedInfo,omitempty"`
9558
9559 Name string `json:"name,omitempty"`
9560
9561 Overview string `json:"overview,omitempty"`
9562 StartDate string `json:"startDate,omitempty"`
9563
9564 SubaccountId int64 `json:"subaccountId,omitempty,string"`
9565
9566 TargetClicks int64 `json:"targetClicks,omitempty,string"`
9567
9568 TargetConversions int64 `json:"targetConversions,omitempty,string"`
9569
9570 TargetCpaNanos int64 `json:"targetCpaNanos,omitempty,string"`
9571
9572 TargetCpcNanos int64 `json:"targetCpcNanos,omitempty,string"`
9573
9574
9575 TargetCpmActiveViewNanos int64 `json:"targetCpmActiveViewNanos,omitempty,string"`
9576
9577 TargetCpmNanos int64 `json:"targetCpmNanos,omitempty,string"`
9578
9579 TargetImpressions int64 `json:"targetImpressions,omitempty,string"`
9580
9581
9582 googleapi.ServerResponse `json:"-"`
9583
9584
9585
9586
9587
9588 ForceSendFields []string `json:"-"`
9589
9590
9591
9592
9593 NullFields []string `json:"-"`
9594 }
9595
9596 func (s *Project) MarshalJSON() ([]byte, error) {
9597 type NoMethod Project
9598 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9599 }
9600
9601
9602 type ProjectsListResponse struct {
9603
9604
9605 Kind string `json:"kind,omitempty"`
9606
9607 NextPageToken string `json:"nextPageToken,omitempty"`
9608
9609 Projects []*Project `json:"projects,omitempty"`
9610
9611
9612 googleapi.ServerResponse `json:"-"`
9613
9614
9615
9616
9617
9618 ForceSendFields []string `json:"-"`
9619
9620
9621
9622
9623 NullFields []string `json:"-"`
9624 }
9625
9626 func (s *ProjectsListResponse) MarshalJSON() ([]byte, error) {
9627 type NoMethod ProjectsListResponse
9628 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9629 }
9630
9631
9632
9633 type ReachReportCompatibleFields struct {
9634
9635
9636 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
9637
9638
9639 Dimensions []*Dimension `json:"dimensions,omitempty"`
9640
9641
9642 Kind string `json:"kind,omitempty"`
9643
9644
9645 Metrics []*Metric `json:"metrics,omitempty"`
9646
9647
9648 PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
9649
9650
9651 ReachByFrequencyMetrics []*Metric `json:"reachByFrequencyMetrics,omitempty"`
9652
9653
9654
9655
9656
9657 ForceSendFields []string `json:"-"`
9658
9659
9660
9661
9662 NullFields []string `json:"-"`
9663 }
9664
9665 func (s *ReachReportCompatibleFields) MarshalJSON() ([]byte, error) {
9666 type NoMethod ReachReportCompatibleFields
9667 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9668 }
9669
9670
9671 type Recipient struct {
9672
9673
9674
9675
9676
9677 DeliveryType string `json:"deliveryType,omitempty"`
9678
9679 Email string `json:"email,omitempty"`
9680
9681 Kind string `json:"kind,omitempty"`
9682
9683
9684
9685
9686
9687 ForceSendFields []string `json:"-"`
9688
9689
9690
9691
9692 NullFields []string `json:"-"`
9693 }
9694
9695 func (s *Recipient) MarshalJSON() ([]byte, error) {
9696 type NoMethod Recipient
9697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9698 }
9699
9700
9701 type Region struct {
9702
9703 CountryCode string `json:"countryCode,omitempty"`
9704
9705 CountryDartId int64 `json:"countryDartId,omitempty,string"`
9706
9707 DartId int64 `json:"dartId,omitempty,string"`
9708
9709
9710 Kind string `json:"kind,omitempty"`
9711
9712 Name string `json:"name,omitempty"`
9713
9714 RegionCode string `json:"regionCode,omitempty"`
9715
9716
9717
9718
9719
9720 ForceSendFields []string `json:"-"`
9721
9722
9723
9724
9725 NullFields []string `json:"-"`
9726 }
9727
9728 func (s *Region) MarshalJSON() ([]byte, error) {
9729 type NoMethod Region
9730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9731 }
9732
9733
9734 type RegionsListResponse struct {
9735
9736
9737 Kind string `json:"kind,omitempty"`
9738
9739 Regions []*Region `json:"regions,omitempty"`
9740
9741
9742 googleapi.ServerResponse `json:"-"`
9743
9744
9745
9746
9747
9748 ForceSendFields []string `json:"-"`
9749
9750
9751
9752
9753 NullFields []string `json:"-"`
9754 }
9755
9756 func (s *RegionsListResponse) MarshalJSON() ([]byte, error) {
9757 type NoMethod RegionsListResponse
9758 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9759 }
9760
9761
9762
9763
9764
9765
9766
9767
9768 type RemarketingList struct {
9769
9770
9771 AccountId int64 `json:"accountId,omitempty,string"`
9772
9773 Active bool `json:"active,omitempty"`
9774
9775
9776 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
9777
9778
9779 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
9780
9781 Description string `json:"description,omitempty"`
9782
9783 Id int64 `json:"id,omitempty,string"`
9784
9785
9786 Kind string `json:"kind,omitempty"`
9787
9788
9789 LifeSpan int64 `json:"lifeSpan,omitempty,string"`
9790
9791 ListPopulationRule *ListPopulationRule `json:"listPopulationRule,omitempty"`
9792
9793 ListSize int64 `json:"listSize,omitempty,string"`
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809 ListSource string `json:"listSource,omitempty"`
9810
9811
9812 Name string `json:"name,omitempty"`
9813
9814
9815 SubaccountId int64 `json:"subaccountId,omitempty,string"`
9816
9817
9818 googleapi.ServerResponse `json:"-"`
9819
9820
9821
9822
9823
9824 ForceSendFields []string `json:"-"`
9825
9826
9827
9828
9829 NullFields []string `json:"-"`
9830 }
9831
9832 func (s *RemarketingList) MarshalJSON() ([]byte, error) {
9833 type NoMethod RemarketingList
9834 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9835 }
9836
9837
9838
9839
9840
9841 type RemarketingListShare struct {
9842
9843
9844 Kind string `json:"kind,omitempty"`
9845
9846
9847 RemarketingListId int64 `json:"remarketingListId,omitempty,string"`
9848
9849 SharedAccountIds googleapi.Int64s `json:"sharedAccountIds,omitempty"`
9850
9851 SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"`
9852
9853
9854 googleapi.ServerResponse `json:"-"`
9855
9856
9857
9858
9859
9860 ForceSendFields []string `json:"-"`
9861
9862
9863
9864
9865 NullFields []string `json:"-"`
9866 }
9867
9868 func (s *RemarketingListShare) MarshalJSON() ([]byte, error) {
9869 type NoMethod RemarketingListShare
9870 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9871 }
9872
9873
9874 type RemarketingListsListResponse struct {
9875
9876
9877 Kind string `json:"kind,omitempty"`
9878
9879 NextPageToken string `json:"nextPageToken,omitempty"`
9880
9881 RemarketingLists []*RemarketingList `json:"remarketingLists,omitempty"`
9882
9883
9884 googleapi.ServerResponse `json:"-"`
9885
9886
9887
9888
9889
9890 ForceSendFields []string `json:"-"`
9891
9892
9893
9894
9895 NullFields []string `json:"-"`
9896 }
9897
9898 func (s *RemarketingListsListResponse) MarshalJSON() ([]byte, error) {
9899 type NoMethod RemarketingListsListResponse
9900 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9901 }
9902
9903
9904 type Report struct {
9905
9906 AccountId int64 `json:"accountId,omitempty,string"`
9907
9908 Criteria *ReportCriteria `json:"criteria,omitempty"`
9909
9910
9911 CrossDimensionReachCriteria *ReportCrossDimensionReachCriteria `json:"crossDimensionReachCriteria,omitempty"`
9912
9913 Delivery *ReportDelivery `json:"delivery,omitempty"`
9914
9915 Etag string `json:"etag,omitempty"`
9916
9917 FileName string `json:"fileName,omitempty"`
9918
9919 FloodlightCriteria *ReportFloodlightCriteria `json:"floodlightCriteria,omitempty"`
9920
9921
9922
9923
9924
9925
9926
9927
9928 Format string `json:"format,omitempty"`
9929
9930 Id int64 `json:"id,omitempty,string"`
9931
9932 Kind string `json:"kind,omitempty"`
9933
9934
9935 LastModifiedTime uint64 `json:"lastModifiedTime,omitempty,string"`
9936
9937 Name string `json:"name,omitempty"`
9938
9939 OwnerProfileId int64 `json:"ownerProfileId,omitempty,string"`
9940
9941
9942 PathAttributionCriteria *ReportPathAttributionCriteria `json:"pathAttributionCriteria,omitempty"`
9943
9944 PathCriteria *ReportPathCriteria `json:"pathCriteria,omitempty"`
9945
9946
9947 PathToConversionCriteria *ReportPathToConversionCriteria `json:"pathToConversionCriteria,omitempty"`
9948
9949 ReachCriteria *ReportReachCriteria `json:"reachCriteria,omitempty"`
9950
9951
9952 Schedule *ReportSchedule `json:"schedule,omitempty"`
9953
9954 SubAccountId int64 `json:"subAccountId,omitempty,string"`
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965 Type string `json:"type,omitempty"`
9966
9967
9968 googleapi.ServerResponse `json:"-"`
9969
9970
9971
9972
9973
9974 ForceSendFields []string `json:"-"`
9975
9976
9977
9978
9979 NullFields []string `json:"-"`
9980 }
9981
9982 func (s *Report) MarshalJSON() ([]byte, error) {
9983 type NoMethod Report
9984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
9985 }
9986
9987
9988 type ReportCriteria struct {
9989
9990 Activities *Activities `json:"activities,omitempty"`
9991
9992 CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
9993
9994 DateRange *DateRange `json:"dateRange,omitempty"`
9995
9996
9997
9998 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
9999
10000 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
10001
10002 MetricNames []string `json:"metricNames,omitempty"`
10003
10004
10005
10006
10007
10008 ForceSendFields []string `json:"-"`
10009
10010
10011
10012
10013 NullFields []string `json:"-"`
10014 }
10015
10016 func (s *ReportCriteria) MarshalJSON() ([]byte, error) {
10017 type NoMethod ReportCriteria
10018 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10019 }
10020
10021
10022
10023 type ReportCrossDimensionReachCriteria struct {
10024
10025 Breakdown []*SortedDimension `json:"breakdown,omitempty"`
10026
10027 DateRange *DateRange `json:"dateRange,omitempty"`
10028
10029
10030
10031
10032
10033
10034
10035 Dimension string `json:"dimension,omitempty"`
10036
10037 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
10038
10039 MetricNames []string `json:"metricNames,omitempty"`
10040
10041
10042 OverlapMetricNames []string `json:"overlapMetricNames,omitempty"`
10043
10044 Pivoted bool `json:"pivoted,omitempty"`
10045
10046
10047
10048
10049
10050 ForceSendFields []string `json:"-"`
10051
10052
10053
10054
10055 NullFields []string `json:"-"`
10056 }
10057
10058 func (s *ReportCrossDimensionReachCriteria) MarshalJSON() ([]byte, error) {
10059 type NoMethod ReportCrossDimensionReachCriteria
10060 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10061 }
10062
10063
10064 type ReportDelivery struct {
10065
10066 EmailOwner bool `json:"emailOwner,omitempty"`
10067
10068
10069
10070
10071
10072
10073 EmailOwnerDeliveryType string `json:"emailOwnerDeliveryType,omitempty"`
10074
10075 Message string `json:"message,omitempty"`
10076
10077 Recipients []*Recipient `json:"recipients,omitempty"`
10078
10079
10080
10081
10082
10083 ForceSendFields []string `json:"-"`
10084
10085
10086
10087
10088 NullFields []string `json:"-"`
10089 }
10090
10091 func (s *ReportDelivery) MarshalJSON() ([]byte, error) {
10092 type NoMethod ReportDelivery
10093 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10094 }
10095
10096
10097
10098 type ReportFloodlightCriteria struct {
10099
10100 CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
10101
10102 DateRange *DateRange `json:"dateRange,omitempty"`
10103
10104
10105
10106 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
10107
10108 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
10109
10110
10111
10112 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
10113
10114 MetricNames []string `json:"metricNames,omitempty"`
10115
10116 ReportProperties *ReportFloodlightCriteriaReportProperties `json:"reportProperties,omitempty"`
10117
10118
10119
10120
10121
10122 ForceSendFields []string `json:"-"`
10123
10124
10125
10126
10127 NullFields []string `json:"-"`
10128 }
10129
10130 func (s *ReportFloodlightCriteria) MarshalJSON() ([]byte, error) {
10131 type NoMethod ReportFloodlightCriteria
10132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10133 }
10134
10135
10136 type ReportFloodlightCriteriaReportProperties struct {
10137
10138
10139 IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
10140
10141
10142
10143
10144 IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
10145
10146
10147
10148
10149 IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
10150
10151
10152
10153
10154
10155
10156 ForceSendFields []string `json:"-"`
10157
10158
10159
10160
10161 NullFields []string `json:"-"`
10162 }
10163
10164 func (s *ReportFloodlightCriteriaReportProperties) MarshalJSON() ([]byte, error) {
10165 type NoMethod ReportFloodlightCriteriaReportProperties
10166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10167 }
10168
10169
10170
10171 type ReportPathAttributionCriteria struct {
10172
10173 ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
10174
10175 CustomChannelGrouping *ChannelGrouping `json:"customChannelGrouping,omitempty"`
10176
10177 DateRange *DateRange `json:"dateRange,omitempty"`
10178
10179 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
10180
10181
10182
10183 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
10184
10185 MetricNames []string `json:"metricNames,omitempty"`
10186
10187 PathFilters []*PathFilter `json:"pathFilters,omitempty"`
10188
10189
10190
10191
10192
10193 ForceSendFields []string `json:"-"`
10194
10195
10196
10197
10198 NullFields []string `json:"-"`
10199 }
10200
10201 func (s *ReportPathAttributionCriteria) MarshalJSON() ([]byte, error) {
10202 type NoMethod ReportPathAttributionCriteria
10203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10204 }
10205
10206
10207 type ReportPathCriteria struct {
10208
10209 ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
10210
10211 CustomChannelGrouping *ChannelGrouping `json:"customChannelGrouping,omitempty"`
10212
10213 DateRange *DateRange `json:"dateRange,omitempty"`
10214
10215 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
10216
10217
10218
10219 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
10220
10221 MetricNames []string `json:"metricNames,omitempty"`
10222
10223 PathFilters []*PathFilter `json:"pathFilters,omitempty"`
10224
10225
10226
10227
10228
10229 ForceSendFields []string `json:"-"`
10230
10231
10232
10233
10234 NullFields []string `json:"-"`
10235 }
10236
10237 func (s *ReportPathCriteria) MarshalJSON() ([]byte, error) {
10238 type NoMethod ReportPathCriteria
10239 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10240 }
10241
10242
10243
10244 type ReportPathToConversionCriteria struct {
10245
10246 ActivityFilters []*DimensionValue `json:"activityFilters,omitempty"`
10247
10248
10249 ConversionDimensions []*SortedDimension `json:"conversionDimensions,omitempty"`
10250
10251
10252 CustomFloodlightVariables []*SortedDimension `json:"customFloodlightVariables,omitempty"`
10253
10254 CustomRichMediaEvents []*DimensionValue `json:"customRichMediaEvents,omitempty"`
10255
10256 DateRange *DateRange `json:"dateRange,omitempty"`
10257
10258
10259
10260 FloodlightConfigId *DimensionValue `json:"floodlightConfigId,omitempty"`
10261
10262 MetricNames []string `json:"metricNames,omitempty"`
10263
10264
10265 PerInteractionDimensions []*SortedDimension `json:"perInteractionDimensions,omitempty"`
10266
10267 ReportProperties *ReportPathToConversionCriteriaReportProperties `json:"reportProperties,omitempty"`
10268
10269
10270
10271
10272
10273 ForceSendFields []string `json:"-"`
10274
10275
10276
10277
10278 NullFields []string `json:"-"`
10279 }
10280
10281 func (s *ReportPathToConversionCriteria) MarshalJSON() ([]byte, error) {
10282 type NoMethod ReportPathToConversionCriteria
10283 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10284 }
10285
10286
10287
10288 type ReportPathToConversionCriteriaReportProperties struct {
10289
10290
10291
10292
10293 ClicksLookbackWindow int64 `json:"clicksLookbackWindow,omitempty"`
10294
10295
10296
10297
10298 ImpressionsLookbackWindow int64 `json:"impressionsLookbackWindow,omitempty"`
10299
10300 IncludeAttributedIPConversions bool `json:"includeAttributedIPConversions,omitempty"`
10301
10302
10303
10304
10305 IncludeUnattributedCookieConversions bool `json:"includeUnattributedCookieConversions,omitempty"`
10306
10307
10308
10309
10310 IncludeUnattributedIPConversions bool `json:"includeUnattributedIPConversions,omitempty"`
10311
10312
10313
10314
10315 MaximumClickInteractions int64 `json:"maximumClickInteractions,omitempty"`
10316
10317
10318
10319
10320 MaximumImpressionInteractions int64 `json:"maximumImpressionInteractions,omitempty"`
10321
10322
10323
10324 MaximumInteractionGap int64 `json:"maximumInteractionGap,omitempty"`
10325
10326 PivotOnInteractionPath bool `json:"pivotOnInteractionPath,omitempty"`
10327
10328
10329
10330
10331
10332 ForceSendFields []string `json:"-"`
10333
10334
10335
10336
10337 NullFields []string `json:"-"`
10338 }
10339
10340 func (s *ReportPathToConversionCriteriaReportProperties) MarshalJSON() ([]byte, error) {
10341 type NoMethod ReportPathToConversionCriteriaReportProperties
10342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10343 }
10344
10345
10346 type ReportReachCriteria struct {
10347
10348 Activities *Activities `json:"activities,omitempty"`
10349
10350 CustomRichMediaEvents *CustomRichMediaEvents `json:"customRichMediaEvents,omitempty"`
10351
10352 DateRange *DateRange `json:"dateRange,omitempty"`
10353
10354
10355
10356 DimensionFilters []*DimensionValue `json:"dimensionFilters,omitempty"`
10357
10358 Dimensions []*SortedDimension `json:"dimensions,omitempty"`
10359
10360
10361
10362 EnableAllDimensionCombinations bool `json:"enableAllDimensionCombinations,omitempty"`
10363
10364 MetricNames []string `json:"metricNames,omitempty"`
10365
10366
10367 ReachByFrequencyMetricNames []string `json:"reachByFrequencyMetricNames,omitempty"`
10368
10369
10370
10371
10372
10373 ForceSendFields []string `json:"-"`
10374
10375
10376
10377
10378 NullFields []string `json:"-"`
10379 }
10380
10381 func (s *ReportReachCriteria) MarshalJSON() ([]byte, error) {
10382 type NoMethod ReportReachCriteria
10383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10384 }
10385
10386
10387
10388
10389 type ReportSchedule struct {
10390
10391
10392 Active bool `json:"active,omitempty"`
10393
10394
10395
10396 Every int64 `json:"every,omitempty"`
10397 ExpirationDate string `json:"expirationDate,omitempty"`
10398
10399
10400
10401
10402 Repeats string `json:"repeats,omitempty"`
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414 RepeatsOnWeekDays []string `json:"repeatsOnWeekDays,omitempty"`
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425 RunsOnDayOfMonth string `json:"runsOnDayOfMonth,omitempty"`
10426 StartDate string `json:"startDate,omitempty"`
10427
10428 Timezone string `json:"timezone,omitempty"`
10429
10430
10431
10432
10433
10434 ForceSendFields []string `json:"-"`
10435
10436
10437
10438
10439 NullFields []string `json:"-"`
10440 }
10441
10442 func (s *ReportSchedule) MarshalJSON() ([]byte, error) {
10443 type NoMethod ReportSchedule
10444 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10445 }
10446
10447
10448
10449 type ReportCompatibleFields struct {
10450
10451
10452 DimensionFilters []*Dimension `json:"dimensionFilters,omitempty"`
10453
10454
10455 Dimensions []*Dimension `json:"dimensions,omitempty"`
10456
10457
10458 Kind string `json:"kind,omitempty"`
10459
10460
10461 Metrics []*Metric `json:"metrics,omitempty"`
10462
10463
10464 PivotedActivityMetrics []*Metric `json:"pivotedActivityMetrics,omitempty"`
10465
10466
10467
10468
10469
10470 ForceSendFields []string `json:"-"`
10471
10472
10473
10474
10475 NullFields []string `json:"-"`
10476 }
10477
10478 func (s *ReportCompatibleFields) MarshalJSON() ([]byte, error) {
10479 type NoMethod ReportCompatibleFields
10480 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10481 }
10482
10483
10484 type ReportList struct {
10485
10486 Etag string `json:"etag,omitempty"`
10487
10488 Items []*Report `json:"items,omitempty"`
10489
10490 Kind string `json:"kind,omitempty"`
10491
10492
10493
10494
10495 NextPageToken string `json:"nextPageToken,omitempty"`
10496
10497
10498 googleapi.ServerResponse `json:"-"`
10499
10500
10501
10502
10503
10504 ForceSendFields []string `json:"-"`
10505
10506
10507
10508
10509 NullFields []string `json:"-"`
10510 }
10511
10512 func (s *ReportList) MarshalJSON() ([]byte, error) {
10513 type NoMethod ReportList
10514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10515 }
10516
10517
10518 type ReportsConfiguration struct {
10519
10520
10521
10522 ExposureToConversionEnabled bool `json:"exposureToConversionEnabled,omitempty"`
10523
10524
10525 LookbackConfiguration *LookbackConfiguration `json:"lookbackConfiguration,omitempty"`
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542 ReportGenerationTimeZoneId int64 `json:"reportGenerationTimeZoneId,omitempty,string"`
10543
10544
10545
10546
10547
10548 ForceSendFields []string `json:"-"`
10549
10550
10551
10552
10553 NullFields []string `json:"-"`
10554 }
10555
10556 func (s *ReportsConfiguration) MarshalJSON() ([]byte, error) {
10557 type NoMethod ReportsConfiguration
10558 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10559 }
10560
10561
10562 type RichMediaExitOverride struct {
10563
10564
10565 ClickThroughUrl *ClickThroughUrl `json:"clickThroughUrl,omitempty"`
10566
10567
10568 Enabled bool `json:"enabled,omitempty"`
10569
10570 ExitId int64 `json:"exitId,omitempty,string"`
10571
10572
10573
10574
10575
10576 ForceSendFields []string `json:"-"`
10577
10578
10579
10580
10581 NullFields []string `json:"-"`
10582 }
10583
10584 func (s *RichMediaExitOverride) MarshalJSON() ([]byte, error) {
10585 type NoMethod RichMediaExitOverride
10586 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10587 }
10588
10589
10590
10591 type Rule struct {
10592
10593
10594 AssetId int64 `json:"assetId,omitempty,string"`
10595
10596 Name string `json:"name,omitempty"`
10597
10598
10599
10600 TargetingTemplateId int64 `json:"targetingTemplateId,omitempty,string"`
10601
10602
10603
10604
10605
10606 ForceSendFields []string `json:"-"`
10607
10608
10609
10610
10611 NullFields []string `json:"-"`
10612 }
10613
10614 func (s *Rule) MarshalJSON() ([]byte, error) {
10615 type NoMethod Rule
10616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10617 }
10618
10619
10620 type Site struct {
10621
10622
10623 AccountId int64 `json:"accountId,omitempty,string"`
10624
10625 Approved bool `json:"approved,omitempty"`
10626
10627
10628 DirectorySiteId int64 `json:"directorySiteId,omitempty,string"`
10629
10630
10631 DirectorySiteIdDimensionValue *DimensionValue `json:"directorySiteIdDimensionValue,omitempty"`
10632
10633 Id int64 `json:"id,omitempty,string"`
10634
10635
10636 IdDimensionValue *DimensionValue `json:"idDimensionValue,omitempty"`
10637
10638 KeyName string `json:"keyName,omitempty"`
10639
10640
10641 Kind string `json:"kind,omitempty"`
10642
10643
10644
10645
10646 Name string `json:"name,omitempty"`
10647
10648 SiteContacts []*SiteContact `json:"siteContacts,omitempty"`
10649
10650 SiteSettings *SiteSettings `json:"siteSettings,omitempty"`
10651
10652
10653 SubaccountId int64 `json:"subaccountId,omitempty,string"`
10654
10655
10656
10657 VideoSettings *SiteVideoSettings `json:"videoSettings,omitempty"`
10658
10659
10660 googleapi.ServerResponse `json:"-"`
10661
10662
10663
10664
10665
10666 ForceSendFields []string `json:"-"`
10667
10668
10669
10670
10671 NullFields []string `json:"-"`
10672 }
10673
10674 func (s *Site) MarshalJSON() ([]byte, error) {
10675 type NoMethod Site
10676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10677 }
10678
10679
10680 type SiteCompanionSetting struct {
10681
10682 CompanionsDisabled bool `json:"companionsDisabled,omitempty"`
10683
10684
10685 EnabledSizes []*Size `json:"enabledSizes,omitempty"`
10686
10687 ImageOnly bool `json:"imageOnly,omitempty"`
10688
10689
10690 Kind string `json:"kind,omitempty"`
10691
10692
10693
10694
10695
10696 ForceSendFields []string `json:"-"`
10697
10698
10699
10700
10701 NullFields []string `json:"-"`
10702 }
10703
10704 func (s *SiteCompanionSetting) MarshalJSON() ([]byte, error) {
10705 type NoMethod SiteCompanionSetting
10706 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10707 }
10708
10709
10710 type SiteContact struct {
10711
10712 Address string `json:"address,omitempty"`
10713
10714
10715
10716
10717
10718 ContactType string `json:"contactType,omitempty"`
10719
10720 Email string `json:"email,omitempty"`
10721
10722 FirstName string `json:"firstName,omitempty"`
10723
10724 Id int64 `json:"id,omitempty,string"`
10725
10726 LastName string `json:"lastName,omitempty"`
10727
10728 Phone string `json:"phone,omitempty"`
10729
10730 Title string `json:"title,omitempty"`
10731
10732
10733
10734
10735
10736 ForceSendFields []string `json:"-"`
10737
10738
10739
10740
10741 NullFields []string `json:"-"`
10742 }
10743
10744 func (s *SiteContact) MarshalJSON() ([]byte, error) {
10745 type NoMethod SiteContact
10746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10747 }
10748
10749
10750 type SiteSettings struct {
10751
10752 ActiveViewOptOut bool `json:"activeViewOptOut,omitempty"`
10753
10754
10755
10756
10757 AdBlockingOptOut bool `json:"adBlockingOptOut,omitempty"`
10758
10759 DisableNewCookie bool `json:"disableNewCookie,omitempty"`
10760
10761 TagSetting *TagSetting `json:"tagSetting,omitempty"`
10762
10763
10764
10765
10766
10767 VideoActiveViewOptOutTemplate bool `json:"videoActiveViewOptOutTemplate,omitempty"`
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783 VpaidAdapterChoiceTemplate string `json:"vpaidAdapterChoiceTemplate,omitempty"`
10784
10785
10786
10787
10788
10789 ForceSendFields []string `json:"-"`
10790
10791
10792
10793
10794 NullFields []string `json:"-"`
10795 }
10796
10797 func (s *SiteSettings) MarshalJSON() ([]byte, error) {
10798 type NoMethod SiteSettings
10799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10800 }
10801
10802
10803 type SiteSkippableSetting struct {
10804
10805
10806 Kind string `json:"kind,omitempty"`
10807
10808
10809 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
10810
10811
10812 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
10813
10814
10815 Skippable bool `json:"skippable,omitempty"`
10816
10817
10818
10819
10820
10821 ForceSendFields []string `json:"-"`
10822
10823
10824
10825
10826 NullFields []string `json:"-"`
10827 }
10828
10829 func (s *SiteSkippableSetting) MarshalJSON() ([]byte, error) {
10830 type NoMethod SiteSkippableSetting
10831 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10832 }
10833
10834
10835 type SiteTranscodeSetting struct {
10836
10837
10838 EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
10839
10840
10841 Kind string `json:"kind,omitempty"`
10842
10843
10844
10845
10846
10847 ForceSendFields []string `json:"-"`
10848
10849
10850
10851
10852 NullFields []string `json:"-"`
10853 }
10854
10855 func (s *SiteTranscodeSetting) MarshalJSON() ([]byte, error) {
10856 type NoMethod SiteTranscodeSetting
10857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10858 }
10859
10860
10861 type SiteVideoSettings struct {
10862
10863
10864 CompanionSettings *SiteCompanionSetting `json:"companionSettings,omitempty"`
10865
10866
10867 Kind string `json:"kind,omitempty"`
10868
10869 ObaEnabled bool `json:"obaEnabled,omitempty"`
10870
10871
10872 ObaSettings *ObaIcon `json:"obaSettings,omitempty"`
10873
10874
10875
10876
10877
10878
10879
10880 Orientation string `json:"orientation,omitempty"`
10881
10882
10883
10884
10885 PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"`
10886
10887
10888
10889 SkippableSettings *SiteSkippableSetting `json:"skippableSettings,omitempty"`
10890
10891
10892
10893 TranscodeSettings *SiteTranscodeSetting `json:"transcodeSettings,omitempty"`
10894
10895
10896
10897
10898
10899 ForceSendFields []string `json:"-"`
10900
10901
10902
10903
10904 NullFields []string `json:"-"`
10905 }
10906
10907 func (s *SiteVideoSettings) MarshalJSON() ([]byte, error) {
10908 type NoMethod SiteVideoSettings
10909 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10910 }
10911
10912
10913 type SitesListResponse struct {
10914
10915
10916 Kind string `json:"kind,omitempty"`
10917
10918 NextPageToken string `json:"nextPageToken,omitempty"`
10919
10920 Sites []*Site `json:"sites,omitempty"`
10921
10922
10923 googleapi.ServerResponse `json:"-"`
10924
10925
10926
10927
10928
10929 ForceSendFields []string `json:"-"`
10930
10931
10932
10933
10934 NullFields []string `json:"-"`
10935 }
10936
10937 func (s *SitesListResponse) MarshalJSON() ([]byte, error) {
10938 type NoMethod SitesListResponse
10939 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10940 }
10941
10942
10943
10944 type Size struct {
10945
10946 Height int64 `json:"height,omitempty"`
10947
10948 Iab bool `json:"iab,omitempty"`
10949
10950 Id int64 `json:"id,omitempty,string"`
10951
10952
10953 Kind string `json:"kind,omitempty"`
10954
10955 Width int64 `json:"width,omitempty"`
10956
10957
10958 googleapi.ServerResponse `json:"-"`
10959
10960
10961
10962
10963
10964 ForceSendFields []string `json:"-"`
10965
10966
10967
10968
10969 NullFields []string `json:"-"`
10970 }
10971
10972 func (s *Size) MarshalJSON() ([]byte, error) {
10973 type NoMethod Size
10974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
10975 }
10976
10977
10978 type SizesListResponse struct {
10979
10980
10981 Kind string `json:"kind,omitempty"`
10982
10983 Sizes []*Size `json:"sizes,omitempty"`
10984
10985
10986 googleapi.ServerResponse `json:"-"`
10987
10988
10989
10990
10991
10992 ForceSendFields []string `json:"-"`
10993
10994
10995
10996
10997 NullFields []string `json:"-"`
10998 }
10999
11000 func (s *SizesListResponse) MarshalJSON() ([]byte, error) {
11001 type NoMethod SizesListResponse
11002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11003 }
11004
11005
11006 type SkippableSetting struct {
11007
11008
11009 Kind string `json:"kind,omitempty"`
11010
11011
11012 ProgressOffset *VideoOffset `json:"progressOffset,omitempty"`
11013
11014
11015 SkipOffset *VideoOffset `json:"skipOffset,omitempty"`
11016
11017 Skippable bool `json:"skippable,omitempty"`
11018
11019
11020
11021
11022
11023 ForceSendFields []string `json:"-"`
11024
11025
11026
11027
11028 NullFields []string `json:"-"`
11029 }
11030
11031 func (s *SkippableSetting) MarshalJSON() ([]byte, error) {
11032 type NoMethod SkippableSetting
11033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11034 }
11035
11036
11037 type SortedDimension struct {
11038
11039
11040 Kind string `json:"kind,omitempty"`
11041
11042 Name string `json:"name,omitempty"`
11043
11044
11045
11046
11047
11048 SortOrder string `json:"sortOrder,omitempty"`
11049
11050
11051
11052
11053
11054 ForceSendFields []string `json:"-"`
11055
11056
11057
11058
11059 NullFields []string `json:"-"`
11060 }
11061
11062 func (s *SortedDimension) MarshalJSON() ([]byte, error) {
11063 type NoMethod SortedDimension
11064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11065 }
11066
11067
11068 type Subaccount struct {
11069
11070
11071 AccountId int64 `json:"accountId,omitempty,string"`
11072
11073
11074 AvailablePermissionIds googleapi.Int64s `json:"availablePermissionIds,omitempty"`
11075
11076 Id int64 `json:"id,omitempty,string"`
11077
11078
11079 Kind string `json:"kind,omitempty"`
11080
11081
11082 Name string `json:"name,omitempty"`
11083
11084
11085 googleapi.ServerResponse `json:"-"`
11086
11087
11088
11089
11090
11091 ForceSendFields []string `json:"-"`
11092
11093
11094
11095
11096 NullFields []string `json:"-"`
11097 }
11098
11099 func (s *Subaccount) MarshalJSON() ([]byte, error) {
11100 type NoMethod Subaccount
11101 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11102 }
11103
11104
11105 type SubaccountsListResponse struct {
11106
11107
11108 Kind string `json:"kind,omitempty"`
11109
11110 NextPageToken string `json:"nextPageToken,omitempty"`
11111
11112 Subaccounts []*Subaccount `json:"subaccounts,omitempty"`
11113
11114
11115 googleapi.ServerResponse `json:"-"`
11116
11117
11118
11119
11120
11121 ForceSendFields []string `json:"-"`
11122
11123
11124
11125
11126 NullFields []string `json:"-"`
11127 }
11128
11129 func (s *SubaccountsListResponse) MarshalJSON() ([]byte, error) {
11130 type NoMethod SubaccountsListResponse
11131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11132 }
11133
11134
11135 type TagData struct {
11136
11137
11138 AdId int64 `json:"adId,omitempty,string"`
11139
11140 ClickTag string `json:"clickTag,omitempty"`
11141
11142
11143 CreativeId int64 `json:"creativeId,omitempty,string"`
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167 Format string `json:"format,omitempty"`
11168
11169 ImpressionTag string `json:"impressionTag,omitempty"`
11170
11171
11172
11173
11174
11175 ForceSendFields []string `json:"-"`
11176
11177
11178
11179
11180 NullFields []string `json:"-"`
11181 }
11182
11183 func (s *TagData) MarshalJSON() ([]byte, error) {
11184 type NoMethod TagData
11185 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11186 }
11187
11188
11189 type TagSetting struct {
11190
11191
11192
11193
11194 AdditionalKeyValues string `json:"additionalKeyValues,omitempty"`
11195
11196
11197 IncludeClickThroughUrls bool `json:"includeClickThroughUrls,omitempty"`
11198
11199
11200 IncludeClickTracking bool `json:"includeClickTracking,omitempty"`
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218 KeywordOption string `json:"keywordOption,omitempty"`
11219
11220
11221
11222
11223
11224 ForceSendFields []string `json:"-"`
11225
11226
11227
11228
11229 NullFields []string `json:"-"`
11230 }
11231
11232 func (s *TagSetting) MarshalJSON() ([]byte, error) {
11233 type NoMethod TagSetting
11234 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11235 }
11236
11237
11238 type TagSettings struct {
11239
11240 DynamicTagEnabled bool `json:"dynamicTagEnabled,omitempty"`
11241
11242 ImageTagEnabled bool `json:"imageTagEnabled,omitempty"`
11243
11244
11245
11246
11247
11248 ForceSendFields []string `json:"-"`
11249
11250
11251
11252
11253 NullFields []string `json:"-"`
11254 }
11255
11256 func (s *TagSettings) MarshalJSON() ([]byte, error) {
11257 type NoMethod TagSettings
11258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11259 }
11260
11261
11262 type TargetWindow struct {
11263
11264 CustomHtml string `json:"customHtml,omitempty"`
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275 TargetWindowOption string `json:"targetWindowOption,omitempty"`
11276
11277
11278
11279
11280
11281 ForceSendFields []string `json:"-"`
11282
11283
11284
11285
11286 NullFields []string `json:"-"`
11287 }
11288
11289 func (s *TargetWindow) MarshalJSON() ([]byte, error) {
11290 type NoMethod TargetWindow
11291 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11292 }
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302 type TargetableRemarketingList struct {
11303
11304
11305 AccountId int64 `json:"accountId,omitempty,string"`
11306
11307 Active bool `json:"active,omitempty"`
11308
11309
11310 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11311
11312 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11313
11314 Description string `json:"description,omitempty"`
11315
11316 Id int64 `json:"id,omitempty,string"`
11317
11318
11319 Kind string `json:"kind,omitempty"`
11320
11321
11322 LifeSpan int64 `json:"lifeSpan,omitempty,string"`
11323
11324 ListSize int64 `json:"listSize,omitempty,string"`
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341 ListSource string `json:"listSource,omitempty"`
11342
11343
11344 Name string `json:"name,omitempty"`
11345
11346
11347 SubaccountId int64 `json:"subaccountId,omitempty,string"`
11348
11349
11350 googleapi.ServerResponse `json:"-"`
11351
11352
11353
11354
11355
11356 ForceSendFields []string `json:"-"`
11357
11358
11359
11360
11361 NullFields []string `json:"-"`
11362 }
11363
11364 func (s *TargetableRemarketingList) MarshalJSON() ([]byte, error) {
11365 type NoMethod TargetableRemarketingList
11366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11367 }
11368
11369
11370 type TargetableRemarketingListsListResponse struct {
11371
11372
11373 Kind string `json:"kind,omitempty"`
11374
11375 NextPageToken string `json:"nextPageToken,omitempty"`
11376
11377 TargetableRemarketingLists []*TargetableRemarketingList `json:"targetableRemarketingLists,omitempty"`
11378
11379
11380 googleapi.ServerResponse `json:"-"`
11381
11382
11383
11384
11385
11386 ForceSendFields []string `json:"-"`
11387
11388
11389
11390
11391 NullFields []string `json:"-"`
11392 }
11393
11394 func (s *TargetableRemarketingListsListResponse) MarshalJSON() ([]byte, error) {
11395 type NoMethod TargetableRemarketingListsListResponse
11396 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11397 }
11398
11399
11400
11401
11402 type TargetingTemplate struct {
11403
11404
11405 AccountId int64 `json:"accountId,omitempty,string"`
11406
11407
11408 AdvertiserId int64 `json:"advertiserId,omitempty,string"`
11409
11410
11411 AdvertiserIdDimensionValue *DimensionValue `json:"advertiserIdDimensionValue,omitempty"`
11412
11413 DayPartTargeting *DayPartTargeting `json:"dayPartTargeting,omitempty"`
11414
11415 GeoTargeting *GeoTargeting `json:"geoTargeting,omitempty"`
11416
11417
11418 Id int64 `json:"id,omitempty,string"`
11419
11420 KeyValueTargetingExpression *KeyValueTargetingExpression `json:"keyValueTargetingExpression,omitempty"`
11421
11422
11423 Kind string `json:"kind,omitempty"`
11424
11425 LanguageTargeting *LanguageTargeting `json:"languageTargeting,omitempty"`
11426
11427 ListTargetingExpression *ListTargetingExpression `json:"listTargetingExpression,omitempty"`
11428
11429
11430 Name string `json:"name,omitempty"`
11431
11432
11433 SubaccountId int64 `json:"subaccountId,omitempty,string"`
11434
11435 TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
11436
11437
11438 googleapi.ServerResponse `json:"-"`
11439
11440
11441
11442
11443
11444 ForceSendFields []string `json:"-"`
11445
11446
11447
11448
11449 NullFields []string `json:"-"`
11450 }
11451
11452 func (s *TargetingTemplate) MarshalJSON() ([]byte, error) {
11453 type NoMethod TargetingTemplate
11454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11455 }
11456
11457
11458 type TargetingTemplatesListResponse struct {
11459
11460
11461 Kind string `json:"kind,omitempty"`
11462
11463 NextPageToken string `json:"nextPageToken,omitempty"`
11464
11465 TargetingTemplates []*TargetingTemplate `json:"targetingTemplates,omitempty"`
11466
11467
11468 googleapi.ServerResponse `json:"-"`
11469
11470
11471
11472
11473
11474 ForceSendFields []string `json:"-"`
11475
11476
11477
11478
11479 NullFields []string `json:"-"`
11480 }
11481
11482 func (s *TargetingTemplatesListResponse) MarshalJSON() ([]byte, error) {
11483 type NoMethod TargetingTemplatesListResponse
11484 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11485 }
11486
11487
11488 type TechnologyTargeting struct {
11489
11490
11491
11492
11493 Browsers []*Browser `json:"browsers,omitempty"`
11494
11495
11496
11497 ConnectionTypes []*ConnectionType `json:"connectionTypes,omitempty"`
11498
11499
11500
11501
11502 MobileCarriers []*MobileCarrier `json:"mobileCarriers,omitempty"`
11503
11504
11505
11506
11507
11508
11509 OperatingSystemVersions []*OperatingSystemVersion `json:"operatingSystemVersions,omitempty"`
11510
11511
11512
11513
11514
11515 OperatingSystems []*OperatingSystem `json:"operatingSystems,omitempty"`
11516
11517
11518
11519 PlatformTypes []*PlatformType `json:"platformTypes,omitempty"`
11520
11521
11522
11523
11524
11525 ForceSendFields []string `json:"-"`
11526
11527
11528
11529
11530 NullFields []string `json:"-"`
11531 }
11532
11533 func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
11534 type NoMethod TechnologyTargeting
11535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11536 }
11537
11538
11539 type ThirdPartyAuthenticationToken struct {
11540
11541 Name string `json:"name,omitempty"`
11542
11543
11544 Value string `json:"value,omitempty"`
11545
11546
11547
11548
11549
11550 ForceSendFields []string `json:"-"`
11551
11552
11553
11554
11555 NullFields []string `json:"-"`
11556 }
11557
11558 func (s *ThirdPartyAuthenticationToken) MarshalJSON() ([]byte, error) {
11559 type NoMethod ThirdPartyAuthenticationToken
11560 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11561 }
11562
11563
11564 type ThirdPartyTrackingUrl struct {
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601 ThirdPartyUrlType string `json:"thirdPartyUrlType,omitempty"`
11602
11603 Url string `json:"url,omitempty"`
11604
11605
11606
11607
11608
11609 ForceSendFields []string `json:"-"`
11610
11611
11612
11613
11614 NullFields []string `json:"-"`
11615 }
11616
11617 func (s *ThirdPartyTrackingUrl) MarshalJSON() ([]byte, error) {
11618 type NoMethod ThirdPartyTrackingUrl
11619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11620 }
11621
11622
11623 type TranscodeSetting struct {
11624
11625
11626 EnabledVideoFormats []int64 `json:"enabledVideoFormats,omitempty"`
11627
11628
11629 Kind string `json:"kind,omitempty"`
11630
11631
11632
11633
11634
11635 ForceSendFields []string `json:"-"`
11636
11637
11638
11639
11640 NullFields []string `json:"-"`
11641 }
11642
11643 func (s *TranscodeSetting) MarshalJSON() ([]byte, error) {
11644 type NoMethod TranscodeSetting
11645 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11646 }
11647
11648
11649
11650 type UniversalAdId struct {
11651
11652
11653
11654
11655
11656
11657
11658
11659 Registry string `json:"registry,omitempty"`
11660
11661
11662
11663 Value string `json:"value,omitempty"`
11664
11665
11666
11667
11668
11669 ForceSendFields []string `json:"-"`
11670
11671
11672
11673
11674 NullFields []string `json:"-"`
11675 }
11676
11677 func (s *UniversalAdId) MarshalJSON() ([]byte, error) {
11678 type NoMethod UniversalAdId
11679 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11680 }
11681
11682
11683 type UserDefinedVariableConfiguration struct {
11684
11685
11686
11687
11688
11689 DataType string `json:"dataType,omitempty"`
11690
11691
11692
11693 ReportName string `json:"reportName,omitempty"`
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797 VariableType string `json:"variableType,omitempty"`
11798
11799
11800
11801
11802
11803 ForceSendFields []string `json:"-"`
11804
11805
11806
11807
11808 NullFields []string `json:"-"`
11809 }
11810
11811 func (s *UserDefinedVariableConfiguration) MarshalJSON() ([]byte, error) {
11812 type NoMethod UserDefinedVariableConfiguration
11813 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11814 }
11815
11816
11817
11818 type UserIdentifier struct {
11819
11820 AddressInfo *OfflineUserAddressInfo `json:"addressInfo,omitempty"`
11821
11822
11823 HashedEmail string `json:"hashedEmail,omitempty"`
11824
11825
11826 HashedPhoneNumber string `json:"hashedPhoneNumber,omitempty"`
11827
11828
11829
11830
11831
11832 ForceSendFields []string `json:"-"`
11833
11834
11835
11836
11837 NullFields []string `json:"-"`
11838 }
11839
11840 func (s *UserIdentifier) MarshalJSON() ([]byte, error) {
11841 type NoMethod UserIdentifier
11842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11843 }
11844
11845
11846
11847
11848 type UserProfile struct {
11849
11850 AccountId int64 `json:"accountId,omitempty,string"`
11851
11852 AccountName string `json:"accountName,omitempty"`
11853
11854 Etag string `json:"etag,omitempty"`
11855
11856
11857 Kind string `json:"kind,omitempty"`
11858
11859 ProfileId int64 `json:"profileId,omitempty,string"`
11860
11861 SubAccountId int64 `json:"subAccountId,omitempty,string"`
11862
11863 SubAccountName string `json:"subAccountName,omitempty"`
11864
11865 UserName string `json:"userName,omitempty"`
11866
11867
11868 googleapi.ServerResponse `json:"-"`
11869
11870
11871
11872
11873
11874 ForceSendFields []string `json:"-"`
11875
11876
11877
11878
11879 NullFields []string `json:"-"`
11880 }
11881
11882 func (s *UserProfile) MarshalJSON() ([]byte, error) {
11883 type NoMethod UserProfile
11884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11885 }
11886
11887
11888 type UserProfileList struct {
11889
11890 Etag string `json:"etag,omitempty"`
11891
11892 Items []*UserProfile `json:"items,omitempty"`
11893
11894
11895 Kind string `json:"kind,omitempty"`
11896
11897
11898 googleapi.ServerResponse `json:"-"`
11899
11900
11901
11902
11903
11904 ForceSendFields []string `json:"-"`
11905
11906
11907
11908
11909 NullFields []string `json:"-"`
11910 }
11911
11912 func (s *UserProfileList) MarshalJSON() ([]byte, error) {
11913 type NoMethod UserProfileList
11914 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11915 }
11916
11917
11918
11919 type UserRole struct {
11920
11921
11922 AccountId int64 `json:"accountId,omitempty,string"`
11923
11924
11925
11926
11927 DefaultUserRole bool `json:"defaultUserRole,omitempty"`
11928
11929 Id int64 `json:"id,omitempty,string"`
11930
11931
11932 Kind string `json:"kind,omitempty"`
11933
11934
11935
11936
11937
11938 Name string `json:"name,omitempty"`
11939
11940
11941 ParentUserRoleId int64 `json:"parentUserRoleId,omitempty,string"`
11942
11943 Permissions []*UserRolePermission `json:"permissions,omitempty"`
11944
11945
11946 SubaccountId int64 `json:"subaccountId,omitempty,string"`
11947
11948
11949 googleapi.ServerResponse `json:"-"`
11950
11951
11952
11953
11954
11955 ForceSendFields []string `json:"-"`
11956
11957
11958
11959
11960 NullFields []string `json:"-"`
11961 }
11962
11963 func (s *UserRole) MarshalJSON() ([]byte, error) {
11964 type NoMethod UserRole
11965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
11966 }
11967
11968
11969 type UserRolePermission struct {
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981 Availability string `json:"availability,omitempty"`
11982
11983 Id int64 `json:"id,omitempty,string"`
11984
11985
11986 Kind string `json:"kind,omitempty"`
11987
11988 Name string `json:"name,omitempty"`
11989
11990
11991 PermissionGroupId int64 `json:"permissionGroupId,omitempty,string"`
11992
11993
11994 googleapi.ServerResponse `json:"-"`
11995
11996
11997
11998
11999
12000 ForceSendFields []string `json:"-"`
12001
12002
12003
12004
12005 NullFields []string `json:"-"`
12006 }
12007
12008 func (s *UserRolePermission) MarshalJSON() ([]byte, error) {
12009 type NoMethod UserRolePermission
12010 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12011 }
12012
12013
12014
12015 type UserRolePermissionGroup struct {
12016
12017 Id int64 `json:"id,omitempty,string"`
12018
12019
12020 Kind string `json:"kind,omitempty"`
12021
12022 Name string `json:"name,omitempty"`
12023
12024
12025 googleapi.ServerResponse `json:"-"`
12026
12027
12028
12029
12030
12031 ForceSendFields []string `json:"-"`
12032
12033
12034
12035
12036 NullFields []string `json:"-"`
12037 }
12038
12039 func (s *UserRolePermissionGroup) MarshalJSON() ([]byte, error) {
12040 type NoMethod UserRolePermissionGroup
12041 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12042 }
12043
12044
12045
12046 type UserRolePermissionGroupsListResponse struct {
12047
12048
12049 Kind string `json:"kind,omitempty"`
12050
12051 UserRolePermissionGroups []*UserRolePermissionGroup `json:"userRolePermissionGroups,omitempty"`
12052
12053
12054 googleapi.ServerResponse `json:"-"`
12055
12056
12057
12058
12059
12060 ForceSendFields []string `json:"-"`
12061
12062
12063
12064
12065 NullFields []string `json:"-"`
12066 }
12067
12068 func (s *UserRolePermissionGroupsListResponse) MarshalJSON() ([]byte, error) {
12069 type NoMethod UserRolePermissionGroupsListResponse
12070 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12071 }
12072
12073
12074 type UserRolePermissionsListResponse struct {
12075
12076
12077 Kind string `json:"kind,omitempty"`
12078
12079 UserRolePermissions []*UserRolePermission `json:"userRolePermissions,omitempty"`
12080
12081
12082 googleapi.ServerResponse `json:"-"`
12083
12084
12085
12086
12087
12088 ForceSendFields []string `json:"-"`
12089
12090
12091
12092
12093 NullFields []string `json:"-"`
12094 }
12095
12096 func (s *UserRolePermissionsListResponse) MarshalJSON() ([]byte, error) {
12097 type NoMethod UserRolePermissionsListResponse
12098 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12099 }
12100
12101
12102 type UserRolesListResponse struct {
12103
12104
12105 Kind string `json:"kind,omitempty"`
12106
12107 NextPageToken string `json:"nextPageToken,omitempty"`
12108
12109 UserRoles []*UserRole `json:"userRoles,omitempty"`
12110
12111
12112 googleapi.ServerResponse `json:"-"`
12113
12114
12115
12116
12117
12118 ForceSendFields []string `json:"-"`
12119
12120
12121
12122
12123 NullFields []string `json:"-"`
12124 }
12125
12126 func (s *UserRolesListResponse) MarshalJSON() ([]byte, error) {
12127 type NoMethod UserRolesListResponse
12128 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12129 }
12130
12131
12132 type UvarFilter struct {
12133
12134 Complement bool `json:"complement,omitempty"`
12135
12136 Index int64 `json:"index,omitempty,string"`
12137
12138 Kind string `json:"kind,omitempty"`
12139
12140
12141
12142
12143
12144
12145 Match string `json:"match,omitempty"`
12146
12147 Values []string `json:"values,omitempty"`
12148
12149
12150
12151
12152
12153 ForceSendFields []string `json:"-"`
12154
12155
12156
12157
12158 NullFields []string `json:"-"`
12159 }
12160
12161 func (s *UvarFilter) MarshalJSON() ([]byte, error) {
12162 type NoMethod UvarFilter
12163 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12164 }
12165
12166
12167 type VideoFormat struct {
12168
12169
12170
12171
12172
12173
12174
12175
12176 FileType string `json:"fileType,omitempty"`
12177
12178 Id int64 `json:"id,omitempty"`
12179
12180
12181 Kind string `json:"kind,omitempty"`
12182
12183 Resolution *Size `json:"resolution,omitempty"`
12184
12185 TargetBitRate int64 `json:"targetBitRate,omitempty"`
12186
12187
12188 googleapi.ServerResponse `json:"-"`
12189
12190
12191
12192
12193
12194 ForceSendFields []string `json:"-"`
12195
12196
12197
12198
12199 NullFields []string `json:"-"`
12200 }
12201
12202 func (s *VideoFormat) MarshalJSON() ([]byte, error) {
12203 type NoMethod VideoFormat
12204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12205 }
12206
12207
12208 type VideoFormatsListResponse struct {
12209
12210
12211 Kind string `json:"kind,omitempty"`
12212
12213 VideoFormats []*VideoFormat `json:"videoFormats,omitempty"`
12214
12215
12216 googleapi.ServerResponse `json:"-"`
12217
12218
12219
12220
12221
12222 ForceSendFields []string `json:"-"`
12223
12224
12225
12226
12227 NullFields []string `json:"-"`
12228 }
12229
12230 func (s *VideoFormatsListResponse) MarshalJSON() ([]byte, error) {
12231 type NoMethod VideoFormatsListResponse
12232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12233 }
12234
12235
12236 type VideoOffset struct {
12237
12238
12239 OffsetPercentage int64 `json:"offsetPercentage,omitempty"`
12240
12241
12242 OffsetSeconds int64 `json:"offsetSeconds,omitempty"`
12243
12244
12245
12246
12247
12248 ForceSendFields []string `json:"-"`
12249
12250
12251
12252
12253 NullFields []string `json:"-"`
12254 }
12255
12256 func (s *VideoOffset) MarshalJSON() ([]byte, error) {
12257 type NoMethod VideoOffset
12258 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12259 }
12260
12261
12262 type VideoSettings struct {
12263
12264
12265 CompanionSettings *CompanionSetting `json:"companionSettings,omitempty"`
12266
12267 DurationSeconds int64 `json:"durationSeconds,omitempty"`
12268
12269
12270 Kind string `json:"kind,omitempty"`
12271
12272 ObaEnabled bool `json:"obaEnabled,omitempty"`
12273
12274
12275
12276 ObaSettings *ObaIcon `json:"obaSettings,omitempty"`
12277
12278
12279
12280
12281
12282
12283
12284 Orientation string `json:"orientation,omitempty"`
12285
12286 PublisherSpecificationId int64 `json:"publisherSpecificationId,omitempty,string"`
12287
12288
12289
12290 SkippableSettings *SkippableSetting `json:"skippableSettings,omitempty"`
12291
12292
12293
12294 TranscodeSettings *TranscodeSetting `json:"transcodeSettings,omitempty"`
12295
12296
12297
12298
12299
12300 ForceSendFields []string `json:"-"`
12301
12302
12303
12304
12305 NullFields []string `json:"-"`
12306 }
12307
12308 func (s *VideoSettings) MarshalJSON() ([]byte, error) {
12309 type NoMethod VideoSettings
12310 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
12311 }
12312
12313 type AccountActiveAdSummariesGetCall struct {
12314 s *Service
12315 profileId int64
12316 summaryAccountId int64
12317 urlParams_ gensupport.URLParams
12318 ifNoneMatch_ string
12319 ctx_ context.Context
12320 header_ http.Header
12321 }
12322
12323
12324
12325
12326
12327 func (r *AccountActiveAdSummariesService) Get(profileId int64, summaryAccountId int64) *AccountActiveAdSummariesGetCall {
12328 c := &AccountActiveAdSummariesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12329 c.profileId = profileId
12330 c.summaryAccountId = summaryAccountId
12331 return c
12332 }
12333
12334
12335
12336
12337 func (c *AccountActiveAdSummariesGetCall) Fields(s ...googleapi.Field) *AccountActiveAdSummariesGetCall {
12338 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12339 return c
12340 }
12341
12342
12343
12344
12345 func (c *AccountActiveAdSummariesGetCall) IfNoneMatch(entityTag string) *AccountActiveAdSummariesGetCall {
12346 c.ifNoneMatch_ = entityTag
12347 return c
12348 }
12349
12350
12351 func (c *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
12352 c.ctx_ = ctx
12353 return c
12354 }
12355
12356
12357
12358 func (c *AccountActiveAdSummariesGetCall) Header() http.Header {
12359 if c.header_ == nil {
12360 c.header_ = make(http.Header)
12361 }
12362 return c.header_
12363 }
12364
12365 func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
12366 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12367 if c.ifNoneMatch_ != "" {
12368 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12369 }
12370 var body io.Reader = nil
12371 c.urlParams_.Set("alt", alt)
12372 c.urlParams_.Set("prettyPrint", "false")
12373 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountActiveAdSummaries/{+summaryAccountId}")
12374 urls += "?" + c.urlParams_.Encode()
12375 req, err := http.NewRequest("GET", urls, body)
12376 if err != nil {
12377 return nil, err
12378 }
12379 req.Header = reqHeaders
12380 googleapi.Expand(req.URL, map[string]string{
12381 "profileId": strconv.FormatInt(c.profileId, 10),
12382 "summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
12383 })
12384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12385 }
12386
12387
12388
12389
12390
12391
12392
12393 func (c *AccountActiveAdSummariesGetCall) Do(opts ...googleapi.CallOption) (*AccountActiveAdSummary, error) {
12394 gensupport.SetOptions(c.urlParams_, opts...)
12395 res, err := c.doRequest("json")
12396 if res != nil && res.StatusCode == http.StatusNotModified {
12397 if res.Body != nil {
12398 res.Body.Close()
12399 }
12400 return nil, gensupport.WrapError(&googleapi.Error{
12401 Code: res.StatusCode,
12402 Header: res.Header,
12403 })
12404 }
12405 if err != nil {
12406 return nil, err
12407 }
12408 defer googleapi.CloseBody(res)
12409 if err := googleapi.CheckResponse(res); err != nil {
12410 return nil, gensupport.WrapError(err)
12411 }
12412 ret := &AccountActiveAdSummary{
12413 ServerResponse: googleapi.ServerResponse{
12414 Header: res.Header,
12415 HTTPStatusCode: res.StatusCode,
12416 },
12417 }
12418 target := &ret
12419 if err := gensupport.DecodeResponse(target, res); err != nil {
12420 return nil, err
12421 }
12422 return ret, nil
12423 }
12424
12425 type AccountPermissionGroupsGetCall struct {
12426 s *Service
12427 profileId int64
12428 id int64
12429 urlParams_ gensupport.URLParams
12430 ifNoneMatch_ string
12431 ctx_ context.Context
12432 header_ http.Header
12433 }
12434
12435
12436
12437
12438
12439 func (r *AccountPermissionGroupsService) Get(profileId int64, id int64) *AccountPermissionGroupsGetCall {
12440 c := &AccountPermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12441 c.profileId = profileId
12442 c.id = id
12443 return c
12444 }
12445
12446
12447
12448
12449 func (c *AccountPermissionGroupsGetCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsGetCall {
12450 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12451 return c
12452 }
12453
12454
12455
12456
12457 func (c *AccountPermissionGroupsGetCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsGetCall {
12458 c.ifNoneMatch_ = entityTag
12459 return c
12460 }
12461
12462
12463 func (c *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
12464 c.ctx_ = ctx
12465 return c
12466 }
12467
12468
12469
12470 func (c *AccountPermissionGroupsGetCall) Header() http.Header {
12471 if c.header_ == nil {
12472 c.header_ = make(http.Header)
12473 }
12474 return c.header_
12475 }
12476
12477 func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
12478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12479 if c.ifNoneMatch_ != "" {
12480 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12481 }
12482 var body io.Reader = nil
12483 c.urlParams_.Set("alt", alt)
12484 c.urlParams_.Set("prettyPrint", "false")
12485 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountPermissionGroups/{+id}")
12486 urls += "?" + c.urlParams_.Encode()
12487 req, err := http.NewRequest("GET", urls, body)
12488 if err != nil {
12489 return nil, err
12490 }
12491 req.Header = reqHeaders
12492 googleapi.Expand(req.URL, map[string]string{
12493 "profileId": strconv.FormatInt(c.profileId, 10),
12494 "id": strconv.FormatInt(c.id, 10),
12495 })
12496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12497 }
12498
12499
12500
12501
12502
12503
12504
12505 func (c *AccountPermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroup, error) {
12506 gensupport.SetOptions(c.urlParams_, opts...)
12507 res, err := c.doRequest("json")
12508 if res != nil && res.StatusCode == http.StatusNotModified {
12509 if res.Body != nil {
12510 res.Body.Close()
12511 }
12512 return nil, gensupport.WrapError(&googleapi.Error{
12513 Code: res.StatusCode,
12514 Header: res.Header,
12515 })
12516 }
12517 if err != nil {
12518 return nil, err
12519 }
12520 defer googleapi.CloseBody(res)
12521 if err := googleapi.CheckResponse(res); err != nil {
12522 return nil, gensupport.WrapError(err)
12523 }
12524 ret := &AccountPermissionGroup{
12525 ServerResponse: googleapi.ServerResponse{
12526 Header: res.Header,
12527 HTTPStatusCode: res.StatusCode,
12528 },
12529 }
12530 target := &ret
12531 if err := gensupport.DecodeResponse(target, res); err != nil {
12532 return nil, err
12533 }
12534 return ret, nil
12535 }
12536
12537 type AccountPermissionGroupsListCall struct {
12538 s *Service
12539 profileId int64
12540 urlParams_ gensupport.URLParams
12541 ifNoneMatch_ string
12542 ctx_ context.Context
12543 header_ http.Header
12544 }
12545
12546
12547
12548
12549 func (r *AccountPermissionGroupsService) List(profileId int64) *AccountPermissionGroupsListCall {
12550 c := &AccountPermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12551 c.profileId = profileId
12552 return c
12553 }
12554
12555
12556
12557
12558 func (c *AccountPermissionGroupsListCall) Fields(s ...googleapi.Field) *AccountPermissionGroupsListCall {
12559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12560 return c
12561 }
12562
12563
12564
12565
12566 func (c *AccountPermissionGroupsListCall) IfNoneMatch(entityTag string) *AccountPermissionGroupsListCall {
12567 c.ifNoneMatch_ = entityTag
12568 return c
12569 }
12570
12571
12572 func (c *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
12573 c.ctx_ = ctx
12574 return c
12575 }
12576
12577
12578
12579 func (c *AccountPermissionGroupsListCall) Header() http.Header {
12580 if c.header_ == nil {
12581 c.header_ = make(http.Header)
12582 }
12583 return c.header_
12584 }
12585
12586 func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
12587 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12588 if c.ifNoneMatch_ != "" {
12589 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12590 }
12591 var body io.Reader = nil
12592 c.urlParams_.Set("alt", alt)
12593 c.urlParams_.Set("prettyPrint", "false")
12594 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountPermissionGroups")
12595 urls += "?" + c.urlParams_.Encode()
12596 req, err := http.NewRequest("GET", urls, body)
12597 if err != nil {
12598 return nil, err
12599 }
12600 req.Header = reqHeaders
12601 googleapi.Expand(req.URL, map[string]string{
12602 "profileId": strconv.FormatInt(c.profileId, 10),
12603 })
12604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12605 }
12606
12607
12608
12609
12610
12611
12612
12613 func (c *AccountPermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionGroupsListResponse, error) {
12614 gensupport.SetOptions(c.urlParams_, opts...)
12615 res, err := c.doRequest("json")
12616 if res != nil && res.StatusCode == http.StatusNotModified {
12617 if res.Body != nil {
12618 res.Body.Close()
12619 }
12620 return nil, gensupport.WrapError(&googleapi.Error{
12621 Code: res.StatusCode,
12622 Header: res.Header,
12623 })
12624 }
12625 if err != nil {
12626 return nil, err
12627 }
12628 defer googleapi.CloseBody(res)
12629 if err := googleapi.CheckResponse(res); err != nil {
12630 return nil, gensupport.WrapError(err)
12631 }
12632 ret := &AccountPermissionGroupsListResponse{
12633 ServerResponse: googleapi.ServerResponse{
12634 Header: res.Header,
12635 HTTPStatusCode: res.StatusCode,
12636 },
12637 }
12638 target := &ret
12639 if err := gensupport.DecodeResponse(target, res); err != nil {
12640 return nil, err
12641 }
12642 return ret, nil
12643 }
12644
12645 type AccountPermissionsGetCall struct {
12646 s *Service
12647 profileId int64
12648 id int64
12649 urlParams_ gensupport.URLParams
12650 ifNoneMatch_ string
12651 ctx_ context.Context
12652 header_ http.Header
12653 }
12654
12655
12656
12657
12658
12659 func (r *AccountPermissionsService) Get(profileId int64, id int64) *AccountPermissionsGetCall {
12660 c := &AccountPermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12661 c.profileId = profileId
12662 c.id = id
12663 return c
12664 }
12665
12666
12667
12668
12669 func (c *AccountPermissionsGetCall) Fields(s ...googleapi.Field) *AccountPermissionsGetCall {
12670 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12671 return c
12672 }
12673
12674
12675
12676
12677 func (c *AccountPermissionsGetCall) IfNoneMatch(entityTag string) *AccountPermissionsGetCall {
12678 c.ifNoneMatch_ = entityTag
12679 return c
12680 }
12681
12682
12683 func (c *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
12684 c.ctx_ = ctx
12685 return c
12686 }
12687
12688
12689
12690 func (c *AccountPermissionsGetCall) Header() http.Header {
12691 if c.header_ == nil {
12692 c.header_ = make(http.Header)
12693 }
12694 return c.header_
12695 }
12696
12697 func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
12698 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12699 if c.ifNoneMatch_ != "" {
12700 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12701 }
12702 var body io.Reader = nil
12703 c.urlParams_.Set("alt", alt)
12704 c.urlParams_.Set("prettyPrint", "false")
12705 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountPermissions/{+id}")
12706 urls += "?" + c.urlParams_.Encode()
12707 req, err := http.NewRequest("GET", urls, body)
12708 if err != nil {
12709 return nil, err
12710 }
12711 req.Header = reqHeaders
12712 googleapi.Expand(req.URL, map[string]string{
12713 "profileId": strconv.FormatInt(c.profileId, 10),
12714 "id": strconv.FormatInt(c.id, 10),
12715 })
12716 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12717 }
12718
12719
12720
12721
12722
12723
12724
12725 func (c *AccountPermissionsGetCall) Do(opts ...googleapi.CallOption) (*AccountPermission, error) {
12726 gensupport.SetOptions(c.urlParams_, opts...)
12727 res, err := c.doRequest("json")
12728 if res != nil && res.StatusCode == http.StatusNotModified {
12729 if res.Body != nil {
12730 res.Body.Close()
12731 }
12732 return nil, gensupport.WrapError(&googleapi.Error{
12733 Code: res.StatusCode,
12734 Header: res.Header,
12735 })
12736 }
12737 if err != nil {
12738 return nil, err
12739 }
12740 defer googleapi.CloseBody(res)
12741 if err := googleapi.CheckResponse(res); err != nil {
12742 return nil, gensupport.WrapError(err)
12743 }
12744 ret := &AccountPermission{
12745 ServerResponse: googleapi.ServerResponse{
12746 Header: res.Header,
12747 HTTPStatusCode: res.StatusCode,
12748 },
12749 }
12750 target := &ret
12751 if err := gensupport.DecodeResponse(target, res); err != nil {
12752 return nil, err
12753 }
12754 return ret, nil
12755 }
12756
12757 type AccountPermissionsListCall struct {
12758 s *Service
12759 profileId int64
12760 urlParams_ gensupport.URLParams
12761 ifNoneMatch_ string
12762 ctx_ context.Context
12763 header_ http.Header
12764 }
12765
12766
12767
12768
12769 func (r *AccountPermissionsService) List(profileId int64) *AccountPermissionsListCall {
12770 c := &AccountPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12771 c.profileId = profileId
12772 return c
12773 }
12774
12775
12776
12777
12778 func (c *AccountPermissionsListCall) Fields(s ...googleapi.Field) *AccountPermissionsListCall {
12779 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12780 return c
12781 }
12782
12783
12784
12785
12786 func (c *AccountPermissionsListCall) IfNoneMatch(entityTag string) *AccountPermissionsListCall {
12787 c.ifNoneMatch_ = entityTag
12788 return c
12789 }
12790
12791
12792 func (c *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
12793 c.ctx_ = ctx
12794 return c
12795 }
12796
12797
12798
12799 func (c *AccountPermissionsListCall) Header() http.Header {
12800 if c.header_ == nil {
12801 c.header_ = make(http.Header)
12802 }
12803 return c.header_
12804 }
12805
12806 func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
12807 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12808 if c.ifNoneMatch_ != "" {
12809 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12810 }
12811 var body io.Reader = nil
12812 c.urlParams_.Set("alt", alt)
12813 c.urlParams_.Set("prettyPrint", "false")
12814 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountPermissions")
12815 urls += "?" + c.urlParams_.Encode()
12816 req, err := http.NewRequest("GET", urls, body)
12817 if err != nil {
12818 return nil, err
12819 }
12820 req.Header = reqHeaders
12821 googleapi.Expand(req.URL, map[string]string{
12822 "profileId": strconv.FormatInt(c.profileId, 10),
12823 })
12824 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12825 }
12826
12827
12828
12829
12830
12831
12832
12833 func (c *AccountPermissionsListCall) Do(opts ...googleapi.CallOption) (*AccountPermissionsListResponse, error) {
12834 gensupport.SetOptions(c.urlParams_, opts...)
12835 res, err := c.doRequest("json")
12836 if res != nil && res.StatusCode == http.StatusNotModified {
12837 if res.Body != nil {
12838 res.Body.Close()
12839 }
12840 return nil, gensupport.WrapError(&googleapi.Error{
12841 Code: res.StatusCode,
12842 Header: res.Header,
12843 })
12844 }
12845 if err != nil {
12846 return nil, err
12847 }
12848 defer googleapi.CloseBody(res)
12849 if err := googleapi.CheckResponse(res); err != nil {
12850 return nil, gensupport.WrapError(err)
12851 }
12852 ret := &AccountPermissionsListResponse{
12853 ServerResponse: googleapi.ServerResponse{
12854 Header: res.Header,
12855 HTTPStatusCode: res.StatusCode,
12856 },
12857 }
12858 target := &ret
12859 if err := gensupport.DecodeResponse(target, res); err != nil {
12860 return nil, err
12861 }
12862 return ret, nil
12863 }
12864
12865 type AccountUserProfilesGetCall struct {
12866 s *Service
12867 profileId int64
12868 id int64
12869 urlParams_ gensupport.URLParams
12870 ifNoneMatch_ string
12871 ctx_ context.Context
12872 header_ http.Header
12873 }
12874
12875
12876
12877
12878
12879 func (r *AccountUserProfilesService) Get(profileId int64, id int64) *AccountUserProfilesGetCall {
12880 c := &AccountUserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12881 c.profileId = profileId
12882 c.id = id
12883 return c
12884 }
12885
12886
12887
12888
12889 func (c *AccountUserProfilesGetCall) Fields(s ...googleapi.Field) *AccountUserProfilesGetCall {
12890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
12891 return c
12892 }
12893
12894
12895
12896
12897 func (c *AccountUserProfilesGetCall) IfNoneMatch(entityTag string) *AccountUserProfilesGetCall {
12898 c.ifNoneMatch_ = entityTag
12899 return c
12900 }
12901
12902
12903 func (c *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
12904 c.ctx_ = ctx
12905 return c
12906 }
12907
12908
12909
12910 func (c *AccountUserProfilesGetCall) Header() http.Header {
12911 if c.header_ == nil {
12912 c.header_ = make(http.Header)
12913 }
12914 return c.header_
12915 }
12916
12917 func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
12918 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
12919 if c.ifNoneMatch_ != "" {
12920 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12921 }
12922 var body io.Reader = nil
12923 c.urlParams_.Set("alt", alt)
12924 c.urlParams_.Set("prettyPrint", "false")
12925 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/accountUserProfiles/{+id}")
12926 urls += "?" + c.urlParams_.Encode()
12927 req, err := http.NewRequest("GET", urls, body)
12928 if err != nil {
12929 return nil, err
12930 }
12931 req.Header = reqHeaders
12932 googleapi.Expand(req.URL, map[string]string{
12933 "profileId": strconv.FormatInt(c.profileId, 10),
12934 "id": strconv.FormatInt(c.id, 10),
12935 })
12936 return gensupport.SendRequest(c.ctx_, c.s.client, req)
12937 }
12938
12939
12940
12941
12942
12943
12944
12945 func (c *AccountUserProfilesGetCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
12946 gensupport.SetOptions(c.urlParams_, opts...)
12947 res, err := c.doRequest("json")
12948 if res != nil && res.StatusCode == http.StatusNotModified {
12949 if res.Body != nil {
12950 res.Body.Close()
12951 }
12952 return nil, gensupport.WrapError(&googleapi.Error{
12953 Code: res.StatusCode,
12954 Header: res.Header,
12955 })
12956 }
12957 if err != nil {
12958 return nil, err
12959 }
12960 defer googleapi.CloseBody(res)
12961 if err := googleapi.CheckResponse(res); err != nil {
12962 return nil, gensupport.WrapError(err)
12963 }
12964 ret := &AccountUserProfile{
12965 ServerResponse: googleapi.ServerResponse{
12966 Header: res.Header,
12967 HTTPStatusCode: res.StatusCode,
12968 },
12969 }
12970 target := &ret
12971 if err := gensupport.DecodeResponse(target, res); err != nil {
12972 return nil, err
12973 }
12974 return ret, nil
12975 }
12976
12977 type AccountUserProfilesInsertCall struct {
12978 s *Service
12979 profileId int64
12980 accountuserprofile *AccountUserProfile
12981 urlParams_ gensupport.URLParams
12982 ctx_ context.Context
12983 header_ http.Header
12984 }
12985
12986
12987
12988
12989 func (r *AccountUserProfilesService) Insert(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesInsertCall {
12990 c := &AccountUserProfilesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12991 c.profileId = profileId
12992 c.accountuserprofile = accountuserprofile
12993 return c
12994 }
12995
12996
12997
12998
12999 func (c *AccountUserProfilesInsertCall) Fields(s ...googleapi.Field) *AccountUserProfilesInsertCall {
13000 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13001 return c
13002 }
13003
13004
13005 func (c *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
13006 c.ctx_ = ctx
13007 return c
13008 }
13009
13010
13011
13012 func (c *AccountUserProfilesInsertCall) Header() http.Header {
13013 if c.header_ == nil {
13014 c.header_ = make(http.Header)
13015 }
13016 return c.header_
13017 }
13018
13019 func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
13020 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13021 var body io.Reader = nil
13022 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
13023 if err != nil {
13024 return nil, err
13025 }
13026 c.urlParams_.Set("alt", alt)
13027 c.urlParams_.Set("prettyPrint", "false")
13028 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountUserProfiles")
13029 urls += "?" + c.urlParams_.Encode()
13030 req, err := http.NewRequest("POST", urls, body)
13031 if err != nil {
13032 return nil, err
13033 }
13034 req.Header = reqHeaders
13035 googleapi.Expand(req.URL, map[string]string{
13036 "profileId": strconv.FormatInt(c.profileId, 10),
13037 })
13038 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13039 }
13040
13041
13042
13043
13044
13045
13046
13047 func (c *AccountUserProfilesInsertCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
13048 gensupport.SetOptions(c.urlParams_, opts...)
13049 res, err := c.doRequest("json")
13050 if res != nil && res.StatusCode == http.StatusNotModified {
13051 if res.Body != nil {
13052 res.Body.Close()
13053 }
13054 return nil, gensupport.WrapError(&googleapi.Error{
13055 Code: res.StatusCode,
13056 Header: res.Header,
13057 })
13058 }
13059 if err != nil {
13060 return nil, err
13061 }
13062 defer googleapi.CloseBody(res)
13063 if err := googleapi.CheckResponse(res); err != nil {
13064 return nil, gensupport.WrapError(err)
13065 }
13066 ret := &AccountUserProfile{
13067 ServerResponse: googleapi.ServerResponse{
13068 Header: res.Header,
13069 HTTPStatusCode: res.StatusCode,
13070 },
13071 }
13072 target := &ret
13073 if err := gensupport.DecodeResponse(target, res); err != nil {
13074 return nil, err
13075 }
13076 return ret, nil
13077 }
13078
13079 type AccountUserProfilesListCall struct {
13080 s *Service
13081 profileId int64
13082 urlParams_ gensupport.URLParams
13083 ifNoneMatch_ string
13084 ctx_ context.Context
13085 header_ http.Header
13086 }
13087
13088
13089
13090
13091
13092 func (r *AccountUserProfilesService) List(profileId int64) *AccountUserProfilesListCall {
13093 c := &AccountUserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13094 c.profileId = profileId
13095 return c
13096 }
13097
13098
13099
13100 func (c *AccountUserProfilesListCall) Active(active bool) *AccountUserProfilesListCall {
13101 c.urlParams_.Set("active", fmt.Sprint(active))
13102 return c
13103 }
13104
13105
13106
13107 func (c *AccountUserProfilesListCall) Ids(ids ...int64) *AccountUserProfilesListCall {
13108 var ids_ []string
13109 for _, v := range ids {
13110 ids_ = append(ids_, fmt.Sprint(v))
13111 }
13112 c.urlParams_.SetMulti("ids", ids_)
13113 return c
13114 }
13115
13116
13117
13118 func (c *AccountUserProfilesListCall) MaxResults(maxResults int64) *AccountUserProfilesListCall {
13119 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13120 return c
13121 }
13122
13123
13124
13125 func (c *AccountUserProfilesListCall) PageToken(pageToken string) *AccountUserProfilesListCall {
13126 c.urlParams_.Set("pageToken", pageToken)
13127 return c
13128 }
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138 func (c *AccountUserProfilesListCall) SearchString(searchString string) *AccountUserProfilesListCall {
13139 c.urlParams_.Set("searchString", searchString)
13140 return c
13141 }
13142
13143
13144
13145
13146
13147
13148
13149
13150 func (c *AccountUserProfilesListCall) SortField(sortField string) *AccountUserProfilesListCall {
13151 c.urlParams_.Set("sortField", sortField)
13152 return c
13153 }
13154
13155
13156
13157
13158
13159
13160
13161 func (c *AccountUserProfilesListCall) SortOrder(sortOrder string) *AccountUserProfilesListCall {
13162 c.urlParams_.Set("sortOrder", sortOrder)
13163 return c
13164 }
13165
13166
13167
13168 func (c *AccountUserProfilesListCall) SubaccountId(subaccountId int64) *AccountUserProfilesListCall {
13169 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
13170 return c
13171 }
13172
13173
13174
13175 func (c *AccountUserProfilesListCall) UserRoleId(userRoleId int64) *AccountUserProfilesListCall {
13176 c.urlParams_.Set("userRoleId", fmt.Sprint(userRoleId))
13177 return c
13178 }
13179
13180
13181
13182
13183 func (c *AccountUserProfilesListCall) Fields(s ...googleapi.Field) *AccountUserProfilesListCall {
13184 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13185 return c
13186 }
13187
13188
13189
13190
13191 func (c *AccountUserProfilesListCall) IfNoneMatch(entityTag string) *AccountUserProfilesListCall {
13192 c.ifNoneMatch_ = entityTag
13193 return c
13194 }
13195
13196
13197 func (c *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
13198 c.ctx_ = ctx
13199 return c
13200 }
13201
13202
13203
13204 func (c *AccountUserProfilesListCall) Header() http.Header {
13205 if c.header_ == nil {
13206 c.header_ = make(http.Header)
13207 }
13208 return c.header_
13209 }
13210
13211 func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
13212 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13213 if c.ifNoneMatch_ != "" {
13214 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13215 }
13216 var body io.Reader = nil
13217 c.urlParams_.Set("alt", alt)
13218 c.urlParams_.Set("prettyPrint", "false")
13219 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountUserProfiles")
13220 urls += "?" + c.urlParams_.Encode()
13221 req, err := http.NewRequest("GET", urls, body)
13222 if err != nil {
13223 return nil, err
13224 }
13225 req.Header = reqHeaders
13226 googleapi.Expand(req.URL, map[string]string{
13227 "profileId": strconv.FormatInt(c.profileId, 10),
13228 })
13229 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13230 }
13231
13232
13233
13234
13235
13236
13237
13238 func (c *AccountUserProfilesListCall) Do(opts ...googleapi.CallOption) (*AccountUserProfilesListResponse, error) {
13239 gensupport.SetOptions(c.urlParams_, opts...)
13240 res, err := c.doRequest("json")
13241 if res != nil && res.StatusCode == http.StatusNotModified {
13242 if res.Body != nil {
13243 res.Body.Close()
13244 }
13245 return nil, gensupport.WrapError(&googleapi.Error{
13246 Code: res.StatusCode,
13247 Header: res.Header,
13248 })
13249 }
13250 if err != nil {
13251 return nil, err
13252 }
13253 defer googleapi.CloseBody(res)
13254 if err := googleapi.CheckResponse(res); err != nil {
13255 return nil, gensupport.WrapError(err)
13256 }
13257 ret := &AccountUserProfilesListResponse{
13258 ServerResponse: googleapi.ServerResponse{
13259 Header: res.Header,
13260 HTTPStatusCode: res.StatusCode,
13261 },
13262 }
13263 target := &ret
13264 if err := gensupport.DecodeResponse(target, res); err != nil {
13265 return nil, err
13266 }
13267 return ret, nil
13268 }
13269
13270
13271
13272
13273 func (c *AccountUserProfilesListCall) Pages(ctx context.Context, f func(*AccountUserProfilesListResponse) error) error {
13274 c.ctx_ = ctx
13275 defer c.PageToken(c.urlParams_.Get("pageToken"))
13276 for {
13277 x, err := c.Do()
13278 if err != nil {
13279 return err
13280 }
13281 if err := f(x); err != nil {
13282 return err
13283 }
13284 if x.NextPageToken == "" {
13285 return nil
13286 }
13287 c.PageToken(x.NextPageToken)
13288 }
13289 }
13290
13291 type AccountUserProfilesPatchCall struct {
13292 s *Service
13293 profileId int64
13294 accountuserprofile *AccountUserProfile
13295 urlParams_ gensupport.URLParams
13296 ctx_ context.Context
13297 header_ http.Header
13298 }
13299
13300
13301
13302
13303
13304 func (r *AccountUserProfilesService) Patch(profileId int64, id int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesPatchCall {
13305 c := &AccountUserProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13306 c.profileId = profileId
13307 c.urlParams_.Set("id", fmt.Sprint(id))
13308 c.accountuserprofile = accountuserprofile
13309 return c
13310 }
13311
13312
13313
13314
13315 func (c *AccountUserProfilesPatchCall) Fields(s ...googleapi.Field) *AccountUserProfilesPatchCall {
13316 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13317 return c
13318 }
13319
13320
13321 func (c *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
13322 c.ctx_ = ctx
13323 return c
13324 }
13325
13326
13327
13328 func (c *AccountUserProfilesPatchCall) Header() http.Header {
13329 if c.header_ == nil {
13330 c.header_ = make(http.Header)
13331 }
13332 return c.header_
13333 }
13334
13335 func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
13336 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13337 var body io.Reader = nil
13338 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
13339 if err != nil {
13340 return nil, err
13341 }
13342 c.urlParams_.Set("alt", alt)
13343 c.urlParams_.Set("prettyPrint", "false")
13344 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountUserProfiles")
13345 urls += "?" + c.urlParams_.Encode()
13346 req, err := http.NewRequest("PATCH", urls, body)
13347 if err != nil {
13348 return nil, err
13349 }
13350 req.Header = reqHeaders
13351 googleapi.Expand(req.URL, map[string]string{
13352 "profileId": strconv.FormatInt(c.profileId, 10),
13353 })
13354 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13355 }
13356
13357
13358
13359
13360
13361
13362
13363 func (c *AccountUserProfilesPatchCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
13364 gensupport.SetOptions(c.urlParams_, opts...)
13365 res, err := c.doRequest("json")
13366 if res != nil && res.StatusCode == http.StatusNotModified {
13367 if res.Body != nil {
13368 res.Body.Close()
13369 }
13370 return nil, gensupport.WrapError(&googleapi.Error{
13371 Code: res.StatusCode,
13372 Header: res.Header,
13373 })
13374 }
13375 if err != nil {
13376 return nil, err
13377 }
13378 defer googleapi.CloseBody(res)
13379 if err := googleapi.CheckResponse(res); err != nil {
13380 return nil, gensupport.WrapError(err)
13381 }
13382 ret := &AccountUserProfile{
13383 ServerResponse: googleapi.ServerResponse{
13384 Header: res.Header,
13385 HTTPStatusCode: res.StatusCode,
13386 },
13387 }
13388 target := &ret
13389 if err := gensupport.DecodeResponse(target, res); err != nil {
13390 return nil, err
13391 }
13392 return ret, nil
13393 }
13394
13395 type AccountUserProfilesUpdateCall struct {
13396 s *Service
13397 profileId int64
13398 accountuserprofile *AccountUserProfile
13399 urlParams_ gensupport.URLParams
13400 ctx_ context.Context
13401 header_ http.Header
13402 }
13403
13404
13405
13406
13407 func (r *AccountUserProfilesService) Update(profileId int64, accountuserprofile *AccountUserProfile) *AccountUserProfilesUpdateCall {
13408 c := &AccountUserProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13409 c.profileId = profileId
13410 c.accountuserprofile = accountuserprofile
13411 return c
13412 }
13413
13414
13415
13416
13417 func (c *AccountUserProfilesUpdateCall) Fields(s ...googleapi.Field) *AccountUserProfilesUpdateCall {
13418 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13419 return c
13420 }
13421
13422
13423 func (c *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
13424 c.ctx_ = ctx
13425 return c
13426 }
13427
13428
13429
13430 func (c *AccountUserProfilesUpdateCall) Header() http.Header {
13431 if c.header_ == nil {
13432 c.header_ = make(http.Header)
13433 }
13434 return c.header_
13435 }
13436
13437 func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
13438 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13439 var body io.Reader = nil
13440 body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
13441 if err != nil {
13442 return nil, err
13443 }
13444 c.urlParams_.Set("alt", alt)
13445 c.urlParams_.Set("prettyPrint", "false")
13446 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accountUserProfiles")
13447 urls += "?" + c.urlParams_.Encode()
13448 req, err := http.NewRequest("PUT", urls, body)
13449 if err != nil {
13450 return nil, err
13451 }
13452 req.Header = reqHeaders
13453 googleapi.Expand(req.URL, map[string]string{
13454 "profileId": strconv.FormatInt(c.profileId, 10),
13455 })
13456 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13457 }
13458
13459
13460
13461
13462
13463
13464
13465 func (c *AccountUserProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*AccountUserProfile, error) {
13466 gensupport.SetOptions(c.urlParams_, opts...)
13467 res, err := c.doRequest("json")
13468 if res != nil && res.StatusCode == http.StatusNotModified {
13469 if res.Body != nil {
13470 res.Body.Close()
13471 }
13472 return nil, gensupport.WrapError(&googleapi.Error{
13473 Code: res.StatusCode,
13474 Header: res.Header,
13475 })
13476 }
13477 if err != nil {
13478 return nil, err
13479 }
13480 defer googleapi.CloseBody(res)
13481 if err := googleapi.CheckResponse(res); err != nil {
13482 return nil, gensupport.WrapError(err)
13483 }
13484 ret := &AccountUserProfile{
13485 ServerResponse: googleapi.ServerResponse{
13486 Header: res.Header,
13487 HTTPStatusCode: res.StatusCode,
13488 },
13489 }
13490 target := &ret
13491 if err := gensupport.DecodeResponse(target, res); err != nil {
13492 return nil, err
13493 }
13494 return ret, nil
13495 }
13496
13497 type AccountsGetCall struct {
13498 s *Service
13499 profileId int64
13500 id int64
13501 urlParams_ gensupport.URLParams
13502 ifNoneMatch_ string
13503 ctx_ context.Context
13504 header_ http.Header
13505 }
13506
13507
13508
13509
13510
13511 func (r *AccountsService) Get(profileId int64, id int64) *AccountsGetCall {
13512 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13513 c.profileId = profileId
13514 c.id = id
13515 return c
13516 }
13517
13518
13519
13520
13521 func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
13522 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13523 return c
13524 }
13525
13526
13527
13528
13529 func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
13530 c.ifNoneMatch_ = entityTag
13531 return c
13532 }
13533
13534
13535 func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
13536 c.ctx_ = ctx
13537 return c
13538 }
13539
13540
13541
13542 func (c *AccountsGetCall) Header() http.Header {
13543 if c.header_ == nil {
13544 c.header_ = make(http.Header)
13545 }
13546 return c.header_
13547 }
13548
13549 func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
13550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13551 if c.ifNoneMatch_ != "" {
13552 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13553 }
13554 var body io.Reader = nil
13555 c.urlParams_.Set("alt", alt)
13556 c.urlParams_.Set("prettyPrint", "false")
13557 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accounts/{+id}")
13558 urls += "?" + c.urlParams_.Encode()
13559 req, err := http.NewRequest("GET", urls, body)
13560 if err != nil {
13561 return nil, err
13562 }
13563 req.Header = reqHeaders
13564 googleapi.Expand(req.URL, map[string]string{
13565 "profileId": strconv.FormatInt(c.profileId, 10),
13566 "id": strconv.FormatInt(c.id, 10),
13567 })
13568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13569 }
13570
13571
13572
13573
13574
13575
13576 func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
13577 gensupport.SetOptions(c.urlParams_, opts...)
13578 res, err := c.doRequest("json")
13579 if res != nil && res.StatusCode == http.StatusNotModified {
13580 if res.Body != nil {
13581 res.Body.Close()
13582 }
13583 return nil, gensupport.WrapError(&googleapi.Error{
13584 Code: res.StatusCode,
13585 Header: res.Header,
13586 })
13587 }
13588 if err != nil {
13589 return nil, err
13590 }
13591 defer googleapi.CloseBody(res)
13592 if err := googleapi.CheckResponse(res); err != nil {
13593 return nil, gensupport.WrapError(err)
13594 }
13595 ret := &Account{
13596 ServerResponse: googleapi.ServerResponse{
13597 Header: res.Header,
13598 HTTPStatusCode: res.StatusCode,
13599 },
13600 }
13601 target := &ret
13602 if err := gensupport.DecodeResponse(target, res); err != nil {
13603 return nil, err
13604 }
13605 return ret, nil
13606 }
13607
13608 type AccountsListCall struct {
13609 s *Service
13610 profileId int64
13611 urlParams_ gensupport.URLParams
13612 ifNoneMatch_ string
13613 ctx_ context.Context
13614 header_ http.Header
13615 }
13616
13617
13618
13619
13620
13621 func (r *AccountsService) List(profileId int64) *AccountsListCall {
13622 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13623 c.profileId = profileId
13624 return c
13625 }
13626
13627
13628
13629 func (c *AccountsListCall) Active(active bool) *AccountsListCall {
13630 c.urlParams_.Set("active", fmt.Sprint(active))
13631 return c
13632 }
13633
13634
13635 func (c *AccountsListCall) Ids(ids ...int64) *AccountsListCall {
13636 var ids_ []string
13637 for _, v := range ids {
13638 ids_ = append(ids_, fmt.Sprint(v))
13639 }
13640 c.urlParams_.SetMulti("ids", ids_)
13641 return c
13642 }
13643
13644
13645
13646 func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
13647 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13648 return c
13649 }
13650
13651
13652
13653 func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
13654 c.urlParams_.Set("pageToken", pageToken)
13655 return c
13656 }
13657
13658
13659
13660
13661
13662
13663
13664
13665 func (c *AccountsListCall) SearchString(searchString string) *AccountsListCall {
13666 c.urlParams_.Set("searchString", searchString)
13667 return c
13668 }
13669
13670
13671
13672
13673
13674
13675
13676
13677 func (c *AccountsListCall) SortField(sortField string) *AccountsListCall {
13678 c.urlParams_.Set("sortField", sortField)
13679 return c
13680 }
13681
13682
13683
13684
13685
13686
13687
13688 func (c *AccountsListCall) SortOrder(sortOrder string) *AccountsListCall {
13689 c.urlParams_.Set("sortOrder", sortOrder)
13690 return c
13691 }
13692
13693
13694
13695
13696 func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
13697 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13698 return c
13699 }
13700
13701
13702
13703
13704 func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
13705 c.ifNoneMatch_ = entityTag
13706 return c
13707 }
13708
13709
13710 func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
13711 c.ctx_ = ctx
13712 return c
13713 }
13714
13715
13716
13717 func (c *AccountsListCall) Header() http.Header {
13718 if c.header_ == nil {
13719 c.header_ = make(http.Header)
13720 }
13721 return c.header_
13722 }
13723
13724 func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
13725 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
13726 if c.ifNoneMatch_ != "" {
13727 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13728 }
13729 var body io.Reader = nil
13730 c.urlParams_.Set("alt", alt)
13731 c.urlParams_.Set("prettyPrint", "false")
13732 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accounts")
13733 urls += "?" + c.urlParams_.Encode()
13734 req, err := http.NewRequest("GET", urls, body)
13735 if err != nil {
13736 return nil, err
13737 }
13738 req.Header = reqHeaders
13739 googleapi.Expand(req.URL, map[string]string{
13740 "profileId": strconv.FormatInt(c.profileId, 10),
13741 })
13742 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13743 }
13744
13745
13746
13747
13748
13749
13750
13751 func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
13752 gensupport.SetOptions(c.urlParams_, opts...)
13753 res, err := c.doRequest("json")
13754 if res != nil && res.StatusCode == http.StatusNotModified {
13755 if res.Body != nil {
13756 res.Body.Close()
13757 }
13758 return nil, gensupport.WrapError(&googleapi.Error{
13759 Code: res.StatusCode,
13760 Header: res.Header,
13761 })
13762 }
13763 if err != nil {
13764 return nil, err
13765 }
13766 defer googleapi.CloseBody(res)
13767 if err := googleapi.CheckResponse(res); err != nil {
13768 return nil, gensupport.WrapError(err)
13769 }
13770 ret := &AccountsListResponse{
13771 ServerResponse: googleapi.ServerResponse{
13772 Header: res.Header,
13773 HTTPStatusCode: res.StatusCode,
13774 },
13775 }
13776 target := &ret
13777 if err := gensupport.DecodeResponse(target, res); err != nil {
13778 return nil, err
13779 }
13780 return ret, nil
13781 }
13782
13783
13784
13785
13786 func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
13787 c.ctx_ = ctx
13788 defer c.PageToken(c.urlParams_.Get("pageToken"))
13789 for {
13790 x, err := c.Do()
13791 if err != nil {
13792 return err
13793 }
13794 if err := f(x); err != nil {
13795 return err
13796 }
13797 if x.NextPageToken == "" {
13798 return nil
13799 }
13800 c.PageToken(x.NextPageToken)
13801 }
13802 }
13803
13804 type AccountsPatchCall struct {
13805 s *Service
13806 profileId int64
13807 account *Account
13808 urlParams_ gensupport.URLParams
13809 ctx_ context.Context
13810 header_ http.Header
13811 }
13812
13813
13814
13815
13816
13817 func (r *AccountsService) Patch(profileId int64, id int64, account *Account) *AccountsPatchCall {
13818 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13819 c.profileId = profileId
13820 c.urlParams_.Set("id", fmt.Sprint(id))
13821 c.account = account
13822 return c
13823 }
13824
13825
13826
13827
13828 func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
13829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13830 return c
13831 }
13832
13833
13834 func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
13835 c.ctx_ = ctx
13836 return c
13837 }
13838
13839
13840
13841 func (c *AccountsPatchCall) Header() http.Header {
13842 if c.header_ == nil {
13843 c.header_ = make(http.Header)
13844 }
13845 return c.header_
13846 }
13847
13848 func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
13849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13850 var body io.Reader = nil
13851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
13852 if err != nil {
13853 return nil, err
13854 }
13855 c.urlParams_.Set("alt", alt)
13856 c.urlParams_.Set("prettyPrint", "false")
13857 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accounts")
13858 urls += "?" + c.urlParams_.Encode()
13859 req, err := http.NewRequest("PATCH", urls, body)
13860 if err != nil {
13861 return nil, err
13862 }
13863 req.Header = reqHeaders
13864 googleapi.Expand(req.URL, map[string]string{
13865 "profileId": strconv.FormatInt(c.profileId, 10),
13866 })
13867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13868 }
13869
13870
13871
13872
13873
13874
13875 func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
13876 gensupport.SetOptions(c.urlParams_, opts...)
13877 res, err := c.doRequest("json")
13878 if res != nil && res.StatusCode == http.StatusNotModified {
13879 if res.Body != nil {
13880 res.Body.Close()
13881 }
13882 return nil, gensupport.WrapError(&googleapi.Error{
13883 Code: res.StatusCode,
13884 Header: res.Header,
13885 })
13886 }
13887 if err != nil {
13888 return nil, err
13889 }
13890 defer googleapi.CloseBody(res)
13891 if err := googleapi.CheckResponse(res); err != nil {
13892 return nil, gensupport.WrapError(err)
13893 }
13894 ret := &Account{
13895 ServerResponse: googleapi.ServerResponse{
13896 Header: res.Header,
13897 HTTPStatusCode: res.StatusCode,
13898 },
13899 }
13900 target := &ret
13901 if err := gensupport.DecodeResponse(target, res); err != nil {
13902 return nil, err
13903 }
13904 return ret, nil
13905 }
13906
13907 type AccountsUpdateCall struct {
13908 s *Service
13909 profileId int64
13910 account *Account
13911 urlParams_ gensupport.URLParams
13912 ctx_ context.Context
13913 header_ http.Header
13914 }
13915
13916
13917
13918
13919 func (r *AccountsService) Update(profileId int64, account *Account) *AccountsUpdateCall {
13920 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13921 c.profileId = profileId
13922 c.account = account
13923 return c
13924 }
13925
13926
13927
13928
13929 func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
13930 c.urlParams_.Set("fields", googleapi.CombineFields(s))
13931 return c
13932 }
13933
13934
13935 func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
13936 c.ctx_ = ctx
13937 return c
13938 }
13939
13940
13941
13942 func (c *AccountsUpdateCall) Header() http.Header {
13943 if c.header_ == nil {
13944 c.header_ = make(http.Header)
13945 }
13946 return c.header_
13947 }
13948
13949 func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
13950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
13951 var body io.Reader = nil
13952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
13953 if err != nil {
13954 return nil, err
13955 }
13956 c.urlParams_.Set("alt", alt)
13957 c.urlParams_.Set("prettyPrint", "false")
13958 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/accounts")
13959 urls += "?" + c.urlParams_.Encode()
13960 req, err := http.NewRequest("PUT", urls, body)
13961 if err != nil {
13962 return nil, err
13963 }
13964 req.Header = reqHeaders
13965 googleapi.Expand(req.URL, map[string]string{
13966 "profileId": strconv.FormatInt(c.profileId, 10),
13967 })
13968 return gensupport.SendRequest(c.ctx_, c.s.client, req)
13969 }
13970
13971
13972
13973
13974
13975
13976 func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
13977 gensupport.SetOptions(c.urlParams_, opts...)
13978 res, err := c.doRequest("json")
13979 if res != nil && res.StatusCode == http.StatusNotModified {
13980 if res.Body != nil {
13981 res.Body.Close()
13982 }
13983 return nil, gensupport.WrapError(&googleapi.Error{
13984 Code: res.StatusCode,
13985 Header: res.Header,
13986 })
13987 }
13988 if err != nil {
13989 return nil, err
13990 }
13991 defer googleapi.CloseBody(res)
13992 if err := googleapi.CheckResponse(res); err != nil {
13993 return nil, gensupport.WrapError(err)
13994 }
13995 ret := &Account{
13996 ServerResponse: googleapi.ServerResponse{
13997 Header: res.Header,
13998 HTTPStatusCode: res.StatusCode,
13999 },
14000 }
14001 target := &ret
14002 if err := gensupport.DecodeResponse(target, res); err != nil {
14003 return nil, err
14004 }
14005 return ret, nil
14006 }
14007
14008 type AdsGetCall struct {
14009 s *Service
14010 profileId int64
14011 id int64
14012 urlParams_ gensupport.URLParams
14013 ifNoneMatch_ string
14014 ctx_ context.Context
14015 header_ http.Header
14016 }
14017
14018
14019
14020
14021
14022 func (r *AdsService) Get(profileId int64, id int64) *AdsGetCall {
14023 c := &AdsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14024 c.profileId = profileId
14025 c.id = id
14026 return c
14027 }
14028
14029
14030
14031
14032 func (c *AdsGetCall) Fields(s ...googleapi.Field) *AdsGetCall {
14033 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14034 return c
14035 }
14036
14037
14038
14039
14040 func (c *AdsGetCall) IfNoneMatch(entityTag string) *AdsGetCall {
14041 c.ifNoneMatch_ = entityTag
14042 return c
14043 }
14044
14045
14046 func (c *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
14047 c.ctx_ = ctx
14048 return c
14049 }
14050
14051
14052
14053 func (c *AdsGetCall) Header() http.Header {
14054 if c.header_ == nil {
14055 c.header_ = make(http.Header)
14056 }
14057 return c.header_
14058 }
14059
14060 func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
14061 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14062 if c.ifNoneMatch_ != "" {
14063 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14064 }
14065 var body io.Reader = nil
14066 c.urlParams_.Set("alt", alt)
14067 c.urlParams_.Set("prettyPrint", "false")
14068 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/ads/{+id}")
14069 urls += "?" + c.urlParams_.Encode()
14070 req, err := http.NewRequest("GET", urls, body)
14071 if err != nil {
14072 return nil, err
14073 }
14074 req.Header = reqHeaders
14075 googleapi.Expand(req.URL, map[string]string{
14076 "profileId": strconv.FormatInt(c.profileId, 10),
14077 "id": strconv.FormatInt(c.id, 10),
14078 })
14079 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14080 }
14081
14082
14083
14084
14085
14086
14087 func (c *AdsGetCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
14088 gensupport.SetOptions(c.urlParams_, opts...)
14089 res, err := c.doRequest("json")
14090 if res != nil && res.StatusCode == http.StatusNotModified {
14091 if res.Body != nil {
14092 res.Body.Close()
14093 }
14094 return nil, gensupport.WrapError(&googleapi.Error{
14095 Code: res.StatusCode,
14096 Header: res.Header,
14097 })
14098 }
14099 if err != nil {
14100 return nil, err
14101 }
14102 defer googleapi.CloseBody(res)
14103 if err := googleapi.CheckResponse(res); err != nil {
14104 return nil, gensupport.WrapError(err)
14105 }
14106 ret := &Ad{
14107 ServerResponse: googleapi.ServerResponse{
14108 Header: res.Header,
14109 HTTPStatusCode: res.StatusCode,
14110 },
14111 }
14112 target := &ret
14113 if err := gensupport.DecodeResponse(target, res); err != nil {
14114 return nil, err
14115 }
14116 return ret, nil
14117 }
14118
14119 type AdsInsertCall struct {
14120 s *Service
14121 profileId int64
14122 ad *Ad
14123 urlParams_ gensupport.URLParams
14124 ctx_ context.Context
14125 header_ http.Header
14126 }
14127
14128
14129
14130
14131 func (r *AdsService) Insert(profileId int64, ad *Ad) *AdsInsertCall {
14132 c := &AdsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14133 c.profileId = profileId
14134 c.ad = ad
14135 return c
14136 }
14137
14138
14139
14140
14141 func (c *AdsInsertCall) Fields(s ...googleapi.Field) *AdsInsertCall {
14142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14143 return c
14144 }
14145
14146
14147 func (c *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
14148 c.ctx_ = ctx
14149 return c
14150 }
14151
14152
14153
14154 func (c *AdsInsertCall) Header() http.Header {
14155 if c.header_ == nil {
14156 c.header_ = make(http.Header)
14157 }
14158 return c.header_
14159 }
14160
14161 func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
14162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14163 var body io.Reader = nil
14164 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
14165 if err != nil {
14166 return nil, err
14167 }
14168 c.urlParams_.Set("alt", alt)
14169 c.urlParams_.Set("prettyPrint", "false")
14170 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/ads")
14171 urls += "?" + c.urlParams_.Encode()
14172 req, err := http.NewRequest("POST", urls, body)
14173 if err != nil {
14174 return nil, err
14175 }
14176 req.Header = reqHeaders
14177 googleapi.Expand(req.URL, map[string]string{
14178 "profileId": strconv.FormatInt(c.profileId, 10),
14179 })
14180 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14181 }
14182
14183
14184
14185
14186
14187
14188 func (c *AdsInsertCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
14189 gensupport.SetOptions(c.urlParams_, opts...)
14190 res, err := c.doRequest("json")
14191 if res != nil && res.StatusCode == http.StatusNotModified {
14192 if res.Body != nil {
14193 res.Body.Close()
14194 }
14195 return nil, gensupport.WrapError(&googleapi.Error{
14196 Code: res.StatusCode,
14197 Header: res.Header,
14198 })
14199 }
14200 if err != nil {
14201 return nil, err
14202 }
14203 defer googleapi.CloseBody(res)
14204 if err := googleapi.CheckResponse(res); err != nil {
14205 return nil, gensupport.WrapError(err)
14206 }
14207 ret := &Ad{
14208 ServerResponse: googleapi.ServerResponse{
14209 Header: res.Header,
14210 HTTPStatusCode: res.StatusCode,
14211 },
14212 }
14213 target := &ret
14214 if err := gensupport.DecodeResponse(target, res); err != nil {
14215 return nil, err
14216 }
14217 return ret, nil
14218 }
14219
14220 type AdsListCall struct {
14221 s *Service
14222 profileId int64
14223 urlParams_ gensupport.URLParams
14224 ifNoneMatch_ string
14225 ctx_ context.Context
14226 header_ http.Header
14227 }
14228
14229
14230
14231
14232
14233 func (r *AdsService) List(profileId int64) *AdsListCall {
14234 c := &AdsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14235 c.profileId = profileId
14236 return c
14237 }
14238
14239
14240 func (c *AdsListCall) Active(active bool) *AdsListCall {
14241 c.urlParams_.Set("active", fmt.Sprint(active))
14242 return c
14243 }
14244
14245
14246
14247 func (c *AdsListCall) AdvertiserId(advertiserId int64) *AdsListCall {
14248 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
14249 return c
14250 }
14251
14252
14253 func (c *AdsListCall) Archived(archived bool) *AdsListCall {
14254 c.urlParams_.Set("archived", fmt.Sprint(archived))
14255 return c
14256 }
14257
14258
14259
14260 func (c *AdsListCall) AudienceSegmentIds(audienceSegmentIds ...int64) *AdsListCall {
14261 var audienceSegmentIds_ []string
14262 for _, v := range audienceSegmentIds {
14263 audienceSegmentIds_ = append(audienceSegmentIds_, fmt.Sprint(v))
14264 }
14265 c.urlParams_.SetMulti("audienceSegmentIds", audienceSegmentIds_)
14266 return c
14267 }
14268
14269
14270
14271 func (c *AdsListCall) CampaignIds(campaignIds ...int64) *AdsListCall {
14272 var campaignIds_ []string
14273 for _, v := range campaignIds {
14274 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
14275 }
14276 c.urlParams_.SetMulti("campaignIds", campaignIds_)
14277 return c
14278 }
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296 func (c *AdsListCall) Compatibility(compatibility string) *AdsListCall {
14297 c.urlParams_.Set("compatibility", compatibility)
14298 return c
14299 }
14300
14301
14302
14303 func (c *AdsListCall) CreativeIds(creativeIds ...int64) *AdsListCall {
14304 var creativeIds_ []string
14305 for _, v := range creativeIds {
14306 creativeIds_ = append(creativeIds_, fmt.Sprint(v))
14307 }
14308 c.urlParams_.SetMulti("creativeIds", creativeIds_)
14309 return c
14310 }
14311
14312
14313
14314
14315 func (c *AdsListCall) CreativeOptimizationConfigurationIds(creativeOptimizationConfigurationIds ...int64) *AdsListCall {
14316 var creativeOptimizationConfigurationIds_ []string
14317 for _, v := range creativeOptimizationConfigurationIds {
14318 creativeOptimizationConfigurationIds_ = append(creativeOptimizationConfigurationIds_, fmt.Sprint(v))
14319 }
14320 c.urlParams_.SetMulti("creativeOptimizationConfigurationIds", creativeOptimizationConfigurationIds_)
14321 return c
14322 }
14323
14324
14325
14326
14327
14328 func (c *AdsListCall) DynamicClickTracker(dynamicClickTracker bool) *AdsListCall {
14329 c.urlParams_.Set("dynamicClickTracker", fmt.Sprint(dynamicClickTracker))
14330 return c
14331 }
14332
14333
14334 func (c *AdsListCall) Ids(ids ...int64) *AdsListCall {
14335 var ids_ []string
14336 for _, v := range ids {
14337 ids_ = append(ids_, fmt.Sprint(v))
14338 }
14339 c.urlParams_.SetMulti("ids", ids_)
14340 return c
14341 }
14342
14343
14344
14345 func (c *AdsListCall) LandingPageIds(landingPageIds ...int64) *AdsListCall {
14346 var landingPageIds_ []string
14347 for _, v := range landingPageIds {
14348 landingPageIds_ = append(landingPageIds_, fmt.Sprint(v))
14349 }
14350 c.urlParams_.SetMulti("landingPageIds", landingPageIds_)
14351 return c
14352 }
14353
14354
14355
14356 func (c *AdsListCall) MaxResults(maxResults int64) *AdsListCall {
14357 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14358 return c
14359 }
14360
14361
14362
14363 func (c *AdsListCall) OverriddenEventTagId(overriddenEventTagId int64) *AdsListCall {
14364 c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
14365 return c
14366 }
14367
14368
14369
14370 func (c *AdsListCall) PageToken(pageToken string) *AdsListCall {
14371 c.urlParams_.Set("pageToken", pageToken)
14372 return c
14373 }
14374
14375
14376
14377 func (c *AdsListCall) PlacementIds(placementIds ...int64) *AdsListCall {
14378 var placementIds_ []string
14379 for _, v := range placementIds {
14380 placementIds_ = append(placementIds_, fmt.Sprint(v))
14381 }
14382 c.urlParams_.SetMulti("placementIds", placementIds_)
14383 return c
14384 }
14385
14386
14387
14388 func (c *AdsListCall) RemarketingListIds(remarketingListIds ...int64) *AdsListCall {
14389 var remarketingListIds_ []string
14390 for _, v := range remarketingListIds {
14391 remarketingListIds_ = append(remarketingListIds_, fmt.Sprint(v))
14392 }
14393 c.urlParams_.SetMulti("remarketingListIds", remarketingListIds_)
14394 return c
14395 }
14396
14397
14398
14399
14400
14401
14402
14403 func (c *AdsListCall) SearchString(searchString string) *AdsListCall {
14404 c.urlParams_.Set("searchString", searchString)
14405 return c
14406 }
14407
14408
14409
14410 func (c *AdsListCall) SizeIds(sizeIds ...int64) *AdsListCall {
14411 var sizeIds_ []string
14412 for _, v := range sizeIds {
14413 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
14414 }
14415 c.urlParams_.SetMulti("sizeIds", sizeIds_)
14416 return c
14417 }
14418
14419
14420
14421
14422
14423
14424
14425
14426 func (c *AdsListCall) SortField(sortField string) *AdsListCall {
14427 c.urlParams_.Set("sortField", sortField)
14428 return c
14429 }
14430
14431
14432
14433
14434
14435
14436
14437 func (c *AdsListCall) SortOrder(sortOrder string) *AdsListCall {
14438 c.urlParams_.Set("sortOrder", sortOrder)
14439 return c
14440 }
14441
14442
14443
14444 func (c *AdsListCall) SslCompliant(sslCompliant bool) *AdsListCall {
14445 c.urlParams_.Set("sslCompliant", fmt.Sprint(sslCompliant))
14446 return c
14447 }
14448
14449
14450
14451 func (c *AdsListCall) SslRequired(sslRequired bool) *AdsListCall {
14452 c.urlParams_.Set("sslRequired", fmt.Sprint(sslRequired))
14453 return c
14454 }
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465 func (c *AdsListCall) Type(type_ ...string) *AdsListCall {
14466 c.urlParams_.SetMulti("type", append([]string{}, type_...))
14467 return c
14468 }
14469
14470
14471
14472
14473 func (c *AdsListCall) Fields(s ...googleapi.Field) *AdsListCall {
14474 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14475 return c
14476 }
14477
14478
14479
14480
14481 func (c *AdsListCall) IfNoneMatch(entityTag string) *AdsListCall {
14482 c.ifNoneMatch_ = entityTag
14483 return c
14484 }
14485
14486
14487 func (c *AdsListCall) Context(ctx context.Context) *AdsListCall {
14488 c.ctx_ = ctx
14489 return c
14490 }
14491
14492
14493
14494 func (c *AdsListCall) Header() http.Header {
14495 if c.header_ == nil {
14496 c.header_ = make(http.Header)
14497 }
14498 return c.header_
14499 }
14500
14501 func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
14502 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14503 if c.ifNoneMatch_ != "" {
14504 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14505 }
14506 var body io.Reader = nil
14507 c.urlParams_.Set("alt", alt)
14508 c.urlParams_.Set("prettyPrint", "false")
14509 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/ads")
14510 urls += "?" + c.urlParams_.Encode()
14511 req, err := http.NewRequest("GET", urls, body)
14512 if err != nil {
14513 return nil, err
14514 }
14515 req.Header = reqHeaders
14516 googleapi.Expand(req.URL, map[string]string{
14517 "profileId": strconv.FormatInt(c.profileId, 10),
14518 })
14519 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14520 }
14521
14522
14523
14524
14525
14526
14527
14528 func (c *AdsListCall) Do(opts ...googleapi.CallOption) (*AdsListResponse, error) {
14529 gensupport.SetOptions(c.urlParams_, opts...)
14530 res, err := c.doRequest("json")
14531 if res != nil && res.StatusCode == http.StatusNotModified {
14532 if res.Body != nil {
14533 res.Body.Close()
14534 }
14535 return nil, gensupport.WrapError(&googleapi.Error{
14536 Code: res.StatusCode,
14537 Header: res.Header,
14538 })
14539 }
14540 if err != nil {
14541 return nil, err
14542 }
14543 defer googleapi.CloseBody(res)
14544 if err := googleapi.CheckResponse(res); err != nil {
14545 return nil, gensupport.WrapError(err)
14546 }
14547 ret := &AdsListResponse{
14548 ServerResponse: googleapi.ServerResponse{
14549 Header: res.Header,
14550 HTTPStatusCode: res.StatusCode,
14551 },
14552 }
14553 target := &ret
14554 if err := gensupport.DecodeResponse(target, res); err != nil {
14555 return nil, err
14556 }
14557 return ret, nil
14558 }
14559
14560
14561
14562
14563 func (c *AdsListCall) Pages(ctx context.Context, f func(*AdsListResponse) error) error {
14564 c.ctx_ = ctx
14565 defer c.PageToken(c.urlParams_.Get("pageToken"))
14566 for {
14567 x, err := c.Do()
14568 if err != nil {
14569 return err
14570 }
14571 if err := f(x); err != nil {
14572 return err
14573 }
14574 if x.NextPageToken == "" {
14575 return nil
14576 }
14577 c.PageToken(x.NextPageToken)
14578 }
14579 }
14580
14581 type AdsPatchCall struct {
14582 s *Service
14583 profileId int64
14584 ad *Ad
14585 urlParams_ gensupport.URLParams
14586 ctx_ context.Context
14587 header_ http.Header
14588 }
14589
14590
14591
14592
14593
14594 func (r *AdsService) Patch(profileId int64, id int64, ad *Ad) *AdsPatchCall {
14595 c := &AdsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14596 c.profileId = profileId
14597 c.urlParams_.Set("id", fmt.Sprint(id))
14598 c.ad = ad
14599 return c
14600 }
14601
14602
14603
14604
14605 func (c *AdsPatchCall) Fields(s ...googleapi.Field) *AdsPatchCall {
14606 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14607 return c
14608 }
14609
14610
14611 func (c *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
14612 c.ctx_ = ctx
14613 return c
14614 }
14615
14616
14617
14618 func (c *AdsPatchCall) Header() http.Header {
14619 if c.header_ == nil {
14620 c.header_ = make(http.Header)
14621 }
14622 return c.header_
14623 }
14624
14625 func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
14626 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14627 var body io.Reader = nil
14628 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
14629 if err != nil {
14630 return nil, err
14631 }
14632 c.urlParams_.Set("alt", alt)
14633 c.urlParams_.Set("prettyPrint", "false")
14634 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/ads")
14635 urls += "?" + c.urlParams_.Encode()
14636 req, err := http.NewRequest("PATCH", urls, body)
14637 if err != nil {
14638 return nil, err
14639 }
14640 req.Header = reqHeaders
14641 googleapi.Expand(req.URL, map[string]string{
14642 "profileId": strconv.FormatInt(c.profileId, 10),
14643 })
14644 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14645 }
14646
14647
14648
14649
14650
14651
14652 func (c *AdsPatchCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
14653 gensupport.SetOptions(c.urlParams_, opts...)
14654 res, err := c.doRequest("json")
14655 if res != nil && res.StatusCode == http.StatusNotModified {
14656 if res.Body != nil {
14657 res.Body.Close()
14658 }
14659 return nil, gensupport.WrapError(&googleapi.Error{
14660 Code: res.StatusCode,
14661 Header: res.Header,
14662 })
14663 }
14664 if err != nil {
14665 return nil, err
14666 }
14667 defer googleapi.CloseBody(res)
14668 if err := googleapi.CheckResponse(res); err != nil {
14669 return nil, gensupport.WrapError(err)
14670 }
14671 ret := &Ad{
14672 ServerResponse: googleapi.ServerResponse{
14673 Header: res.Header,
14674 HTTPStatusCode: res.StatusCode,
14675 },
14676 }
14677 target := &ret
14678 if err := gensupport.DecodeResponse(target, res); err != nil {
14679 return nil, err
14680 }
14681 return ret, nil
14682 }
14683
14684 type AdsUpdateCall struct {
14685 s *Service
14686 profileId int64
14687 ad *Ad
14688 urlParams_ gensupport.URLParams
14689 ctx_ context.Context
14690 header_ http.Header
14691 }
14692
14693
14694
14695
14696 func (r *AdsService) Update(profileId int64, ad *Ad) *AdsUpdateCall {
14697 c := &AdsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14698 c.profileId = profileId
14699 c.ad = ad
14700 return c
14701 }
14702
14703
14704
14705
14706 func (c *AdsUpdateCall) Fields(s ...googleapi.Field) *AdsUpdateCall {
14707 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14708 return c
14709 }
14710
14711
14712 func (c *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
14713 c.ctx_ = ctx
14714 return c
14715 }
14716
14717
14718
14719 func (c *AdsUpdateCall) Header() http.Header {
14720 if c.header_ == nil {
14721 c.header_ = make(http.Header)
14722 }
14723 return c.header_
14724 }
14725
14726 func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
14727 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
14728 var body io.Reader = nil
14729 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
14730 if err != nil {
14731 return nil, err
14732 }
14733 c.urlParams_.Set("alt", alt)
14734 c.urlParams_.Set("prettyPrint", "false")
14735 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/ads")
14736 urls += "?" + c.urlParams_.Encode()
14737 req, err := http.NewRequest("PUT", urls, body)
14738 if err != nil {
14739 return nil, err
14740 }
14741 req.Header = reqHeaders
14742 googleapi.Expand(req.URL, map[string]string{
14743 "profileId": strconv.FormatInt(c.profileId, 10),
14744 })
14745 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14746 }
14747
14748
14749
14750
14751
14752
14753 func (c *AdsUpdateCall) Do(opts ...googleapi.CallOption) (*Ad, error) {
14754 gensupport.SetOptions(c.urlParams_, opts...)
14755 res, err := c.doRequest("json")
14756 if res != nil && res.StatusCode == http.StatusNotModified {
14757 if res.Body != nil {
14758 res.Body.Close()
14759 }
14760 return nil, gensupport.WrapError(&googleapi.Error{
14761 Code: res.StatusCode,
14762 Header: res.Header,
14763 })
14764 }
14765 if err != nil {
14766 return nil, err
14767 }
14768 defer googleapi.CloseBody(res)
14769 if err := googleapi.CheckResponse(res); err != nil {
14770 return nil, gensupport.WrapError(err)
14771 }
14772 ret := &Ad{
14773 ServerResponse: googleapi.ServerResponse{
14774 Header: res.Header,
14775 HTTPStatusCode: res.StatusCode,
14776 },
14777 }
14778 target := &ret
14779 if err := gensupport.DecodeResponse(target, res); err != nil {
14780 return nil, err
14781 }
14782 return ret, nil
14783 }
14784
14785 type AdvertiserGroupsDeleteCall struct {
14786 s *Service
14787 profileId int64
14788 id int64
14789 urlParams_ gensupport.URLParams
14790 ctx_ context.Context
14791 header_ http.Header
14792 }
14793
14794
14795
14796
14797
14798 func (r *AdvertiserGroupsService) Delete(profileId int64, id int64) *AdvertiserGroupsDeleteCall {
14799 c := &AdvertiserGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14800 c.profileId = profileId
14801 c.id = id
14802 return c
14803 }
14804
14805
14806
14807
14808 func (c *AdvertiserGroupsDeleteCall) Fields(s ...googleapi.Field) *AdvertiserGroupsDeleteCall {
14809 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14810 return c
14811 }
14812
14813
14814 func (c *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
14815 c.ctx_ = ctx
14816 return c
14817 }
14818
14819
14820
14821 func (c *AdvertiserGroupsDeleteCall) Header() http.Header {
14822 if c.header_ == nil {
14823 c.header_ = make(http.Header)
14824 }
14825 return c.header_
14826 }
14827
14828 func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
14829 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14830 var body io.Reader = nil
14831 c.urlParams_.Set("alt", alt)
14832 c.urlParams_.Set("prettyPrint", "false")
14833 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups/{+id}")
14834 urls += "?" + c.urlParams_.Encode()
14835 req, err := http.NewRequest("DELETE", urls, body)
14836 if err != nil {
14837 return nil, err
14838 }
14839 req.Header = reqHeaders
14840 googleapi.Expand(req.URL, map[string]string{
14841 "profileId": strconv.FormatInt(c.profileId, 10),
14842 "id": strconv.FormatInt(c.id, 10),
14843 })
14844 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14845 }
14846
14847
14848 func (c *AdvertiserGroupsDeleteCall) Do(opts ...googleapi.CallOption) error {
14849 gensupport.SetOptions(c.urlParams_, opts...)
14850 res, err := c.doRequest("json")
14851 if err != nil {
14852 return err
14853 }
14854 defer googleapi.CloseBody(res)
14855 if err := googleapi.CheckResponse(res); err != nil {
14856 return gensupport.WrapError(err)
14857 }
14858 return nil
14859 }
14860
14861 type AdvertiserGroupsGetCall struct {
14862 s *Service
14863 profileId int64
14864 id int64
14865 urlParams_ gensupport.URLParams
14866 ifNoneMatch_ string
14867 ctx_ context.Context
14868 header_ http.Header
14869 }
14870
14871
14872
14873
14874
14875 func (r *AdvertiserGroupsService) Get(profileId int64, id int64) *AdvertiserGroupsGetCall {
14876 c := &AdvertiserGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14877 c.profileId = profileId
14878 c.id = id
14879 return c
14880 }
14881
14882
14883
14884
14885 func (c *AdvertiserGroupsGetCall) Fields(s ...googleapi.Field) *AdvertiserGroupsGetCall {
14886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14887 return c
14888 }
14889
14890
14891
14892
14893 func (c *AdvertiserGroupsGetCall) IfNoneMatch(entityTag string) *AdvertiserGroupsGetCall {
14894 c.ifNoneMatch_ = entityTag
14895 return c
14896 }
14897
14898
14899 func (c *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
14900 c.ctx_ = ctx
14901 return c
14902 }
14903
14904
14905
14906 func (c *AdvertiserGroupsGetCall) Header() http.Header {
14907 if c.header_ == nil {
14908 c.header_ = make(http.Header)
14909 }
14910 return c.header_
14911 }
14912
14913 func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
14914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
14915 if c.ifNoneMatch_ != "" {
14916 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14917 }
14918 var body io.Reader = nil
14919 c.urlParams_.Set("alt", alt)
14920 c.urlParams_.Set("prettyPrint", "false")
14921 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups/{+id}")
14922 urls += "?" + c.urlParams_.Encode()
14923 req, err := http.NewRequest("GET", urls, body)
14924 if err != nil {
14925 return nil, err
14926 }
14927 req.Header = reqHeaders
14928 googleapi.Expand(req.URL, map[string]string{
14929 "profileId": strconv.FormatInt(c.profileId, 10),
14930 "id": strconv.FormatInt(c.id, 10),
14931 })
14932 return gensupport.SendRequest(c.ctx_, c.s.client, req)
14933 }
14934
14935
14936
14937
14938
14939
14940
14941 func (c *AdvertiserGroupsGetCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
14942 gensupport.SetOptions(c.urlParams_, opts...)
14943 res, err := c.doRequest("json")
14944 if res != nil && res.StatusCode == http.StatusNotModified {
14945 if res.Body != nil {
14946 res.Body.Close()
14947 }
14948 return nil, gensupport.WrapError(&googleapi.Error{
14949 Code: res.StatusCode,
14950 Header: res.Header,
14951 })
14952 }
14953 if err != nil {
14954 return nil, err
14955 }
14956 defer googleapi.CloseBody(res)
14957 if err := googleapi.CheckResponse(res); err != nil {
14958 return nil, gensupport.WrapError(err)
14959 }
14960 ret := &AdvertiserGroup{
14961 ServerResponse: googleapi.ServerResponse{
14962 Header: res.Header,
14963 HTTPStatusCode: res.StatusCode,
14964 },
14965 }
14966 target := &ret
14967 if err := gensupport.DecodeResponse(target, res); err != nil {
14968 return nil, err
14969 }
14970 return ret, nil
14971 }
14972
14973 type AdvertiserGroupsInsertCall struct {
14974 s *Service
14975 profileId int64
14976 advertisergroup *AdvertiserGroup
14977 urlParams_ gensupport.URLParams
14978 ctx_ context.Context
14979 header_ http.Header
14980 }
14981
14982
14983
14984
14985 func (r *AdvertiserGroupsService) Insert(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsInsertCall {
14986 c := &AdvertiserGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14987 c.profileId = profileId
14988 c.advertisergroup = advertisergroup
14989 return c
14990 }
14991
14992
14993
14994
14995 func (c *AdvertiserGroupsInsertCall) Fields(s ...googleapi.Field) *AdvertiserGroupsInsertCall {
14996 c.urlParams_.Set("fields", googleapi.CombineFields(s))
14997 return c
14998 }
14999
15000
15001 func (c *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
15002 c.ctx_ = ctx
15003 return c
15004 }
15005
15006
15007
15008 func (c *AdvertiserGroupsInsertCall) Header() http.Header {
15009 if c.header_ == nil {
15010 c.header_ = make(http.Header)
15011 }
15012 return c.header_
15013 }
15014
15015 func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
15016 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15017 var body io.Reader = nil
15018 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
15019 if err != nil {
15020 return nil, err
15021 }
15022 c.urlParams_.Set("alt", alt)
15023 c.urlParams_.Set("prettyPrint", "false")
15024 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups")
15025 urls += "?" + c.urlParams_.Encode()
15026 req, err := http.NewRequest("POST", urls, body)
15027 if err != nil {
15028 return nil, err
15029 }
15030 req.Header = reqHeaders
15031 googleapi.Expand(req.URL, map[string]string{
15032 "profileId": strconv.FormatInt(c.profileId, 10),
15033 })
15034 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15035 }
15036
15037
15038
15039
15040
15041
15042
15043 func (c *AdvertiserGroupsInsertCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, 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, gensupport.WrapError(&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, gensupport.WrapError(err)
15061 }
15062 ret := &AdvertiserGroup{
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 type AdvertiserGroupsListCall struct {
15076 s *Service
15077 profileId int64
15078 urlParams_ gensupport.URLParams
15079 ifNoneMatch_ string
15080 ctx_ context.Context
15081 header_ http.Header
15082 }
15083
15084
15085
15086
15087
15088 func (r *AdvertiserGroupsService) List(profileId int64) *AdvertiserGroupsListCall {
15089 c := &AdvertiserGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15090 c.profileId = profileId
15091 return c
15092 }
15093
15094
15095
15096 func (c *AdvertiserGroupsListCall) Ids(ids ...int64) *AdvertiserGroupsListCall {
15097 var ids_ []string
15098 for _, v := range ids {
15099 ids_ = append(ids_, fmt.Sprint(v))
15100 }
15101 c.urlParams_.SetMulti("ids", ids_)
15102 return c
15103 }
15104
15105
15106
15107 func (c *AdvertiserGroupsListCall) MaxResults(maxResults int64) *AdvertiserGroupsListCall {
15108 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15109 return c
15110 }
15111
15112
15113
15114 func (c *AdvertiserGroupsListCall) PageToken(pageToken string) *AdvertiserGroupsListCall {
15115 c.urlParams_.Set("pageToken", pageToken)
15116 return c
15117 }
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127 func (c *AdvertiserGroupsListCall) SearchString(searchString string) *AdvertiserGroupsListCall {
15128 c.urlParams_.Set("searchString", searchString)
15129 return c
15130 }
15131
15132
15133
15134
15135
15136
15137
15138
15139 func (c *AdvertiserGroupsListCall) SortField(sortField string) *AdvertiserGroupsListCall {
15140 c.urlParams_.Set("sortField", sortField)
15141 return c
15142 }
15143
15144
15145
15146
15147
15148
15149
15150 func (c *AdvertiserGroupsListCall) SortOrder(sortOrder string) *AdvertiserGroupsListCall {
15151 c.urlParams_.Set("sortOrder", sortOrder)
15152 return c
15153 }
15154
15155
15156
15157
15158 func (c *AdvertiserGroupsListCall) Fields(s ...googleapi.Field) *AdvertiserGroupsListCall {
15159 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15160 return c
15161 }
15162
15163
15164
15165
15166 func (c *AdvertiserGroupsListCall) IfNoneMatch(entityTag string) *AdvertiserGroupsListCall {
15167 c.ifNoneMatch_ = entityTag
15168 return c
15169 }
15170
15171
15172 func (c *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
15173 c.ctx_ = ctx
15174 return c
15175 }
15176
15177
15178
15179 func (c *AdvertiserGroupsListCall) Header() http.Header {
15180 if c.header_ == nil {
15181 c.header_ = make(http.Header)
15182 }
15183 return c.header_
15184 }
15185
15186 func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
15187 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15188 if c.ifNoneMatch_ != "" {
15189 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15190 }
15191 var body io.Reader = nil
15192 c.urlParams_.Set("alt", alt)
15193 c.urlParams_.Set("prettyPrint", "false")
15194 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups")
15195 urls += "?" + c.urlParams_.Encode()
15196 req, err := http.NewRequest("GET", urls, body)
15197 if err != nil {
15198 return nil, err
15199 }
15200 req.Header = reqHeaders
15201 googleapi.Expand(req.URL, map[string]string{
15202 "profileId": strconv.FormatInt(c.profileId, 10),
15203 })
15204 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15205 }
15206
15207
15208
15209
15210
15211
15212
15213 func (c *AdvertiserGroupsListCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroupsListResponse, error) {
15214 gensupport.SetOptions(c.urlParams_, opts...)
15215 res, err := c.doRequest("json")
15216 if res != nil && res.StatusCode == http.StatusNotModified {
15217 if res.Body != nil {
15218 res.Body.Close()
15219 }
15220 return nil, gensupport.WrapError(&googleapi.Error{
15221 Code: res.StatusCode,
15222 Header: res.Header,
15223 })
15224 }
15225 if err != nil {
15226 return nil, err
15227 }
15228 defer googleapi.CloseBody(res)
15229 if err := googleapi.CheckResponse(res); err != nil {
15230 return nil, gensupport.WrapError(err)
15231 }
15232 ret := &AdvertiserGroupsListResponse{
15233 ServerResponse: googleapi.ServerResponse{
15234 Header: res.Header,
15235 HTTPStatusCode: res.StatusCode,
15236 },
15237 }
15238 target := &ret
15239 if err := gensupport.DecodeResponse(target, res); err != nil {
15240 return nil, err
15241 }
15242 return ret, nil
15243 }
15244
15245
15246
15247
15248 func (c *AdvertiserGroupsListCall) Pages(ctx context.Context, f func(*AdvertiserGroupsListResponse) error) error {
15249 c.ctx_ = ctx
15250 defer c.PageToken(c.urlParams_.Get("pageToken"))
15251 for {
15252 x, err := c.Do()
15253 if err != nil {
15254 return err
15255 }
15256 if err := f(x); err != nil {
15257 return err
15258 }
15259 if x.NextPageToken == "" {
15260 return nil
15261 }
15262 c.PageToken(x.NextPageToken)
15263 }
15264 }
15265
15266 type AdvertiserGroupsPatchCall struct {
15267 s *Service
15268 profileId int64
15269 advertisergroup *AdvertiserGroup
15270 urlParams_ gensupport.URLParams
15271 ctx_ context.Context
15272 header_ http.Header
15273 }
15274
15275
15276
15277
15278
15279
15280 func (r *AdvertiserGroupsService) Patch(profileId int64, id int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsPatchCall {
15281 c := &AdvertiserGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15282 c.profileId = profileId
15283 c.urlParams_.Set("id", fmt.Sprint(id))
15284 c.advertisergroup = advertisergroup
15285 return c
15286 }
15287
15288
15289
15290
15291 func (c *AdvertiserGroupsPatchCall) Fields(s ...googleapi.Field) *AdvertiserGroupsPatchCall {
15292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15293 return c
15294 }
15295
15296
15297 func (c *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
15298 c.ctx_ = ctx
15299 return c
15300 }
15301
15302
15303
15304 func (c *AdvertiserGroupsPatchCall) Header() http.Header {
15305 if c.header_ == nil {
15306 c.header_ = make(http.Header)
15307 }
15308 return c.header_
15309 }
15310
15311 func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
15312 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15313 var body io.Reader = nil
15314 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
15315 if err != nil {
15316 return nil, err
15317 }
15318 c.urlParams_.Set("alt", alt)
15319 c.urlParams_.Set("prettyPrint", "false")
15320 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups")
15321 urls += "?" + c.urlParams_.Encode()
15322 req, err := http.NewRequest("PATCH", urls, body)
15323 if err != nil {
15324 return nil, err
15325 }
15326 req.Header = reqHeaders
15327 googleapi.Expand(req.URL, map[string]string{
15328 "profileId": strconv.FormatInt(c.profileId, 10),
15329 })
15330 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15331 }
15332
15333
15334
15335
15336
15337
15338
15339 func (c *AdvertiserGroupsPatchCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
15340 gensupport.SetOptions(c.urlParams_, opts...)
15341 res, err := c.doRequest("json")
15342 if res != nil && res.StatusCode == http.StatusNotModified {
15343 if res.Body != nil {
15344 res.Body.Close()
15345 }
15346 return nil, gensupport.WrapError(&googleapi.Error{
15347 Code: res.StatusCode,
15348 Header: res.Header,
15349 })
15350 }
15351 if err != nil {
15352 return nil, err
15353 }
15354 defer googleapi.CloseBody(res)
15355 if err := googleapi.CheckResponse(res); err != nil {
15356 return nil, gensupport.WrapError(err)
15357 }
15358 ret := &AdvertiserGroup{
15359 ServerResponse: googleapi.ServerResponse{
15360 Header: res.Header,
15361 HTTPStatusCode: res.StatusCode,
15362 },
15363 }
15364 target := &ret
15365 if err := gensupport.DecodeResponse(target, res); err != nil {
15366 return nil, err
15367 }
15368 return ret, nil
15369 }
15370
15371 type AdvertiserGroupsUpdateCall struct {
15372 s *Service
15373 profileId int64
15374 advertisergroup *AdvertiserGroup
15375 urlParams_ gensupport.URLParams
15376 ctx_ context.Context
15377 header_ http.Header
15378 }
15379
15380
15381
15382
15383 func (r *AdvertiserGroupsService) Update(profileId int64, advertisergroup *AdvertiserGroup) *AdvertiserGroupsUpdateCall {
15384 c := &AdvertiserGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15385 c.profileId = profileId
15386 c.advertisergroup = advertisergroup
15387 return c
15388 }
15389
15390
15391
15392
15393 func (c *AdvertiserGroupsUpdateCall) Fields(s ...googleapi.Field) *AdvertiserGroupsUpdateCall {
15394 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15395 return c
15396 }
15397
15398
15399 func (c *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
15400 c.ctx_ = ctx
15401 return c
15402 }
15403
15404
15405
15406 func (c *AdvertiserGroupsUpdateCall) Header() http.Header {
15407 if c.header_ == nil {
15408 c.header_ = make(http.Header)
15409 }
15410 return c.header_
15411 }
15412
15413 func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
15414 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15415 var body io.Reader = nil
15416 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
15417 if err != nil {
15418 return nil, err
15419 }
15420 c.urlParams_.Set("alt", alt)
15421 c.urlParams_.Set("prettyPrint", "false")
15422 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserGroups")
15423 urls += "?" + c.urlParams_.Encode()
15424 req, err := http.NewRequest("PUT", urls, body)
15425 if err != nil {
15426 return nil, err
15427 }
15428 req.Header = reqHeaders
15429 googleapi.Expand(req.URL, map[string]string{
15430 "profileId": strconv.FormatInt(c.profileId, 10),
15431 })
15432 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15433 }
15434
15435
15436
15437
15438
15439
15440
15441 func (c *AdvertiserGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*AdvertiserGroup, error) {
15442 gensupport.SetOptions(c.urlParams_, opts...)
15443 res, err := c.doRequest("json")
15444 if res != nil && res.StatusCode == http.StatusNotModified {
15445 if res.Body != nil {
15446 res.Body.Close()
15447 }
15448 return nil, gensupport.WrapError(&googleapi.Error{
15449 Code: res.StatusCode,
15450 Header: res.Header,
15451 })
15452 }
15453 if err != nil {
15454 return nil, err
15455 }
15456 defer googleapi.CloseBody(res)
15457 if err := googleapi.CheckResponse(res); err != nil {
15458 return nil, gensupport.WrapError(err)
15459 }
15460 ret := &AdvertiserGroup{
15461 ServerResponse: googleapi.ServerResponse{
15462 Header: res.Header,
15463 HTTPStatusCode: res.StatusCode,
15464 },
15465 }
15466 target := &ret
15467 if err := gensupport.DecodeResponse(target, res); err != nil {
15468 return nil, err
15469 }
15470 return ret, nil
15471 }
15472
15473 type AdvertiserInvoicesListCall struct {
15474 s *Service
15475 profileId int64
15476 advertiserId int64
15477 urlParams_ gensupport.URLParams
15478 ifNoneMatch_ string
15479 ctx_ context.Context
15480 header_ http.Header
15481 }
15482
15483
15484
15485
15486
15487
15488
15489 func (r *AdvertiserInvoicesService) List(profileId int64, advertiserId int64) *AdvertiserInvoicesListCall {
15490 c := &AdvertiserInvoicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15491 c.profileId = profileId
15492 c.advertiserId = advertiserId
15493 return c
15494 }
15495
15496
15497
15498 func (c *AdvertiserInvoicesListCall) IssueMonth(issueMonth string) *AdvertiserInvoicesListCall {
15499 c.urlParams_.Set("issueMonth", issueMonth)
15500 return c
15501 }
15502
15503
15504
15505 func (c *AdvertiserInvoicesListCall) MaxResults(maxResults int64) *AdvertiserInvoicesListCall {
15506 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15507 return c
15508 }
15509
15510
15511
15512 func (c *AdvertiserInvoicesListCall) PageToken(pageToken string) *AdvertiserInvoicesListCall {
15513 c.urlParams_.Set("pageToken", pageToken)
15514 return c
15515 }
15516
15517
15518
15519
15520 func (c *AdvertiserInvoicesListCall) Fields(s ...googleapi.Field) *AdvertiserInvoicesListCall {
15521 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15522 return c
15523 }
15524
15525
15526
15527
15528 func (c *AdvertiserInvoicesListCall) IfNoneMatch(entityTag string) *AdvertiserInvoicesListCall {
15529 c.ifNoneMatch_ = entityTag
15530 return c
15531 }
15532
15533
15534 func (c *AdvertiserInvoicesListCall) Context(ctx context.Context) *AdvertiserInvoicesListCall {
15535 c.ctx_ = ctx
15536 return c
15537 }
15538
15539
15540
15541 func (c *AdvertiserInvoicesListCall) Header() http.Header {
15542 if c.header_ == nil {
15543 c.header_ = make(http.Header)
15544 }
15545 return c.header_
15546 }
15547
15548 func (c *AdvertiserInvoicesListCall) doRequest(alt string) (*http.Response, error) {
15549 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15550 if c.ifNoneMatch_ != "" {
15551 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15552 }
15553 var body io.Reader = nil
15554 c.urlParams_.Set("alt", alt)
15555 c.urlParams_.Set("prettyPrint", "false")
15556 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers/{+advertiserId}/invoices")
15557 urls += "?" + c.urlParams_.Encode()
15558 req, err := http.NewRequest("GET", urls, body)
15559 if err != nil {
15560 return nil, err
15561 }
15562 req.Header = reqHeaders
15563 googleapi.Expand(req.URL, map[string]string{
15564 "profileId": strconv.FormatInt(c.profileId, 10),
15565 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
15566 })
15567 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15568 }
15569
15570
15571
15572
15573
15574
15575
15576 func (c *AdvertiserInvoicesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserInvoicesListResponse, error) {
15577 gensupport.SetOptions(c.urlParams_, opts...)
15578 res, err := c.doRequest("json")
15579 if res != nil && res.StatusCode == http.StatusNotModified {
15580 if res.Body != nil {
15581 res.Body.Close()
15582 }
15583 return nil, gensupport.WrapError(&googleapi.Error{
15584 Code: res.StatusCode,
15585 Header: res.Header,
15586 })
15587 }
15588 if err != nil {
15589 return nil, err
15590 }
15591 defer googleapi.CloseBody(res)
15592 if err := googleapi.CheckResponse(res); err != nil {
15593 return nil, gensupport.WrapError(err)
15594 }
15595 ret := &AdvertiserInvoicesListResponse{
15596 ServerResponse: googleapi.ServerResponse{
15597 Header: res.Header,
15598 HTTPStatusCode: res.StatusCode,
15599 },
15600 }
15601 target := &ret
15602 if err := gensupport.DecodeResponse(target, res); err != nil {
15603 return nil, err
15604 }
15605 return ret, nil
15606 }
15607
15608
15609
15610
15611 func (c *AdvertiserInvoicesListCall) Pages(ctx context.Context, f func(*AdvertiserInvoicesListResponse) error) error {
15612 c.ctx_ = ctx
15613 defer c.PageToken(c.urlParams_.Get("pageToken"))
15614 for {
15615 x, err := c.Do()
15616 if err != nil {
15617 return err
15618 }
15619 if err := f(x); err != nil {
15620 return err
15621 }
15622 if x.NextPageToken == "" {
15623 return nil
15624 }
15625 c.PageToken(x.NextPageToken)
15626 }
15627 }
15628
15629 type AdvertiserLandingPagesGetCall struct {
15630 s *Service
15631 profileId int64
15632 id int64
15633 urlParams_ gensupport.URLParams
15634 ifNoneMatch_ string
15635 ctx_ context.Context
15636 header_ http.Header
15637 }
15638
15639
15640
15641
15642
15643 func (r *AdvertiserLandingPagesService) Get(profileId int64, id int64) *AdvertiserLandingPagesGetCall {
15644 c := &AdvertiserLandingPagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15645 c.profileId = profileId
15646 c.id = id
15647 return c
15648 }
15649
15650
15651
15652
15653 func (c *AdvertiserLandingPagesGetCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesGetCall {
15654 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15655 return c
15656 }
15657
15658
15659
15660
15661 func (c *AdvertiserLandingPagesGetCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesGetCall {
15662 c.ifNoneMatch_ = entityTag
15663 return c
15664 }
15665
15666
15667 func (c *AdvertiserLandingPagesGetCall) Context(ctx context.Context) *AdvertiserLandingPagesGetCall {
15668 c.ctx_ = ctx
15669 return c
15670 }
15671
15672
15673
15674 func (c *AdvertiserLandingPagesGetCall) Header() http.Header {
15675 if c.header_ == nil {
15676 c.header_ = make(http.Header)
15677 }
15678 return c.header_
15679 }
15680
15681 func (c *AdvertiserLandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
15682 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15683 if c.ifNoneMatch_ != "" {
15684 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15685 }
15686 var body io.Reader = nil
15687 c.urlParams_.Set("alt", alt)
15688 c.urlParams_.Set("prettyPrint", "false")
15689 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserLandingPages/{+id}")
15690 urls += "?" + c.urlParams_.Encode()
15691 req, err := http.NewRequest("GET", urls, body)
15692 if err != nil {
15693 return nil, err
15694 }
15695 req.Header = reqHeaders
15696 googleapi.Expand(req.URL, map[string]string{
15697 "profileId": strconv.FormatInt(c.profileId, 10),
15698 "id": strconv.FormatInt(c.id, 10),
15699 })
15700 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15701 }
15702
15703
15704
15705
15706
15707
15708 func (c *AdvertiserLandingPagesGetCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
15709 gensupport.SetOptions(c.urlParams_, opts...)
15710 res, err := c.doRequest("json")
15711 if res != nil && res.StatusCode == http.StatusNotModified {
15712 if res.Body != nil {
15713 res.Body.Close()
15714 }
15715 return nil, gensupport.WrapError(&googleapi.Error{
15716 Code: res.StatusCode,
15717 Header: res.Header,
15718 })
15719 }
15720 if err != nil {
15721 return nil, err
15722 }
15723 defer googleapi.CloseBody(res)
15724 if err := googleapi.CheckResponse(res); err != nil {
15725 return nil, gensupport.WrapError(err)
15726 }
15727 ret := &LandingPage{
15728 ServerResponse: googleapi.ServerResponse{
15729 Header: res.Header,
15730 HTTPStatusCode: res.StatusCode,
15731 },
15732 }
15733 target := &ret
15734 if err := gensupport.DecodeResponse(target, res); err != nil {
15735 return nil, err
15736 }
15737 return ret, nil
15738 }
15739
15740 type AdvertiserLandingPagesInsertCall struct {
15741 s *Service
15742 profileId int64
15743 landingpage *LandingPage
15744 urlParams_ gensupport.URLParams
15745 ctx_ context.Context
15746 header_ http.Header
15747 }
15748
15749
15750
15751
15752 func (r *AdvertiserLandingPagesService) Insert(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesInsertCall {
15753 c := &AdvertiserLandingPagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15754 c.profileId = profileId
15755 c.landingpage = landingpage
15756 return c
15757 }
15758
15759
15760
15761
15762 func (c *AdvertiserLandingPagesInsertCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesInsertCall {
15763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15764 return c
15765 }
15766
15767
15768 func (c *AdvertiserLandingPagesInsertCall) Context(ctx context.Context) *AdvertiserLandingPagesInsertCall {
15769 c.ctx_ = ctx
15770 return c
15771 }
15772
15773
15774
15775 func (c *AdvertiserLandingPagesInsertCall) Header() http.Header {
15776 if c.header_ == nil {
15777 c.header_ = make(http.Header)
15778 }
15779 return c.header_
15780 }
15781
15782 func (c *AdvertiserLandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
15783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
15784 var body io.Reader = nil
15785 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
15786 if err != nil {
15787 return nil, err
15788 }
15789 c.urlParams_.Set("alt", alt)
15790 c.urlParams_.Set("prettyPrint", "false")
15791 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserLandingPages")
15792 urls += "?" + c.urlParams_.Encode()
15793 req, err := http.NewRequest("POST", urls, body)
15794 if err != nil {
15795 return nil, err
15796 }
15797 req.Header = reqHeaders
15798 googleapi.Expand(req.URL, map[string]string{
15799 "profileId": strconv.FormatInt(c.profileId, 10),
15800 })
15801 return gensupport.SendRequest(c.ctx_, c.s.client, req)
15802 }
15803
15804
15805
15806
15807
15808
15809 func (c *AdvertiserLandingPagesInsertCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
15810 gensupport.SetOptions(c.urlParams_, opts...)
15811 res, err := c.doRequest("json")
15812 if res != nil && res.StatusCode == http.StatusNotModified {
15813 if res.Body != nil {
15814 res.Body.Close()
15815 }
15816 return nil, gensupport.WrapError(&googleapi.Error{
15817 Code: res.StatusCode,
15818 Header: res.Header,
15819 })
15820 }
15821 if err != nil {
15822 return nil, err
15823 }
15824 defer googleapi.CloseBody(res)
15825 if err := googleapi.CheckResponse(res); err != nil {
15826 return nil, gensupport.WrapError(err)
15827 }
15828 ret := &LandingPage{
15829 ServerResponse: googleapi.ServerResponse{
15830 Header: res.Header,
15831 HTTPStatusCode: res.StatusCode,
15832 },
15833 }
15834 target := &ret
15835 if err := gensupport.DecodeResponse(target, res); err != nil {
15836 return nil, err
15837 }
15838 return ret, nil
15839 }
15840
15841 type AdvertiserLandingPagesListCall struct {
15842 s *Service
15843 profileId int64
15844 urlParams_ gensupport.URLParams
15845 ifNoneMatch_ string
15846 ctx_ context.Context
15847 header_ http.Header
15848 }
15849
15850
15851
15852
15853 func (r *AdvertiserLandingPagesService) List(profileId int64) *AdvertiserLandingPagesListCall {
15854 c := &AdvertiserLandingPagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15855 c.profileId = profileId
15856 return c
15857 }
15858
15859
15860
15861 func (c *AdvertiserLandingPagesListCall) AdvertiserIds(advertiserIds ...int64) *AdvertiserLandingPagesListCall {
15862 var advertiserIds_ []string
15863 for _, v := range advertiserIds {
15864 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
15865 }
15866 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
15867 return c
15868 }
15869
15870
15871
15872
15873 func (c *AdvertiserLandingPagesListCall) Archived(archived bool) *AdvertiserLandingPagesListCall {
15874 c.urlParams_.Set("archived", fmt.Sprint(archived))
15875 return c
15876 }
15877
15878
15879
15880 func (c *AdvertiserLandingPagesListCall) CampaignIds(campaignIds ...int64) *AdvertiserLandingPagesListCall {
15881 var campaignIds_ []string
15882 for _, v := range campaignIds {
15883 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
15884 }
15885 c.urlParams_.SetMulti("campaignIds", campaignIds_)
15886 return c
15887 }
15888
15889
15890
15891 func (c *AdvertiserLandingPagesListCall) Ids(ids ...int64) *AdvertiserLandingPagesListCall {
15892 var ids_ []string
15893 for _, v := range ids {
15894 ids_ = append(ids_, fmt.Sprint(v))
15895 }
15896 c.urlParams_.SetMulti("ids", ids_)
15897 return c
15898 }
15899
15900
15901
15902 func (c *AdvertiserLandingPagesListCall) MaxResults(maxResults int64) *AdvertiserLandingPagesListCall {
15903 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15904 return c
15905 }
15906
15907
15908
15909 func (c *AdvertiserLandingPagesListCall) PageToken(pageToken string) *AdvertiserLandingPagesListCall {
15910 c.urlParams_.Set("pageToken", pageToken)
15911 return c
15912 }
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922 func (c *AdvertiserLandingPagesListCall) SearchString(searchString string) *AdvertiserLandingPagesListCall {
15923 c.urlParams_.Set("searchString", searchString)
15924 return c
15925 }
15926
15927
15928
15929
15930
15931
15932
15933
15934 func (c *AdvertiserLandingPagesListCall) SortField(sortField string) *AdvertiserLandingPagesListCall {
15935 c.urlParams_.Set("sortField", sortField)
15936 return c
15937 }
15938
15939
15940
15941
15942
15943
15944
15945 func (c *AdvertiserLandingPagesListCall) SortOrder(sortOrder string) *AdvertiserLandingPagesListCall {
15946 c.urlParams_.Set("sortOrder", sortOrder)
15947 return c
15948 }
15949
15950
15951
15952 func (c *AdvertiserLandingPagesListCall) SubaccountId(subaccountId int64) *AdvertiserLandingPagesListCall {
15953 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
15954 return c
15955 }
15956
15957
15958
15959
15960 func (c *AdvertiserLandingPagesListCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesListCall {
15961 c.urlParams_.Set("fields", googleapi.CombineFields(s))
15962 return c
15963 }
15964
15965
15966
15967
15968 func (c *AdvertiserLandingPagesListCall) IfNoneMatch(entityTag string) *AdvertiserLandingPagesListCall {
15969 c.ifNoneMatch_ = entityTag
15970 return c
15971 }
15972
15973
15974 func (c *AdvertiserLandingPagesListCall) Context(ctx context.Context) *AdvertiserLandingPagesListCall {
15975 c.ctx_ = ctx
15976 return c
15977 }
15978
15979
15980
15981 func (c *AdvertiserLandingPagesListCall) Header() http.Header {
15982 if c.header_ == nil {
15983 c.header_ = make(http.Header)
15984 }
15985 return c.header_
15986 }
15987
15988 func (c *AdvertiserLandingPagesListCall) doRequest(alt string) (*http.Response, error) {
15989 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
15990 if c.ifNoneMatch_ != "" {
15991 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15992 }
15993 var body io.Reader = nil
15994 c.urlParams_.Set("alt", alt)
15995 c.urlParams_.Set("prettyPrint", "false")
15996 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserLandingPages")
15997 urls += "?" + c.urlParams_.Encode()
15998 req, err := http.NewRequest("GET", urls, body)
15999 if err != nil {
16000 return nil, err
16001 }
16002 req.Header = reqHeaders
16003 googleapi.Expand(req.URL, map[string]string{
16004 "profileId": strconv.FormatInt(c.profileId, 10),
16005 })
16006 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16007 }
16008
16009
16010
16011
16012
16013
16014
16015 func (c *AdvertiserLandingPagesListCall) Do(opts ...googleapi.CallOption) (*AdvertiserLandingPagesListResponse, error) {
16016 gensupport.SetOptions(c.urlParams_, opts...)
16017 res, err := c.doRequest("json")
16018 if res != nil && res.StatusCode == http.StatusNotModified {
16019 if res.Body != nil {
16020 res.Body.Close()
16021 }
16022 return nil, gensupport.WrapError(&googleapi.Error{
16023 Code: res.StatusCode,
16024 Header: res.Header,
16025 })
16026 }
16027 if err != nil {
16028 return nil, err
16029 }
16030 defer googleapi.CloseBody(res)
16031 if err := googleapi.CheckResponse(res); err != nil {
16032 return nil, gensupport.WrapError(err)
16033 }
16034 ret := &AdvertiserLandingPagesListResponse{
16035 ServerResponse: googleapi.ServerResponse{
16036 Header: res.Header,
16037 HTTPStatusCode: res.StatusCode,
16038 },
16039 }
16040 target := &ret
16041 if err := gensupport.DecodeResponse(target, res); err != nil {
16042 return nil, err
16043 }
16044 return ret, nil
16045 }
16046
16047
16048
16049
16050 func (c *AdvertiserLandingPagesListCall) Pages(ctx context.Context, f func(*AdvertiserLandingPagesListResponse) error) error {
16051 c.ctx_ = ctx
16052 defer c.PageToken(c.urlParams_.Get("pageToken"))
16053 for {
16054 x, err := c.Do()
16055 if err != nil {
16056 return err
16057 }
16058 if err := f(x); err != nil {
16059 return err
16060 }
16061 if x.NextPageToken == "" {
16062 return nil
16063 }
16064 c.PageToken(x.NextPageToken)
16065 }
16066 }
16067
16068 type AdvertiserLandingPagesPatchCall struct {
16069 s *Service
16070 profileId int64
16071 landingpage *LandingPage
16072 urlParams_ gensupport.URLParams
16073 ctx_ context.Context
16074 header_ http.Header
16075 }
16076
16077
16078
16079
16080
16081 func (r *AdvertiserLandingPagesService) Patch(profileId int64, id int64, landingpage *LandingPage) *AdvertiserLandingPagesPatchCall {
16082 c := &AdvertiserLandingPagesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16083 c.profileId = profileId
16084 c.urlParams_.Set("id", fmt.Sprint(id))
16085 c.landingpage = landingpage
16086 return c
16087 }
16088
16089
16090
16091
16092 func (c *AdvertiserLandingPagesPatchCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesPatchCall {
16093 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16094 return c
16095 }
16096
16097
16098 func (c *AdvertiserLandingPagesPatchCall) Context(ctx context.Context) *AdvertiserLandingPagesPatchCall {
16099 c.ctx_ = ctx
16100 return c
16101 }
16102
16103
16104
16105 func (c *AdvertiserLandingPagesPatchCall) Header() http.Header {
16106 if c.header_ == nil {
16107 c.header_ = make(http.Header)
16108 }
16109 return c.header_
16110 }
16111
16112 func (c *AdvertiserLandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
16113 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16114 var body io.Reader = nil
16115 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
16116 if err != nil {
16117 return nil, err
16118 }
16119 c.urlParams_.Set("alt", alt)
16120 c.urlParams_.Set("prettyPrint", "false")
16121 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserLandingPages")
16122 urls += "?" + c.urlParams_.Encode()
16123 req, err := http.NewRequest("PATCH", urls, body)
16124 if err != nil {
16125 return nil, err
16126 }
16127 req.Header = reqHeaders
16128 googleapi.Expand(req.URL, map[string]string{
16129 "profileId": strconv.FormatInt(c.profileId, 10),
16130 })
16131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16132 }
16133
16134
16135
16136
16137
16138
16139 func (c *AdvertiserLandingPagesPatchCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
16140 gensupport.SetOptions(c.urlParams_, opts...)
16141 res, err := c.doRequest("json")
16142 if res != nil && res.StatusCode == http.StatusNotModified {
16143 if res.Body != nil {
16144 res.Body.Close()
16145 }
16146 return nil, gensupport.WrapError(&googleapi.Error{
16147 Code: res.StatusCode,
16148 Header: res.Header,
16149 })
16150 }
16151 if err != nil {
16152 return nil, err
16153 }
16154 defer googleapi.CloseBody(res)
16155 if err := googleapi.CheckResponse(res); err != nil {
16156 return nil, gensupport.WrapError(err)
16157 }
16158 ret := &LandingPage{
16159 ServerResponse: googleapi.ServerResponse{
16160 Header: res.Header,
16161 HTTPStatusCode: res.StatusCode,
16162 },
16163 }
16164 target := &ret
16165 if err := gensupport.DecodeResponse(target, res); err != nil {
16166 return nil, err
16167 }
16168 return ret, nil
16169 }
16170
16171 type AdvertiserLandingPagesUpdateCall struct {
16172 s *Service
16173 profileId int64
16174 landingpage *LandingPage
16175 urlParams_ gensupport.URLParams
16176 ctx_ context.Context
16177 header_ http.Header
16178 }
16179
16180
16181
16182
16183 func (r *AdvertiserLandingPagesService) Update(profileId int64, landingpage *LandingPage) *AdvertiserLandingPagesUpdateCall {
16184 c := &AdvertiserLandingPagesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16185 c.profileId = profileId
16186 c.landingpage = landingpage
16187 return c
16188 }
16189
16190
16191
16192
16193 func (c *AdvertiserLandingPagesUpdateCall) Fields(s ...googleapi.Field) *AdvertiserLandingPagesUpdateCall {
16194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16195 return c
16196 }
16197
16198
16199 func (c *AdvertiserLandingPagesUpdateCall) Context(ctx context.Context) *AdvertiserLandingPagesUpdateCall {
16200 c.ctx_ = ctx
16201 return c
16202 }
16203
16204
16205
16206 func (c *AdvertiserLandingPagesUpdateCall) Header() http.Header {
16207 if c.header_ == nil {
16208 c.header_ = make(http.Header)
16209 }
16210 return c.header_
16211 }
16212
16213 func (c *AdvertiserLandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
16214 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16215 var body io.Reader = nil
16216 body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
16217 if err != nil {
16218 return nil, err
16219 }
16220 c.urlParams_.Set("alt", alt)
16221 c.urlParams_.Set("prettyPrint", "false")
16222 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertiserLandingPages")
16223 urls += "?" + c.urlParams_.Encode()
16224 req, err := http.NewRequest("PUT", urls, body)
16225 if err != nil {
16226 return nil, err
16227 }
16228 req.Header = reqHeaders
16229 googleapi.Expand(req.URL, map[string]string{
16230 "profileId": strconv.FormatInt(c.profileId, 10),
16231 })
16232 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16233 }
16234
16235
16236
16237
16238
16239
16240 func (c *AdvertiserLandingPagesUpdateCall) Do(opts ...googleapi.CallOption) (*LandingPage, error) {
16241 gensupport.SetOptions(c.urlParams_, opts...)
16242 res, err := c.doRequest("json")
16243 if res != nil && res.StatusCode == http.StatusNotModified {
16244 if res.Body != nil {
16245 res.Body.Close()
16246 }
16247 return nil, gensupport.WrapError(&googleapi.Error{
16248 Code: res.StatusCode,
16249 Header: res.Header,
16250 })
16251 }
16252 if err != nil {
16253 return nil, err
16254 }
16255 defer googleapi.CloseBody(res)
16256 if err := googleapi.CheckResponse(res); err != nil {
16257 return nil, gensupport.WrapError(err)
16258 }
16259 ret := &LandingPage{
16260 ServerResponse: googleapi.ServerResponse{
16261 Header: res.Header,
16262 HTTPStatusCode: res.StatusCode,
16263 },
16264 }
16265 target := &ret
16266 if err := gensupport.DecodeResponse(target, res); err != nil {
16267 return nil, err
16268 }
16269 return ret, nil
16270 }
16271
16272 type AdvertisersGetCall struct {
16273 s *Service
16274 profileId int64
16275 id int64
16276 urlParams_ gensupport.URLParams
16277 ifNoneMatch_ string
16278 ctx_ context.Context
16279 header_ http.Header
16280 }
16281
16282
16283
16284
16285
16286 func (r *AdvertisersService) Get(profileId int64, id int64) *AdvertisersGetCall {
16287 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16288 c.profileId = profileId
16289 c.id = id
16290 return c
16291 }
16292
16293
16294
16295
16296 func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall {
16297 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16298 return c
16299 }
16300
16301
16302
16303
16304 func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall {
16305 c.ifNoneMatch_ = entityTag
16306 return c
16307 }
16308
16309
16310 func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
16311 c.ctx_ = ctx
16312 return c
16313 }
16314
16315
16316
16317 func (c *AdvertisersGetCall) Header() http.Header {
16318 if c.header_ == nil {
16319 c.header_ = make(http.Header)
16320 }
16321 return c.header_
16322 }
16323
16324 func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
16325 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16326 if c.ifNoneMatch_ != "" {
16327 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16328 }
16329 var body io.Reader = nil
16330 c.urlParams_.Set("alt", alt)
16331 c.urlParams_.Set("prettyPrint", "false")
16332 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers/{+id}")
16333 urls += "?" + c.urlParams_.Encode()
16334 req, err := http.NewRequest("GET", urls, body)
16335 if err != nil {
16336 return nil, err
16337 }
16338 req.Header = reqHeaders
16339 googleapi.Expand(req.URL, map[string]string{
16340 "profileId": strconv.FormatInt(c.profileId, 10),
16341 "id": strconv.FormatInt(c.id, 10),
16342 })
16343 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16344 }
16345
16346
16347
16348
16349
16350
16351 func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16352 gensupport.SetOptions(c.urlParams_, opts...)
16353 res, err := c.doRequest("json")
16354 if res != nil && res.StatusCode == http.StatusNotModified {
16355 if res.Body != nil {
16356 res.Body.Close()
16357 }
16358 return nil, gensupport.WrapError(&googleapi.Error{
16359 Code: res.StatusCode,
16360 Header: res.Header,
16361 })
16362 }
16363 if err != nil {
16364 return nil, err
16365 }
16366 defer googleapi.CloseBody(res)
16367 if err := googleapi.CheckResponse(res); err != nil {
16368 return nil, gensupport.WrapError(err)
16369 }
16370 ret := &Advertiser{
16371 ServerResponse: googleapi.ServerResponse{
16372 Header: res.Header,
16373 HTTPStatusCode: res.StatusCode,
16374 },
16375 }
16376 target := &ret
16377 if err := gensupport.DecodeResponse(target, res); err != nil {
16378 return nil, err
16379 }
16380 return ret, nil
16381 }
16382
16383 type AdvertisersInsertCall struct {
16384 s *Service
16385 profileId int64
16386 advertiser *Advertiser
16387 urlParams_ gensupport.URLParams
16388 ctx_ context.Context
16389 header_ http.Header
16390 }
16391
16392
16393
16394
16395 func (r *AdvertisersService) Insert(profileId int64, advertiser *Advertiser) *AdvertisersInsertCall {
16396 c := &AdvertisersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16397 c.profileId = profileId
16398 c.advertiser = advertiser
16399 return c
16400 }
16401
16402
16403
16404
16405 func (c *AdvertisersInsertCall) Fields(s ...googleapi.Field) *AdvertisersInsertCall {
16406 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16407 return c
16408 }
16409
16410
16411 func (c *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
16412 c.ctx_ = ctx
16413 return c
16414 }
16415
16416
16417
16418 func (c *AdvertisersInsertCall) Header() http.Header {
16419 if c.header_ == nil {
16420 c.header_ = make(http.Header)
16421 }
16422 return c.header_
16423 }
16424
16425 func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
16426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16427 var body io.Reader = nil
16428 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16429 if err != nil {
16430 return nil, err
16431 }
16432 c.urlParams_.Set("alt", alt)
16433 c.urlParams_.Set("prettyPrint", "false")
16434 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers")
16435 urls += "?" + c.urlParams_.Encode()
16436 req, err := http.NewRequest("POST", urls, body)
16437 if err != nil {
16438 return nil, err
16439 }
16440 req.Header = reqHeaders
16441 googleapi.Expand(req.URL, map[string]string{
16442 "profileId": strconv.FormatInt(c.profileId, 10),
16443 })
16444 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16445 }
16446
16447
16448
16449
16450
16451
16452 func (c *AdvertisersInsertCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16453 gensupport.SetOptions(c.urlParams_, opts...)
16454 res, err := c.doRequest("json")
16455 if res != nil && res.StatusCode == http.StatusNotModified {
16456 if res.Body != nil {
16457 res.Body.Close()
16458 }
16459 return nil, gensupport.WrapError(&googleapi.Error{
16460 Code: res.StatusCode,
16461 Header: res.Header,
16462 })
16463 }
16464 if err != nil {
16465 return nil, err
16466 }
16467 defer googleapi.CloseBody(res)
16468 if err := googleapi.CheckResponse(res); err != nil {
16469 return nil, gensupport.WrapError(err)
16470 }
16471 ret := &Advertiser{
16472 ServerResponse: googleapi.ServerResponse{
16473 Header: res.Header,
16474 HTTPStatusCode: res.StatusCode,
16475 },
16476 }
16477 target := &ret
16478 if err := gensupport.DecodeResponse(target, res); err != nil {
16479 return nil, err
16480 }
16481 return ret, nil
16482 }
16483
16484 type AdvertisersListCall struct {
16485 s *Service
16486 profileId int64
16487 urlParams_ gensupport.URLParams
16488 ifNoneMatch_ string
16489 ctx_ context.Context
16490 header_ http.Header
16491 }
16492
16493
16494
16495
16496
16497 func (r *AdvertisersService) List(profileId int64) *AdvertisersListCall {
16498 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16499 c.profileId = profileId
16500 return c
16501 }
16502
16503
16504
16505 func (c *AdvertisersListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *AdvertisersListCall {
16506 var advertiserGroupIds_ []string
16507 for _, v := range advertiserGroupIds {
16508 advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
16509 }
16510 c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
16511 return c
16512 }
16513
16514
16515
16516
16517 func (c *AdvertisersListCall) FloodlightConfigurationIds(floodlightConfigurationIds ...int64) *AdvertisersListCall {
16518 var floodlightConfigurationIds_ []string
16519 for _, v := range floodlightConfigurationIds {
16520 floodlightConfigurationIds_ = append(floodlightConfigurationIds_, fmt.Sprint(v))
16521 }
16522 c.urlParams_.SetMulti("floodlightConfigurationIds", floodlightConfigurationIds_)
16523 return c
16524 }
16525
16526
16527
16528 func (c *AdvertisersListCall) Ids(ids ...int64) *AdvertisersListCall {
16529 var ids_ []string
16530 for _, v := range ids {
16531 ids_ = append(ids_, fmt.Sprint(v))
16532 }
16533 c.urlParams_.SetMulti("ids", ids_)
16534 return c
16535 }
16536
16537
16538
16539
16540 func (c *AdvertisersListCall) IncludeAdvertisersWithoutGroupsOnly(includeAdvertisersWithoutGroupsOnly bool) *AdvertisersListCall {
16541 c.urlParams_.Set("includeAdvertisersWithoutGroupsOnly", fmt.Sprint(includeAdvertisersWithoutGroupsOnly))
16542 return c
16543 }
16544
16545
16546
16547 func (c *AdvertisersListCall) MaxResults(maxResults int64) *AdvertisersListCall {
16548 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16549 return c
16550 }
16551
16552
16553
16554 func (c *AdvertisersListCall) OnlyParent(onlyParent bool) *AdvertisersListCall {
16555 c.urlParams_.Set("onlyParent", fmt.Sprint(onlyParent))
16556 return c
16557 }
16558
16559
16560
16561 func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall {
16562 c.urlParams_.Set("pageToken", pageToken)
16563 return c
16564 }
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574 func (c *AdvertisersListCall) SearchString(searchString string) *AdvertisersListCall {
16575 c.urlParams_.Set("searchString", searchString)
16576 return c
16577 }
16578
16579
16580
16581
16582
16583
16584
16585
16586 func (c *AdvertisersListCall) SortField(sortField string) *AdvertisersListCall {
16587 c.urlParams_.Set("sortField", sortField)
16588 return c
16589 }
16590
16591
16592
16593
16594
16595
16596
16597 func (c *AdvertisersListCall) SortOrder(sortOrder string) *AdvertisersListCall {
16598 c.urlParams_.Set("sortOrder", sortOrder)
16599 return c
16600 }
16601
16602
16603
16604
16605
16606
16607
16608
16609 func (c *AdvertisersListCall) Status(status string) *AdvertisersListCall {
16610 c.urlParams_.Set("status", status)
16611 return c
16612 }
16613
16614
16615
16616 func (c *AdvertisersListCall) SubaccountId(subaccountId int64) *AdvertisersListCall {
16617 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
16618 return c
16619 }
16620
16621
16622
16623
16624 func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall {
16625 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16626 return c
16627 }
16628
16629
16630
16631
16632 func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall {
16633 c.ifNoneMatch_ = entityTag
16634 return c
16635 }
16636
16637
16638 func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
16639 c.ctx_ = ctx
16640 return c
16641 }
16642
16643
16644
16645 func (c *AdvertisersListCall) Header() http.Header {
16646 if c.header_ == nil {
16647 c.header_ = make(http.Header)
16648 }
16649 return c.header_
16650 }
16651
16652 func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
16653 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
16654 if c.ifNoneMatch_ != "" {
16655 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16656 }
16657 var body io.Reader = nil
16658 c.urlParams_.Set("alt", alt)
16659 c.urlParams_.Set("prettyPrint", "false")
16660 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers")
16661 urls += "?" + c.urlParams_.Encode()
16662 req, err := http.NewRequest("GET", urls, body)
16663 if err != nil {
16664 return nil, err
16665 }
16666 req.Header = reqHeaders
16667 googleapi.Expand(req.URL, map[string]string{
16668 "profileId": strconv.FormatInt(c.profileId, 10),
16669 })
16670 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16671 }
16672
16673
16674
16675
16676
16677
16678
16679 func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*AdvertisersListResponse, error) {
16680 gensupport.SetOptions(c.urlParams_, opts...)
16681 res, err := c.doRequest("json")
16682 if res != nil && res.StatusCode == http.StatusNotModified {
16683 if res.Body != nil {
16684 res.Body.Close()
16685 }
16686 return nil, gensupport.WrapError(&googleapi.Error{
16687 Code: res.StatusCode,
16688 Header: res.Header,
16689 })
16690 }
16691 if err != nil {
16692 return nil, err
16693 }
16694 defer googleapi.CloseBody(res)
16695 if err := googleapi.CheckResponse(res); err != nil {
16696 return nil, gensupport.WrapError(err)
16697 }
16698 ret := &AdvertisersListResponse{
16699 ServerResponse: googleapi.ServerResponse{
16700 Header: res.Header,
16701 HTTPStatusCode: res.StatusCode,
16702 },
16703 }
16704 target := &ret
16705 if err := gensupport.DecodeResponse(target, res); err != nil {
16706 return nil, err
16707 }
16708 return ret, nil
16709 }
16710
16711
16712
16713
16714 func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*AdvertisersListResponse) error) error {
16715 c.ctx_ = ctx
16716 defer c.PageToken(c.urlParams_.Get("pageToken"))
16717 for {
16718 x, err := c.Do()
16719 if err != nil {
16720 return err
16721 }
16722 if err := f(x); err != nil {
16723 return err
16724 }
16725 if x.NextPageToken == "" {
16726 return nil
16727 }
16728 c.PageToken(x.NextPageToken)
16729 }
16730 }
16731
16732 type AdvertisersPatchCall struct {
16733 s *Service
16734 profileId int64
16735 advertiser *Advertiser
16736 urlParams_ gensupport.URLParams
16737 ctx_ context.Context
16738 header_ http.Header
16739 }
16740
16741
16742
16743
16744
16745 func (r *AdvertisersService) Patch(profileId int64, id int64, advertiser *Advertiser) *AdvertisersPatchCall {
16746 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16747 c.profileId = profileId
16748 c.urlParams_.Set("id", fmt.Sprint(id))
16749 c.advertiser = advertiser
16750 return c
16751 }
16752
16753
16754
16755
16756 func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall {
16757 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16758 return c
16759 }
16760
16761
16762 func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
16763 c.ctx_ = ctx
16764 return c
16765 }
16766
16767
16768
16769 func (c *AdvertisersPatchCall) Header() http.Header {
16770 if c.header_ == nil {
16771 c.header_ = make(http.Header)
16772 }
16773 return c.header_
16774 }
16775
16776 func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
16777 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16778 var body io.Reader = nil
16779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16780 if err != nil {
16781 return nil, err
16782 }
16783 c.urlParams_.Set("alt", alt)
16784 c.urlParams_.Set("prettyPrint", "false")
16785 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers")
16786 urls += "?" + c.urlParams_.Encode()
16787 req, err := http.NewRequest("PATCH", urls, body)
16788 if err != nil {
16789 return nil, err
16790 }
16791 req.Header = reqHeaders
16792 googleapi.Expand(req.URL, map[string]string{
16793 "profileId": strconv.FormatInt(c.profileId, 10),
16794 })
16795 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16796 }
16797
16798
16799
16800
16801
16802
16803 func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16804 gensupport.SetOptions(c.urlParams_, opts...)
16805 res, err := c.doRequest("json")
16806 if res != nil && res.StatusCode == http.StatusNotModified {
16807 if res.Body != nil {
16808 res.Body.Close()
16809 }
16810 return nil, gensupport.WrapError(&googleapi.Error{
16811 Code: res.StatusCode,
16812 Header: res.Header,
16813 })
16814 }
16815 if err != nil {
16816 return nil, err
16817 }
16818 defer googleapi.CloseBody(res)
16819 if err := googleapi.CheckResponse(res); err != nil {
16820 return nil, gensupport.WrapError(err)
16821 }
16822 ret := &Advertiser{
16823 ServerResponse: googleapi.ServerResponse{
16824 Header: res.Header,
16825 HTTPStatusCode: res.StatusCode,
16826 },
16827 }
16828 target := &ret
16829 if err := gensupport.DecodeResponse(target, res); err != nil {
16830 return nil, err
16831 }
16832 return ret, nil
16833 }
16834
16835 type AdvertisersUpdateCall struct {
16836 s *Service
16837 profileId int64
16838 advertiser *Advertiser
16839 urlParams_ gensupport.URLParams
16840 ctx_ context.Context
16841 header_ http.Header
16842 }
16843
16844
16845
16846
16847 func (r *AdvertisersService) Update(profileId int64, advertiser *Advertiser) *AdvertisersUpdateCall {
16848 c := &AdvertisersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16849 c.profileId = profileId
16850 c.advertiser = advertiser
16851 return c
16852 }
16853
16854
16855
16856
16857 func (c *AdvertisersUpdateCall) Fields(s ...googleapi.Field) *AdvertisersUpdateCall {
16858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16859 return c
16860 }
16861
16862
16863 func (c *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
16864 c.ctx_ = ctx
16865 return c
16866 }
16867
16868
16869
16870 func (c *AdvertisersUpdateCall) Header() http.Header {
16871 if c.header_ == nil {
16872 c.header_ = make(http.Header)
16873 }
16874 return c.header_
16875 }
16876
16877 func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
16878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16879 var body io.Reader = nil
16880 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
16881 if err != nil {
16882 return nil, err
16883 }
16884 c.urlParams_.Set("alt", alt)
16885 c.urlParams_.Set("prettyPrint", "false")
16886 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/advertisers")
16887 urls += "?" + c.urlParams_.Encode()
16888 req, err := http.NewRequest("PUT", urls, body)
16889 if err != nil {
16890 return nil, err
16891 }
16892 req.Header = reqHeaders
16893 googleapi.Expand(req.URL, map[string]string{
16894 "profileId": strconv.FormatInt(c.profileId, 10),
16895 })
16896 return gensupport.SendRequest(c.ctx_, c.s.client, req)
16897 }
16898
16899
16900
16901
16902
16903
16904 func (c *AdvertisersUpdateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) {
16905 gensupport.SetOptions(c.urlParams_, opts...)
16906 res, err := c.doRequest("json")
16907 if res != nil && res.StatusCode == http.StatusNotModified {
16908 if res.Body != nil {
16909 res.Body.Close()
16910 }
16911 return nil, gensupport.WrapError(&googleapi.Error{
16912 Code: res.StatusCode,
16913 Header: res.Header,
16914 })
16915 }
16916 if err != nil {
16917 return nil, err
16918 }
16919 defer googleapi.CloseBody(res)
16920 if err := googleapi.CheckResponse(res); err != nil {
16921 return nil, gensupport.WrapError(err)
16922 }
16923 ret := &Advertiser{
16924 ServerResponse: googleapi.ServerResponse{
16925 Header: res.Header,
16926 HTTPStatusCode: res.StatusCode,
16927 },
16928 }
16929 target := &ret
16930 if err := gensupport.DecodeResponse(target, res); err != nil {
16931 return nil, err
16932 }
16933 return ret, nil
16934 }
16935
16936 type BillingAssignmentsInsertCall struct {
16937 s *Service
16938 profileId int64
16939 billingProfileId int64
16940 billingassignment *BillingAssignment
16941 urlParams_ gensupport.URLParams
16942 ctx_ context.Context
16943 header_ http.Header
16944 }
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954 func (r *BillingAssignmentsService) Insert(profileId int64, billingProfileId int64, billingassignment *BillingAssignment) *BillingAssignmentsInsertCall {
16955 c := &BillingAssignmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16956 c.profileId = profileId
16957 c.billingProfileId = billingProfileId
16958 c.billingassignment = billingassignment
16959 return c
16960 }
16961
16962
16963
16964
16965 func (c *BillingAssignmentsInsertCall) Fields(s ...googleapi.Field) *BillingAssignmentsInsertCall {
16966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
16967 return c
16968 }
16969
16970
16971 func (c *BillingAssignmentsInsertCall) Context(ctx context.Context) *BillingAssignmentsInsertCall {
16972 c.ctx_ = ctx
16973 return c
16974 }
16975
16976
16977
16978 func (c *BillingAssignmentsInsertCall) Header() http.Header {
16979 if c.header_ == nil {
16980 c.header_ = make(http.Header)
16981 }
16982 return c.header_
16983 }
16984
16985 func (c *BillingAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
16986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
16987 var body io.Reader = nil
16988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.billingassignment)
16989 if err != nil {
16990 return nil, err
16991 }
16992 c.urlParams_.Set("alt", alt)
16993 c.urlParams_.Set("prettyPrint", "false")
16994 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles/{+billingProfileId}/billingAssignments")
16995 urls += "?" + c.urlParams_.Encode()
16996 req, err := http.NewRequest("POST", urls, body)
16997 if err != nil {
16998 return nil, err
16999 }
17000 req.Header = reqHeaders
17001 googleapi.Expand(req.URL, map[string]string{
17002 "profileId": strconv.FormatInt(c.profileId, 10),
17003 "billingProfileId": strconv.FormatInt(c.billingProfileId, 10),
17004 })
17005 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17006 }
17007
17008
17009
17010
17011
17012
17013
17014 func (c *BillingAssignmentsInsertCall) Do(opts ...googleapi.CallOption) (*BillingAssignment, error) {
17015 gensupport.SetOptions(c.urlParams_, opts...)
17016 res, err := c.doRequest("json")
17017 if res != nil && res.StatusCode == http.StatusNotModified {
17018 if res.Body != nil {
17019 res.Body.Close()
17020 }
17021 return nil, gensupport.WrapError(&googleapi.Error{
17022 Code: res.StatusCode,
17023 Header: res.Header,
17024 })
17025 }
17026 if err != nil {
17027 return nil, err
17028 }
17029 defer googleapi.CloseBody(res)
17030 if err := googleapi.CheckResponse(res); err != nil {
17031 return nil, gensupport.WrapError(err)
17032 }
17033 ret := &BillingAssignment{
17034 ServerResponse: googleapi.ServerResponse{
17035 Header: res.Header,
17036 HTTPStatusCode: res.StatusCode,
17037 },
17038 }
17039 target := &ret
17040 if err := gensupport.DecodeResponse(target, res); err != nil {
17041 return nil, err
17042 }
17043 return ret, nil
17044 }
17045
17046 type BillingAssignmentsListCall struct {
17047 s *Service
17048 profileId int64
17049 billingProfileId int64
17050 urlParams_ gensupport.URLParams
17051 ifNoneMatch_ string
17052 ctx_ context.Context
17053 header_ http.Header
17054 }
17055
17056
17057
17058
17059
17060 func (r *BillingAssignmentsService) List(profileId int64, billingProfileId int64) *BillingAssignmentsListCall {
17061 c := &BillingAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17062 c.profileId = profileId
17063 c.billingProfileId = billingProfileId
17064 return c
17065 }
17066
17067
17068
17069
17070 func (c *BillingAssignmentsListCall) Fields(s ...googleapi.Field) *BillingAssignmentsListCall {
17071 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17072 return c
17073 }
17074
17075
17076
17077
17078 func (c *BillingAssignmentsListCall) IfNoneMatch(entityTag string) *BillingAssignmentsListCall {
17079 c.ifNoneMatch_ = entityTag
17080 return c
17081 }
17082
17083
17084 func (c *BillingAssignmentsListCall) Context(ctx context.Context) *BillingAssignmentsListCall {
17085 c.ctx_ = ctx
17086 return c
17087 }
17088
17089
17090
17091 func (c *BillingAssignmentsListCall) Header() http.Header {
17092 if c.header_ == nil {
17093 c.header_ = make(http.Header)
17094 }
17095 return c.header_
17096 }
17097
17098 func (c *BillingAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
17099 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17100 if c.ifNoneMatch_ != "" {
17101 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17102 }
17103 var body io.Reader = nil
17104 c.urlParams_.Set("alt", alt)
17105 c.urlParams_.Set("prettyPrint", "false")
17106 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles/{+billingProfileId}/billingAssignments")
17107 urls += "?" + c.urlParams_.Encode()
17108 req, err := http.NewRequest("GET", urls, body)
17109 if err != nil {
17110 return nil, err
17111 }
17112 req.Header = reqHeaders
17113 googleapi.Expand(req.URL, map[string]string{
17114 "profileId": strconv.FormatInt(c.profileId, 10),
17115 "billingProfileId": strconv.FormatInt(c.billingProfileId, 10),
17116 })
17117 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17118 }
17119
17120
17121
17122
17123
17124
17125
17126 func (c *BillingAssignmentsListCall) Do(opts ...googleapi.CallOption) (*BillingAssignmentsListResponse, error) {
17127 gensupport.SetOptions(c.urlParams_, opts...)
17128 res, err := c.doRequest("json")
17129 if res != nil && res.StatusCode == http.StatusNotModified {
17130 if res.Body != nil {
17131 res.Body.Close()
17132 }
17133 return nil, gensupport.WrapError(&googleapi.Error{
17134 Code: res.StatusCode,
17135 Header: res.Header,
17136 })
17137 }
17138 if err != nil {
17139 return nil, err
17140 }
17141 defer googleapi.CloseBody(res)
17142 if err := googleapi.CheckResponse(res); err != nil {
17143 return nil, gensupport.WrapError(err)
17144 }
17145 ret := &BillingAssignmentsListResponse{
17146 ServerResponse: googleapi.ServerResponse{
17147 Header: res.Header,
17148 HTTPStatusCode: res.StatusCode,
17149 },
17150 }
17151 target := &ret
17152 if err := gensupport.DecodeResponse(target, res); err != nil {
17153 return nil, err
17154 }
17155 return ret, nil
17156 }
17157
17158 type BillingProfilesGetCall struct {
17159 s *Service
17160 profileId int64
17161 id int64
17162 urlParams_ gensupport.URLParams
17163 ifNoneMatch_ string
17164 ctx_ context.Context
17165 header_ http.Header
17166 }
17167
17168
17169
17170
17171
17172 func (r *BillingProfilesService) Get(profileId int64, id int64) *BillingProfilesGetCall {
17173 c := &BillingProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17174 c.profileId = profileId
17175 c.id = id
17176 return c
17177 }
17178
17179
17180
17181
17182 func (c *BillingProfilesGetCall) Fields(s ...googleapi.Field) *BillingProfilesGetCall {
17183 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17184 return c
17185 }
17186
17187
17188
17189
17190 func (c *BillingProfilesGetCall) IfNoneMatch(entityTag string) *BillingProfilesGetCall {
17191 c.ifNoneMatch_ = entityTag
17192 return c
17193 }
17194
17195
17196 func (c *BillingProfilesGetCall) Context(ctx context.Context) *BillingProfilesGetCall {
17197 c.ctx_ = ctx
17198 return c
17199 }
17200
17201
17202
17203 func (c *BillingProfilesGetCall) Header() http.Header {
17204 if c.header_ == nil {
17205 c.header_ = make(http.Header)
17206 }
17207 return c.header_
17208 }
17209
17210 func (c *BillingProfilesGetCall) doRequest(alt string) (*http.Response, error) {
17211 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17212 if c.ifNoneMatch_ != "" {
17213 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17214 }
17215 var body io.Reader = nil
17216 c.urlParams_.Set("alt", alt)
17217 c.urlParams_.Set("prettyPrint", "false")
17218 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles/{+id}")
17219 urls += "?" + c.urlParams_.Encode()
17220 req, err := http.NewRequest("GET", urls, body)
17221 if err != nil {
17222 return nil, err
17223 }
17224 req.Header = reqHeaders
17225 googleapi.Expand(req.URL, map[string]string{
17226 "profileId": strconv.FormatInt(c.profileId, 10),
17227 "id": strconv.FormatInt(c.id, 10),
17228 })
17229 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17230 }
17231
17232
17233
17234
17235
17236
17237 func (c *BillingProfilesGetCall) Do(opts ...googleapi.CallOption) (*BillingProfile, error) {
17238 gensupport.SetOptions(c.urlParams_, opts...)
17239 res, err := c.doRequest("json")
17240 if res != nil && res.StatusCode == http.StatusNotModified {
17241 if res.Body != nil {
17242 res.Body.Close()
17243 }
17244 return nil, gensupport.WrapError(&googleapi.Error{
17245 Code: res.StatusCode,
17246 Header: res.Header,
17247 })
17248 }
17249 if err != nil {
17250 return nil, err
17251 }
17252 defer googleapi.CloseBody(res)
17253 if err := googleapi.CheckResponse(res); err != nil {
17254 return nil, gensupport.WrapError(err)
17255 }
17256 ret := &BillingProfile{
17257 ServerResponse: googleapi.ServerResponse{
17258 Header: res.Header,
17259 HTTPStatusCode: res.StatusCode,
17260 },
17261 }
17262 target := &ret
17263 if err := gensupport.DecodeResponse(target, res); err != nil {
17264 return nil, err
17265 }
17266 return ret, nil
17267 }
17268
17269 type BillingProfilesListCall struct {
17270 s *Service
17271 profileId int64
17272 urlParams_ gensupport.URLParams
17273 ifNoneMatch_ string
17274 ctx_ context.Context
17275 header_ http.Header
17276 }
17277
17278
17279
17280
17281
17282 func (r *BillingProfilesService) List(profileId int64) *BillingProfilesListCall {
17283 c := &BillingProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17284 c.profileId = profileId
17285 return c
17286 }
17287
17288
17289
17290 func (c *BillingProfilesListCall) CurrencyCode(currencyCode string) *BillingProfilesListCall {
17291 c.urlParams_.Set("currency_code", currencyCode)
17292 return c
17293 }
17294
17295
17296
17297 func (c *BillingProfilesListCall) Ids(ids ...int64) *BillingProfilesListCall {
17298 var ids_ []string
17299 for _, v := range ids {
17300 ids_ = append(ids_, fmt.Sprint(v))
17301 }
17302 c.urlParams_.SetMulti("ids", ids_)
17303 return c
17304 }
17305
17306
17307
17308 func (c *BillingProfilesListCall) MaxResults(maxResults int64) *BillingProfilesListCall {
17309 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17310 return c
17311 }
17312
17313
17314
17315
17316
17317
17318
17319
17320 func (c *BillingProfilesListCall) Name(name string) *BillingProfilesListCall {
17321 c.urlParams_.Set("name", name)
17322 return c
17323 }
17324
17325
17326
17327
17328 func (c *BillingProfilesListCall) OnlySuggestion(onlySuggestion bool) *BillingProfilesListCall {
17329 c.urlParams_.Set("onlySuggestion", fmt.Sprint(onlySuggestion))
17330 return c
17331 }
17332
17333
17334
17335 func (c *BillingProfilesListCall) PageToken(pageToken string) *BillingProfilesListCall {
17336 c.urlParams_.Set("pageToken", pageToken)
17337 return c
17338 }
17339
17340
17341
17342
17343
17344
17345
17346
17347 func (c *BillingProfilesListCall) SortField(sortField string) *BillingProfilesListCall {
17348 c.urlParams_.Set("sortField", sortField)
17349 return c
17350 }
17351
17352
17353
17354
17355
17356
17357
17358 func (c *BillingProfilesListCall) SortOrder(sortOrder string) *BillingProfilesListCall {
17359 c.urlParams_.Set("sortOrder", sortOrder)
17360 return c
17361 }
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371 func (c *BillingProfilesListCall) Status(status ...string) *BillingProfilesListCall {
17372 c.urlParams_.SetMulti("status", append([]string{}, status...))
17373 return c
17374 }
17375
17376
17377
17378
17379 func (c *BillingProfilesListCall) SubaccountIds(subaccountIds ...int64) *BillingProfilesListCall {
17380 var subaccountIds_ []string
17381 for _, v := range subaccountIds {
17382 subaccountIds_ = append(subaccountIds_, fmt.Sprint(v))
17383 }
17384 c.urlParams_.SetMulti("subaccountIds", subaccountIds_)
17385 return c
17386 }
17387
17388
17389
17390
17391 func (c *BillingProfilesListCall) Fields(s ...googleapi.Field) *BillingProfilesListCall {
17392 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17393 return c
17394 }
17395
17396
17397
17398
17399 func (c *BillingProfilesListCall) IfNoneMatch(entityTag string) *BillingProfilesListCall {
17400 c.ifNoneMatch_ = entityTag
17401 return c
17402 }
17403
17404
17405 func (c *BillingProfilesListCall) Context(ctx context.Context) *BillingProfilesListCall {
17406 c.ctx_ = ctx
17407 return c
17408 }
17409
17410
17411
17412 func (c *BillingProfilesListCall) Header() http.Header {
17413 if c.header_ == nil {
17414 c.header_ = make(http.Header)
17415 }
17416 return c.header_
17417 }
17418
17419 func (c *BillingProfilesListCall) doRequest(alt string) (*http.Response, error) {
17420 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17421 if c.ifNoneMatch_ != "" {
17422 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17423 }
17424 var body io.Reader = nil
17425 c.urlParams_.Set("alt", alt)
17426 c.urlParams_.Set("prettyPrint", "false")
17427 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles")
17428 urls += "?" + c.urlParams_.Encode()
17429 req, err := http.NewRequest("GET", urls, body)
17430 if err != nil {
17431 return nil, err
17432 }
17433 req.Header = reqHeaders
17434 googleapi.Expand(req.URL, map[string]string{
17435 "profileId": strconv.FormatInt(c.profileId, 10),
17436 })
17437 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17438 }
17439
17440
17441
17442
17443
17444
17445
17446 func (c *BillingProfilesListCall) Do(opts ...googleapi.CallOption) (*BillingProfilesListResponse, error) {
17447 gensupport.SetOptions(c.urlParams_, opts...)
17448 res, err := c.doRequest("json")
17449 if res != nil && res.StatusCode == http.StatusNotModified {
17450 if res.Body != nil {
17451 res.Body.Close()
17452 }
17453 return nil, gensupport.WrapError(&googleapi.Error{
17454 Code: res.StatusCode,
17455 Header: res.Header,
17456 })
17457 }
17458 if err != nil {
17459 return nil, err
17460 }
17461 defer googleapi.CloseBody(res)
17462 if err := googleapi.CheckResponse(res); err != nil {
17463 return nil, gensupport.WrapError(err)
17464 }
17465 ret := &BillingProfilesListResponse{
17466 ServerResponse: googleapi.ServerResponse{
17467 Header: res.Header,
17468 HTTPStatusCode: res.StatusCode,
17469 },
17470 }
17471 target := &ret
17472 if err := gensupport.DecodeResponse(target, res); err != nil {
17473 return nil, err
17474 }
17475 return ret, nil
17476 }
17477
17478
17479
17480
17481 func (c *BillingProfilesListCall) Pages(ctx context.Context, f func(*BillingProfilesListResponse) error) error {
17482 c.ctx_ = ctx
17483 defer c.PageToken(c.urlParams_.Get("pageToken"))
17484 for {
17485 x, err := c.Do()
17486 if err != nil {
17487 return err
17488 }
17489 if err := f(x); err != nil {
17490 return err
17491 }
17492 if x.NextPageToken == "" {
17493 return nil
17494 }
17495 c.PageToken(x.NextPageToken)
17496 }
17497 }
17498
17499 type BillingProfilesUpdateCall struct {
17500 s *Service
17501 profileId int64
17502 billingprofile *BillingProfile
17503 urlParams_ gensupport.URLParams
17504 ctx_ context.Context
17505 header_ http.Header
17506 }
17507
17508
17509
17510
17511 func (r *BillingProfilesService) Update(profileId int64, billingprofile *BillingProfile) *BillingProfilesUpdateCall {
17512 c := &BillingProfilesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17513 c.profileId = profileId
17514 c.billingprofile = billingprofile
17515 return c
17516 }
17517
17518
17519
17520
17521 func (c *BillingProfilesUpdateCall) Fields(s ...googleapi.Field) *BillingProfilesUpdateCall {
17522 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17523 return c
17524 }
17525
17526
17527 func (c *BillingProfilesUpdateCall) Context(ctx context.Context) *BillingProfilesUpdateCall {
17528 c.ctx_ = ctx
17529 return c
17530 }
17531
17532
17533
17534 func (c *BillingProfilesUpdateCall) Header() http.Header {
17535 if c.header_ == nil {
17536 c.header_ = make(http.Header)
17537 }
17538 return c.header_
17539 }
17540
17541 func (c *BillingProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
17542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17543 var body io.Reader = nil
17544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.billingprofile)
17545 if err != nil {
17546 return nil, err
17547 }
17548 c.urlParams_.Set("alt", alt)
17549 c.urlParams_.Set("prettyPrint", "false")
17550 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles")
17551 urls += "?" + c.urlParams_.Encode()
17552 req, err := http.NewRequest("PUT", urls, body)
17553 if err != nil {
17554 return nil, err
17555 }
17556 req.Header = reqHeaders
17557 googleapi.Expand(req.URL, map[string]string{
17558 "profileId": strconv.FormatInt(c.profileId, 10),
17559 })
17560 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17561 }
17562
17563
17564
17565
17566
17567
17568 func (c *BillingProfilesUpdateCall) Do(opts ...googleapi.CallOption) (*BillingProfile, error) {
17569 gensupport.SetOptions(c.urlParams_, opts...)
17570 res, err := c.doRequest("json")
17571 if res != nil && res.StatusCode == http.StatusNotModified {
17572 if res.Body != nil {
17573 res.Body.Close()
17574 }
17575 return nil, gensupport.WrapError(&googleapi.Error{
17576 Code: res.StatusCode,
17577 Header: res.Header,
17578 })
17579 }
17580 if err != nil {
17581 return nil, err
17582 }
17583 defer googleapi.CloseBody(res)
17584 if err := googleapi.CheckResponse(res); err != nil {
17585 return nil, gensupport.WrapError(err)
17586 }
17587 ret := &BillingProfile{
17588 ServerResponse: googleapi.ServerResponse{
17589 Header: res.Header,
17590 HTTPStatusCode: res.StatusCode,
17591 },
17592 }
17593 target := &ret
17594 if err := gensupport.DecodeResponse(target, res); err != nil {
17595 return nil, err
17596 }
17597 return ret, nil
17598 }
17599
17600 type BillingRatesListCall struct {
17601 s *Service
17602 profileId int64
17603 billingProfileId int64
17604 urlParams_ gensupport.URLParams
17605 ifNoneMatch_ string
17606 ctx_ context.Context
17607 header_ http.Header
17608 }
17609
17610
17611
17612
17613
17614 func (r *BillingRatesService) List(profileId int64, billingProfileId int64) *BillingRatesListCall {
17615 c := &BillingRatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17616 c.profileId = profileId
17617 c.billingProfileId = billingProfileId
17618 return c
17619 }
17620
17621
17622
17623
17624 func (c *BillingRatesListCall) Fields(s ...googleapi.Field) *BillingRatesListCall {
17625 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17626 return c
17627 }
17628
17629
17630
17631
17632 func (c *BillingRatesListCall) IfNoneMatch(entityTag string) *BillingRatesListCall {
17633 c.ifNoneMatch_ = entityTag
17634 return c
17635 }
17636
17637
17638 func (c *BillingRatesListCall) Context(ctx context.Context) *BillingRatesListCall {
17639 c.ctx_ = ctx
17640 return c
17641 }
17642
17643
17644
17645 func (c *BillingRatesListCall) Header() http.Header {
17646 if c.header_ == nil {
17647 c.header_ = make(http.Header)
17648 }
17649 return c.header_
17650 }
17651
17652 func (c *BillingRatesListCall) doRequest(alt string) (*http.Response, error) {
17653 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17654 if c.ifNoneMatch_ != "" {
17655 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17656 }
17657 var body io.Reader = nil
17658 c.urlParams_.Set("alt", alt)
17659 c.urlParams_.Set("prettyPrint", "false")
17660 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/billingProfiles/{+billingProfileId}/billingRates")
17661 urls += "?" + c.urlParams_.Encode()
17662 req, err := http.NewRequest("GET", urls, body)
17663 if err != nil {
17664 return nil, err
17665 }
17666 req.Header = reqHeaders
17667 googleapi.Expand(req.URL, map[string]string{
17668 "profileId": strconv.FormatInt(c.profileId, 10),
17669 "billingProfileId": strconv.FormatInt(c.billingProfileId, 10),
17670 })
17671 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17672 }
17673
17674
17675
17676
17677
17678
17679
17680 func (c *BillingRatesListCall) Do(opts ...googleapi.CallOption) (*BillingRatesListResponse, error) {
17681 gensupport.SetOptions(c.urlParams_, opts...)
17682 res, err := c.doRequest("json")
17683 if res != nil && res.StatusCode == http.StatusNotModified {
17684 if res.Body != nil {
17685 res.Body.Close()
17686 }
17687 return nil, gensupport.WrapError(&googleapi.Error{
17688 Code: res.StatusCode,
17689 Header: res.Header,
17690 })
17691 }
17692 if err != nil {
17693 return nil, err
17694 }
17695 defer googleapi.CloseBody(res)
17696 if err := googleapi.CheckResponse(res); err != nil {
17697 return nil, gensupport.WrapError(err)
17698 }
17699 ret := &BillingRatesListResponse{
17700 ServerResponse: googleapi.ServerResponse{
17701 Header: res.Header,
17702 HTTPStatusCode: res.StatusCode,
17703 },
17704 }
17705 target := &ret
17706 if err := gensupport.DecodeResponse(target, res); err != nil {
17707 return nil, err
17708 }
17709 return ret, nil
17710 }
17711
17712 type BrowsersListCall struct {
17713 s *Service
17714 profileId int64
17715 urlParams_ gensupport.URLParams
17716 ifNoneMatch_ string
17717 ctx_ context.Context
17718 header_ http.Header
17719 }
17720
17721
17722
17723
17724 func (r *BrowsersService) List(profileId int64) *BrowsersListCall {
17725 c := &BrowsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17726 c.profileId = profileId
17727 return c
17728 }
17729
17730
17731
17732
17733 func (c *BrowsersListCall) Fields(s ...googleapi.Field) *BrowsersListCall {
17734 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17735 return c
17736 }
17737
17738
17739
17740
17741 func (c *BrowsersListCall) IfNoneMatch(entityTag string) *BrowsersListCall {
17742 c.ifNoneMatch_ = entityTag
17743 return c
17744 }
17745
17746
17747 func (c *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
17748 c.ctx_ = ctx
17749 return c
17750 }
17751
17752
17753
17754 func (c *BrowsersListCall) Header() http.Header {
17755 if c.header_ == nil {
17756 c.header_ = make(http.Header)
17757 }
17758 return c.header_
17759 }
17760
17761 func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
17762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
17763 if c.ifNoneMatch_ != "" {
17764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17765 }
17766 var body io.Reader = nil
17767 c.urlParams_.Set("alt", alt)
17768 c.urlParams_.Set("prettyPrint", "false")
17769 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/browsers")
17770 urls += "?" + c.urlParams_.Encode()
17771 req, err := http.NewRequest("GET", urls, body)
17772 if err != nil {
17773 return nil, err
17774 }
17775 req.Header = reqHeaders
17776 googleapi.Expand(req.URL, map[string]string{
17777 "profileId": strconv.FormatInt(c.profileId, 10),
17778 })
17779 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17780 }
17781
17782
17783
17784
17785
17786
17787
17788 func (c *BrowsersListCall) Do(opts ...googleapi.CallOption) (*BrowsersListResponse, error) {
17789 gensupport.SetOptions(c.urlParams_, opts...)
17790 res, err := c.doRequest("json")
17791 if res != nil && res.StatusCode == http.StatusNotModified {
17792 if res.Body != nil {
17793 res.Body.Close()
17794 }
17795 return nil, gensupport.WrapError(&googleapi.Error{
17796 Code: res.StatusCode,
17797 Header: res.Header,
17798 })
17799 }
17800 if err != nil {
17801 return nil, err
17802 }
17803 defer googleapi.CloseBody(res)
17804 if err := googleapi.CheckResponse(res); err != nil {
17805 return nil, gensupport.WrapError(err)
17806 }
17807 ret := &BrowsersListResponse{
17808 ServerResponse: googleapi.ServerResponse{
17809 Header: res.Header,
17810 HTTPStatusCode: res.StatusCode,
17811 },
17812 }
17813 target := &ret
17814 if err := gensupport.DecodeResponse(target, res); err != nil {
17815 return nil, err
17816 }
17817 return ret, nil
17818 }
17819
17820 type CampaignCreativeAssociationsInsertCall struct {
17821 s *Service
17822 profileId int64
17823 campaignId int64
17824 campaigncreativeassociation *CampaignCreativeAssociation
17825 urlParams_ gensupport.URLParams
17826 ctx_ context.Context
17827 header_ http.Header
17828 }
17829
17830
17831
17832
17833
17834
17835
17836 func (r *CampaignCreativeAssociationsService) Insert(profileId int64, campaignId int64, campaigncreativeassociation *CampaignCreativeAssociation) *CampaignCreativeAssociationsInsertCall {
17837 c := &CampaignCreativeAssociationsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17838 c.profileId = profileId
17839 c.campaignId = campaignId
17840 c.campaigncreativeassociation = campaigncreativeassociation
17841 return c
17842 }
17843
17844
17845
17846
17847 func (c *CampaignCreativeAssociationsInsertCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsInsertCall {
17848 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17849 return c
17850 }
17851
17852
17853 func (c *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
17854 c.ctx_ = ctx
17855 return c
17856 }
17857
17858
17859
17860 func (c *CampaignCreativeAssociationsInsertCall) Header() http.Header {
17861 if c.header_ == nil {
17862 c.header_ = make(http.Header)
17863 }
17864 return c.header_
17865 }
17866
17867 func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
17868 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
17869 var body io.Reader = nil
17870 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
17871 if err != nil {
17872 return nil, err
17873 }
17874 c.urlParams_.Set("alt", alt)
17875 c.urlParams_.Set("prettyPrint", "false")
17876 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns/{+campaignId}/campaignCreativeAssociations")
17877 urls += "?" + c.urlParams_.Encode()
17878 req, err := http.NewRequest("POST", urls, body)
17879 if err != nil {
17880 return nil, err
17881 }
17882 req.Header = reqHeaders
17883 googleapi.Expand(req.URL, map[string]string{
17884 "profileId": strconv.FormatInt(c.profileId, 10),
17885 "campaignId": strconv.FormatInt(c.campaignId, 10),
17886 })
17887 return gensupport.SendRequest(c.ctx_, c.s.client, req)
17888 }
17889
17890
17891
17892
17893
17894
17895
17896 func (c *CampaignCreativeAssociationsInsertCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociation, error) {
17897 gensupport.SetOptions(c.urlParams_, opts...)
17898 res, err := c.doRequest("json")
17899 if res != nil && res.StatusCode == http.StatusNotModified {
17900 if res.Body != nil {
17901 res.Body.Close()
17902 }
17903 return nil, gensupport.WrapError(&googleapi.Error{
17904 Code: res.StatusCode,
17905 Header: res.Header,
17906 })
17907 }
17908 if err != nil {
17909 return nil, err
17910 }
17911 defer googleapi.CloseBody(res)
17912 if err := googleapi.CheckResponse(res); err != nil {
17913 return nil, gensupport.WrapError(err)
17914 }
17915 ret := &CampaignCreativeAssociation{
17916 ServerResponse: googleapi.ServerResponse{
17917 Header: res.Header,
17918 HTTPStatusCode: res.StatusCode,
17919 },
17920 }
17921 target := &ret
17922 if err := gensupport.DecodeResponse(target, res); err != nil {
17923 return nil, err
17924 }
17925 return ret, nil
17926 }
17927
17928 type CampaignCreativeAssociationsListCall struct {
17929 s *Service
17930 profileId int64
17931 campaignId int64
17932 urlParams_ gensupport.URLParams
17933 ifNoneMatch_ string
17934 ctx_ context.Context
17935 header_ http.Header
17936 }
17937
17938
17939
17940
17941
17942
17943 func (r *CampaignCreativeAssociationsService) List(profileId int64, campaignId int64) *CampaignCreativeAssociationsListCall {
17944 c := &CampaignCreativeAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17945 c.profileId = profileId
17946 c.campaignId = campaignId
17947 return c
17948 }
17949
17950
17951
17952 func (c *CampaignCreativeAssociationsListCall) MaxResults(maxResults int64) *CampaignCreativeAssociationsListCall {
17953 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17954 return c
17955 }
17956
17957
17958
17959 func (c *CampaignCreativeAssociationsListCall) PageToken(pageToken string) *CampaignCreativeAssociationsListCall {
17960 c.urlParams_.Set("pageToken", pageToken)
17961 return c
17962 }
17963
17964
17965
17966
17967
17968
17969
17970 func (c *CampaignCreativeAssociationsListCall) SortOrder(sortOrder string) *CampaignCreativeAssociationsListCall {
17971 c.urlParams_.Set("sortOrder", sortOrder)
17972 return c
17973 }
17974
17975
17976
17977
17978 func (c *CampaignCreativeAssociationsListCall) Fields(s ...googleapi.Field) *CampaignCreativeAssociationsListCall {
17979 c.urlParams_.Set("fields", googleapi.CombineFields(s))
17980 return c
17981 }
17982
17983
17984
17985
17986 func (c *CampaignCreativeAssociationsListCall) IfNoneMatch(entityTag string) *CampaignCreativeAssociationsListCall {
17987 c.ifNoneMatch_ = entityTag
17988 return c
17989 }
17990
17991
17992 func (c *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
17993 c.ctx_ = ctx
17994 return c
17995 }
17996
17997
17998
17999 func (c *CampaignCreativeAssociationsListCall) Header() http.Header {
18000 if c.header_ == nil {
18001 c.header_ = make(http.Header)
18002 }
18003 return c.header_
18004 }
18005
18006 func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
18007 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18008 if c.ifNoneMatch_ != "" {
18009 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18010 }
18011 var body io.Reader = nil
18012 c.urlParams_.Set("alt", alt)
18013 c.urlParams_.Set("prettyPrint", "false")
18014 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns/{+campaignId}/campaignCreativeAssociations")
18015 urls += "?" + c.urlParams_.Encode()
18016 req, err := http.NewRequest("GET", urls, body)
18017 if err != nil {
18018 return nil, err
18019 }
18020 req.Header = reqHeaders
18021 googleapi.Expand(req.URL, map[string]string{
18022 "profileId": strconv.FormatInt(c.profileId, 10),
18023 "campaignId": strconv.FormatInt(c.campaignId, 10),
18024 })
18025 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18026 }
18027
18028
18029
18030
18031
18032
18033
18034 func (c *CampaignCreativeAssociationsListCall) Do(opts ...googleapi.CallOption) (*CampaignCreativeAssociationsListResponse, error) {
18035 gensupport.SetOptions(c.urlParams_, opts...)
18036 res, err := c.doRequest("json")
18037 if res != nil && res.StatusCode == http.StatusNotModified {
18038 if res.Body != nil {
18039 res.Body.Close()
18040 }
18041 return nil, gensupport.WrapError(&googleapi.Error{
18042 Code: res.StatusCode,
18043 Header: res.Header,
18044 })
18045 }
18046 if err != nil {
18047 return nil, err
18048 }
18049 defer googleapi.CloseBody(res)
18050 if err := googleapi.CheckResponse(res); err != nil {
18051 return nil, gensupport.WrapError(err)
18052 }
18053 ret := &CampaignCreativeAssociationsListResponse{
18054 ServerResponse: googleapi.ServerResponse{
18055 Header: res.Header,
18056 HTTPStatusCode: res.StatusCode,
18057 },
18058 }
18059 target := &ret
18060 if err := gensupport.DecodeResponse(target, res); err != nil {
18061 return nil, err
18062 }
18063 return ret, nil
18064 }
18065
18066
18067
18068
18069 func (c *CampaignCreativeAssociationsListCall) Pages(ctx context.Context, f func(*CampaignCreativeAssociationsListResponse) error) error {
18070 c.ctx_ = ctx
18071 defer c.PageToken(c.urlParams_.Get("pageToken"))
18072 for {
18073 x, err := c.Do()
18074 if err != nil {
18075 return err
18076 }
18077 if err := f(x); err != nil {
18078 return err
18079 }
18080 if x.NextPageToken == "" {
18081 return nil
18082 }
18083 c.PageToken(x.NextPageToken)
18084 }
18085 }
18086
18087 type CampaignsGetCall struct {
18088 s *Service
18089 profileId int64
18090 id int64
18091 urlParams_ gensupport.URLParams
18092 ifNoneMatch_ string
18093 ctx_ context.Context
18094 header_ http.Header
18095 }
18096
18097
18098
18099
18100
18101 func (r *CampaignsService) Get(profileId int64, id int64) *CampaignsGetCall {
18102 c := &CampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18103 c.profileId = profileId
18104 c.id = id
18105 return c
18106 }
18107
18108
18109
18110
18111 func (c *CampaignsGetCall) Fields(s ...googleapi.Field) *CampaignsGetCall {
18112 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18113 return c
18114 }
18115
18116
18117
18118
18119 func (c *CampaignsGetCall) IfNoneMatch(entityTag string) *CampaignsGetCall {
18120 c.ifNoneMatch_ = entityTag
18121 return c
18122 }
18123
18124
18125 func (c *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
18126 c.ctx_ = ctx
18127 return c
18128 }
18129
18130
18131
18132 func (c *CampaignsGetCall) Header() http.Header {
18133 if c.header_ == nil {
18134 c.header_ = make(http.Header)
18135 }
18136 return c.header_
18137 }
18138
18139 func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
18140 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18141 if c.ifNoneMatch_ != "" {
18142 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18143 }
18144 var body io.Reader = nil
18145 c.urlParams_.Set("alt", alt)
18146 c.urlParams_.Set("prettyPrint", "false")
18147 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns/{+id}")
18148 urls += "?" + c.urlParams_.Encode()
18149 req, err := http.NewRequest("GET", urls, body)
18150 if err != nil {
18151 return nil, err
18152 }
18153 req.Header = reqHeaders
18154 googleapi.Expand(req.URL, map[string]string{
18155 "profileId": strconv.FormatInt(c.profileId, 10),
18156 "id": strconv.FormatInt(c.id, 10),
18157 })
18158 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18159 }
18160
18161
18162
18163
18164
18165
18166 func (c *CampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18167 gensupport.SetOptions(c.urlParams_, opts...)
18168 res, err := c.doRequest("json")
18169 if res != nil && res.StatusCode == http.StatusNotModified {
18170 if res.Body != nil {
18171 res.Body.Close()
18172 }
18173 return nil, gensupport.WrapError(&googleapi.Error{
18174 Code: res.StatusCode,
18175 Header: res.Header,
18176 })
18177 }
18178 if err != nil {
18179 return nil, err
18180 }
18181 defer googleapi.CloseBody(res)
18182 if err := googleapi.CheckResponse(res); err != nil {
18183 return nil, gensupport.WrapError(err)
18184 }
18185 ret := &Campaign{
18186 ServerResponse: googleapi.ServerResponse{
18187 Header: res.Header,
18188 HTTPStatusCode: res.StatusCode,
18189 },
18190 }
18191 target := &ret
18192 if err := gensupport.DecodeResponse(target, res); err != nil {
18193 return nil, err
18194 }
18195 return ret, nil
18196 }
18197
18198 type CampaignsInsertCall struct {
18199 s *Service
18200 profileId int64
18201 campaign *Campaign
18202 urlParams_ gensupport.URLParams
18203 ctx_ context.Context
18204 header_ http.Header
18205 }
18206
18207
18208
18209
18210 func (r *CampaignsService) Insert(profileId int64, campaign *Campaign) *CampaignsInsertCall {
18211 c := &CampaignsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18212 c.profileId = profileId
18213 c.campaign = campaign
18214 return c
18215 }
18216
18217
18218
18219
18220 func (c *CampaignsInsertCall) Fields(s ...googleapi.Field) *CampaignsInsertCall {
18221 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18222 return c
18223 }
18224
18225
18226 func (c *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
18227 c.ctx_ = ctx
18228 return c
18229 }
18230
18231
18232
18233 func (c *CampaignsInsertCall) Header() http.Header {
18234 if c.header_ == nil {
18235 c.header_ = make(http.Header)
18236 }
18237 return c.header_
18238 }
18239
18240 func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
18241 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18242 var body io.Reader = nil
18243 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
18244 if err != nil {
18245 return nil, err
18246 }
18247 c.urlParams_.Set("alt", alt)
18248 c.urlParams_.Set("prettyPrint", "false")
18249 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns")
18250 urls += "?" + c.urlParams_.Encode()
18251 req, err := http.NewRequest("POST", urls, body)
18252 if err != nil {
18253 return nil, err
18254 }
18255 req.Header = reqHeaders
18256 googleapi.Expand(req.URL, map[string]string{
18257 "profileId": strconv.FormatInt(c.profileId, 10),
18258 })
18259 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18260 }
18261
18262
18263
18264
18265
18266
18267 func (c *CampaignsInsertCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18268 gensupport.SetOptions(c.urlParams_, opts...)
18269 res, err := c.doRequest("json")
18270 if res != nil && res.StatusCode == http.StatusNotModified {
18271 if res.Body != nil {
18272 res.Body.Close()
18273 }
18274 return nil, gensupport.WrapError(&googleapi.Error{
18275 Code: res.StatusCode,
18276 Header: res.Header,
18277 })
18278 }
18279 if err != nil {
18280 return nil, err
18281 }
18282 defer googleapi.CloseBody(res)
18283 if err := googleapi.CheckResponse(res); err != nil {
18284 return nil, gensupport.WrapError(err)
18285 }
18286 ret := &Campaign{
18287 ServerResponse: googleapi.ServerResponse{
18288 Header: res.Header,
18289 HTTPStatusCode: res.StatusCode,
18290 },
18291 }
18292 target := &ret
18293 if err := gensupport.DecodeResponse(target, res); err != nil {
18294 return nil, err
18295 }
18296 return ret, nil
18297 }
18298
18299 type CampaignsListCall struct {
18300 s *Service
18301 profileId int64
18302 urlParams_ gensupport.URLParams
18303 ifNoneMatch_ string
18304 ctx_ context.Context
18305 header_ http.Header
18306 }
18307
18308
18309
18310
18311
18312 func (r *CampaignsService) List(profileId int64) *CampaignsListCall {
18313 c := &CampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18314 c.profileId = profileId
18315 return c
18316 }
18317
18318
18319
18320 func (c *CampaignsListCall) AdvertiserGroupIds(advertiserGroupIds ...int64) *CampaignsListCall {
18321 var advertiserGroupIds_ []string
18322 for _, v := range advertiserGroupIds {
18323 advertiserGroupIds_ = append(advertiserGroupIds_, fmt.Sprint(v))
18324 }
18325 c.urlParams_.SetMulti("advertiserGroupIds", advertiserGroupIds_)
18326 return c
18327 }
18328
18329
18330
18331 func (c *CampaignsListCall) AdvertiserIds(advertiserIds ...int64) *CampaignsListCall {
18332 var advertiserIds_ []string
18333 for _, v := range advertiserIds {
18334 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
18335 }
18336 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
18337 return c
18338 }
18339
18340
18341
18342
18343 func (c *CampaignsListCall) Archived(archived bool) *CampaignsListCall {
18344 c.urlParams_.Set("archived", fmt.Sprint(archived))
18345 return c
18346 }
18347
18348
18349
18350
18351 func (c *CampaignsListCall) AtLeastOneOptimizationActivity(atLeastOneOptimizationActivity bool) *CampaignsListCall {
18352 c.urlParams_.Set("atLeastOneOptimizationActivity", fmt.Sprint(atLeastOneOptimizationActivity))
18353 return c
18354 }
18355
18356
18357
18358 func (c *CampaignsListCall) ExcludedIds(excludedIds ...int64) *CampaignsListCall {
18359 var excludedIds_ []string
18360 for _, v := range excludedIds {
18361 excludedIds_ = append(excludedIds_, fmt.Sprint(v))
18362 }
18363 c.urlParams_.SetMulti("excludedIds", excludedIds_)
18364 return c
18365 }
18366
18367
18368 func (c *CampaignsListCall) Ids(ids ...int64) *CampaignsListCall {
18369 var ids_ []string
18370 for _, v := range ids {
18371 ids_ = append(ids_, fmt.Sprint(v))
18372 }
18373 c.urlParams_.SetMulti("ids", ids_)
18374 return c
18375 }
18376
18377
18378
18379 func (c *CampaignsListCall) MaxResults(maxResults int64) *CampaignsListCall {
18380 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18381 return c
18382 }
18383
18384
18385
18386 func (c *CampaignsListCall) OverriddenEventTagId(overriddenEventTagId int64) *CampaignsListCall {
18387 c.urlParams_.Set("overriddenEventTagId", fmt.Sprint(overriddenEventTagId))
18388 return c
18389 }
18390
18391
18392
18393 func (c *CampaignsListCall) PageToken(pageToken string) *CampaignsListCall {
18394 c.urlParams_.Set("pageToken", pageToken)
18395 return c
18396 }
18397
18398
18399
18400
18401
18402
18403
18404
18405 func (c *CampaignsListCall) SearchString(searchString string) *CampaignsListCall {
18406 c.urlParams_.Set("searchString", searchString)
18407 return c
18408 }
18409
18410
18411
18412
18413
18414
18415
18416
18417 func (c *CampaignsListCall) SortField(sortField string) *CampaignsListCall {
18418 c.urlParams_.Set("sortField", sortField)
18419 return c
18420 }
18421
18422
18423
18424
18425
18426
18427
18428 func (c *CampaignsListCall) SortOrder(sortOrder string) *CampaignsListCall {
18429 c.urlParams_.Set("sortOrder", sortOrder)
18430 return c
18431 }
18432
18433
18434
18435 func (c *CampaignsListCall) SubaccountId(subaccountId int64) *CampaignsListCall {
18436 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
18437 return c
18438 }
18439
18440
18441
18442
18443 func (c *CampaignsListCall) Fields(s ...googleapi.Field) *CampaignsListCall {
18444 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18445 return c
18446 }
18447
18448
18449
18450
18451 func (c *CampaignsListCall) IfNoneMatch(entityTag string) *CampaignsListCall {
18452 c.ifNoneMatch_ = entityTag
18453 return c
18454 }
18455
18456
18457 func (c *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
18458 c.ctx_ = ctx
18459 return c
18460 }
18461
18462
18463
18464 func (c *CampaignsListCall) Header() http.Header {
18465 if c.header_ == nil {
18466 c.header_ = make(http.Header)
18467 }
18468 return c.header_
18469 }
18470
18471 func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
18472 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18473 if c.ifNoneMatch_ != "" {
18474 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18475 }
18476 var body io.Reader = nil
18477 c.urlParams_.Set("alt", alt)
18478 c.urlParams_.Set("prettyPrint", "false")
18479 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns")
18480 urls += "?" + c.urlParams_.Encode()
18481 req, err := http.NewRequest("GET", urls, body)
18482 if err != nil {
18483 return nil, err
18484 }
18485 req.Header = reqHeaders
18486 googleapi.Expand(req.URL, map[string]string{
18487 "profileId": strconv.FormatInt(c.profileId, 10),
18488 })
18489 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18490 }
18491
18492
18493
18494
18495
18496
18497
18498 func (c *CampaignsListCall) Do(opts ...googleapi.CallOption) (*CampaignsListResponse, error) {
18499 gensupport.SetOptions(c.urlParams_, opts...)
18500 res, err := c.doRequest("json")
18501 if res != nil && res.StatusCode == http.StatusNotModified {
18502 if res.Body != nil {
18503 res.Body.Close()
18504 }
18505 return nil, gensupport.WrapError(&googleapi.Error{
18506 Code: res.StatusCode,
18507 Header: res.Header,
18508 })
18509 }
18510 if err != nil {
18511 return nil, err
18512 }
18513 defer googleapi.CloseBody(res)
18514 if err := googleapi.CheckResponse(res); err != nil {
18515 return nil, gensupport.WrapError(err)
18516 }
18517 ret := &CampaignsListResponse{
18518 ServerResponse: googleapi.ServerResponse{
18519 Header: res.Header,
18520 HTTPStatusCode: res.StatusCode,
18521 },
18522 }
18523 target := &ret
18524 if err := gensupport.DecodeResponse(target, res); err != nil {
18525 return nil, err
18526 }
18527 return ret, nil
18528 }
18529
18530
18531
18532
18533 func (c *CampaignsListCall) Pages(ctx context.Context, f func(*CampaignsListResponse) error) error {
18534 c.ctx_ = ctx
18535 defer c.PageToken(c.urlParams_.Get("pageToken"))
18536 for {
18537 x, err := c.Do()
18538 if err != nil {
18539 return err
18540 }
18541 if err := f(x); err != nil {
18542 return err
18543 }
18544 if x.NextPageToken == "" {
18545 return nil
18546 }
18547 c.PageToken(x.NextPageToken)
18548 }
18549 }
18550
18551 type CampaignsPatchCall struct {
18552 s *Service
18553 profileId int64
18554 campaign *Campaign
18555 urlParams_ gensupport.URLParams
18556 ctx_ context.Context
18557 header_ http.Header
18558 }
18559
18560
18561
18562
18563
18564 func (r *CampaignsService) Patch(profileId int64, id int64, campaign *Campaign) *CampaignsPatchCall {
18565 c := &CampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18566 c.profileId = profileId
18567 c.urlParams_.Set("id", fmt.Sprint(id))
18568 c.campaign = campaign
18569 return c
18570 }
18571
18572
18573
18574
18575 func (c *CampaignsPatchCall) Fields(s ...googleapi.Field) *CampaignsPatchCall {
18576 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18577 return c
18578 }
18579
18580
18581 func (c *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
18582 c.ctx_ = ctx
18583 return c
18584 }
18585
18586
18587
18588 func (c *CampaignsPatchCall) Header() http.Header {
18589 if c.header_ == nil {
18590 c.header_ = make(http.Header)
18591 }
18592 return c.header_
18593 }
18594
18595 func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
18596 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18597 var body io.Reader = nil
18598 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
18599 if err != nil {
18600 return nil, err
18601 }
18602 c.urlParams_.Set("alt", alt)
18603 c.urlParams_.Set("prettyPrint", "false")
18604 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns")
18605 urls += "?" + c.urlParams_.Encode()
18606 req, err := http.NewRequest("PATCH", urls, body)
18607 if err != nil {
18608 return nil, err
18609 }
18610 req.Header = reqHeaders
18611 googleapi.Expand(req.URL, map[string]string{
18612 "profileId": strconv.FormatInt(c.profileId, 10),
18613 })
18614 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18615 }
18616
18617
18618
18619
18620
18621
18622 func (c *CampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18623 gensupport.SetOptions(c.urlParams_, opts...)
18624 res, err := c.doRequest("json")
18625 if res != nil && res.StatusCode == http.StatusNotModified {
18626 if res.Body != nil {
18627 res.Body.Close()
18628 }
18629 return nil, gensupport.WrapError(&googleapi.Error{
18630 Code: res.StatusCode,
18631 Header: res.Header,
18632 })
18633 }
18634 if err != nil {
18635 return nil, err
18636 }
18637 defer googleapi.CloseBody(res)
18638 if err := googleapi.CheckResponse(res); err != nil {
18639 return nil, gensupport.WrapError(err)
18640 }
18641 ret := &Campaign{
18642 ServerResponse: googleapi.ServerResponse{
18643 Header: res.Header,
18644 HTTPStatusCode: res.StatusCode,
18645 },
18646 }
18647 target := &ret
18648 if err := gensupport.DecodeResponse(target, res); err != nil {
18649 return nil, err
18650 }
18651 return ret, nil
18652 }
18653
18654 type CampaignsUpdateCall struct {
18655 s *Service
18656 profileId int64
18657 campaign *Campaign
18658 urlParams_ gensupport.URLParams
18659 ctx_ context.Context
18660 header_ http.Header
18661 }
18662
18663
18664
18665
18666 func (r *CampaignsService) Update(profileId int64, campaign *Campaign) *CampaignsUpdateCall {
18667 c := &CampaignsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18668 c.profileId = profileId
18669 c.campaign = campaign
18670 return c
18671 }
18672
18673
18674
18675
18676 func (c *CampaignsUpdateCall) Fields(s ...googleapi.Field) *CampaignsUpdateCall {
18677 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18678 return c
18679 }
18680
18681
18682 func (c *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
18683 c.ctx_ = ctx
18684 return c
18685 }
18686
18687
18688
18689 func (c *CampaignsUpdateCall) Header() http.Header {
18690 if c.header_ == nil {
18691 c.header_ = make(http.Header)
18692 }
18693 return c.header_
18694 }
18695
18696 func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
18697 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
18698 var body io.Reader = nil
18699 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
18700 if err != nil {
18701 return nil, err
18702 }
18703 c.urlParams_.Set("alt", alt)
18704 c.urlParams_.Set("prettyPrint", "false")
18705 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/campaigns")
18706 urls += "?" + c.urlParams_.Encode()
18707 req, err := http.NewRequest("PUT", urls, body)
18708 if err != nil {
18709 return nil, err
18710 }
18711 req.Header = reqHeaders
18712 googleapi.Expand(req.URL, map[string]string{
18713 "profileId": strconv.FormatInt(c.profileId, 10),
18714 })
18715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18716 }
18717
18718
18719
18720
18721
18722
18723 func (c *CampaignsUpdateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) {
18724 gensupport.SetOptions(c.urlParams_, opts...)
18725 res, err := c.doRequest("json")
18726 if res != nil && res.StatusCode == http.StatusNotModified {
18727 if res.Body != nil {
18728 res.Body.Close()
18729 }
18730 return nil, gensupport.WrapError(&googleapi.Error{
18731 Code: res.StatusCode,
18732 Header: res.Header,
18733 })
18734 }
18735 if err != nil {
18736 return nil, err
18737 }
18738 defer googleapi.CloseBody(res)
18739 if err := googleapi.CheckResponse(res); err != nil {
18740 return nil, gensupport.WrapError(err)
18741 }
18742 ret := &Campaign{
18743 ServerResponse: googleapi.ServerResponse{
18744 Header: res.Header,
18745 HTTPStatusCode: res.StatusCode,
18746 },
18747 }
18748 target := &ret
18749 if err := gensupport.DecodeResponse(target, res); err != nil {
18750 return nil, err
18751 }
18752 return ret, nil
18753 }
18754
18755 type ChangeLogsGetCall struct {
18756 s *Service
18757 profileId int64
18758 id int64
18759 urlParams_ gensupport.URLParams
18760 ifNoneMatch_ string
18761 ctx_ context.Context
18762 header_ http.Header
18763 }
18764
18765
18766
18767
18768
18769 func (r *ChangeLogsService) Get(profileId int64, id int64) *ChangeLogsGetCall {
18770 c := &ChangeLogsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18771 c.profileId = profileId
18772 c.id = id
18773 return c
18774 }
18775
18776
18777
18778
18779 func (c *ChangeLogsGetCall) Fields(s ...googleapi.Field) *ChangeLogsGetCall {
18780 c.urlParams_.Set("fields", googleapi.CombineFields(s))
18781 return c
18782 }
18783
18784
18785
18786
18787 func (c *ChangeLogsGetCall) IfNoneMatch(entityTag string) *ChangeLogsGetCall {
18788 c.ifNoneMatch_ = entityTag
18789 return c
18790 }
18791
18792
18793 func (c *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
18794 c.ctx_ = ctx
18795 return c
18796 }
18797
18798
18799
18800 func (c *ChangeLogsGetCall) Header() http.Header {
18801 if c.header_ == nil {
18802 c.header_ = make(http.Header)
18803 }
18804 return c.header_
18805 }
18806
18807 func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
18808 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
18809 if c.ifNoneMatch_ != "" {
18810 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18811 }
18812 var body io.Reader = nil
18813 c.urlParams_.Set("alt", alt)
18814 c.urlParams_.Set("prettyPrint", "false")
18815 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/changeLogs/{+id}")
18816 urls += "?" + c.urlParams_.Encode()
18817 req, err := http.NewRequest("GET", urls, body)
18818 if err != nil {
18819 return nil, err
18820 }
18821 req.Header = reqHeaders
18822 googleapi.Expand(req.URL, map[string]string{
18823 "profileId": strconv.FormatInt(c.profileId, 10),
18824 "id": strconv.FormatInt(c.id, 10),
18825 })
18826 return gensupport.SendRequest(c.ctx_, c.s.client, req)
18827 }
18828
18829
18830
18831
18832
18833
18834 func (c *ChangeLogsGetCall) Do(opts ...googleapi.CallOption) (*ChangeLog, error) {
18835 gensupport.SetOptions(c.urlParams_, opts...)
18836 res, err := c.doRequest("json")
18837 if res != nil && res.StatusCode == http.StatusNotModified {
18838 if res.Body != nil {
18839 res.Body.Close()
18840 }
18841 return nil, gensupport.WrapError(&googleapi.Error{
18842 Code: res.StatusCode,
18843 Header: res.Header,
18844 })
18845 }
18846 if err != nil {
18847 return nil, err
18848 }
18849 defer googleapi.CloseBody(res)
18850 if err := googleapi.CheckResponse(res); err != nil {
18851 return nil, gensupport.WrapError(err)
18852 }
18853 ret := &ChangeLog{
18854 ServerResponse: googleapi.ServerResponse{
18855 Header: res.Header,
18856 HTTPStatusCode: res.StatusCode,
18857 },
18858 }
18859 target := &ret
18860 if err := gensupport.DecodeResponse(target, res); err != nil {
18861 return nil, err
18862 }
18863 return ret, nil
18864 }
18865
18866 type ChangeLogsListCall struct {
18867 s *Service
18868 profileId int64
18869 urlParams_ gensupport.URLParams
18870 ifNoneMatch_ string
18871 ctx_ context.Context
18872 header_ http.Header
18873 }
18874
18875
18876
18877
18878 func (r *ChangeLogsService) List(profileId int64) *ChangeLogsListCall {
18879 c := &ChangeLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18880 c.profileId = profileId
18881 return c
18882 }
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906 func (c *ChangeLogsListCall) Action(action string) *ChangeLogsListCall {
18907 c.urlParams_.Set("action", action)
18908 return c
18909 }
18910
18911
18912
18913 func (c *ChangeLogsListCall) Ids(ids ...int64) *ChangeLogsListCall {
18914 var ids_ []string
18915 for _, v := range ids {
18916 ids_ = append(ids_, fmt.Sprint(v))
18917 }
18918 c.urlParams_.SetMulti("ids", ids_)
18919 return c
18920 }
18921
18922
18923
18924
18925
18926
18927
18928
18929 func (c *ChangeLogsListCall) MaxChangeTime(maxChangeTime string) *ChangeLogsListCall {
18930 c.urlParams_.Set("maxChangeTime", maxChangeTime)
18931 return c
18932 }
18933
18934
18935
18936 func (c *ChangeLogsListCall) MaxResults(maxResults int64) *ChangeLogsListCall {
18937 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18938 return c
18939 }
18940
18941
18942
18943
18944
18945
18946
18947
18948 func (c *ChangeLogsListCall) MinChangeTime(minChangeTime string) *ChangeLogsListCall {
18949 c.urlParams_.Set("minChangeTime", minChangeTime)
18950 return c
18951 }
18952
18953
18954
18955 func (c *ChangeLogsListCall) ObjectIds(objectIds ...int64) *ChangeLogsListCall {
18956 var objectIds_ []string
18957 for _, v := range objectIds {
18958 objectIds_ = append(objectIds_, fmt.Sprint(v))
18959 }
18960 c.urlParams_.SetMulti("objectIds", objectIds_)
18961 return c
18962 }
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012 func (c *ChangeLogsListCall) ObjectType(objectType string) *ChangeLogsListCall {
19013 c.urlParams_.Set("objectType", objectType)
19014 return c
19015 }
19016
19017
19018
19019 func (c *ChangeLogsListCall) PageToken(pageToken string) *ChangeLogsListCall {
19020 c.urlParams_.Set("pageToken", pageToken)
19021 return c
19022 }
19023
19024
19025
19026 func (c *ChangeLogsListCall) SearchString(searchString string) *ChangeLogsListCall {
19027 c.urlParams_.Set("searchString", searchString)
19028 return c
19029 }
19030
19031
19032
19033 func (c *ChangeLogsListCall) UserProfileIds(userProfileIds ...int64) *ChangeLogsListCall {
19034 var userProfileIds_ []string
19035 for _, v := range userProfileIds {
19036 userProfileIds_ = append(userProfileIds_, fmt.Sprint(v))
19037 }
19038 c.urlParams_.SetMulti("userProfileIds", userProfileIds_)
19039 return c
19040 }
19041
19042
19043
19044
19045 func (c *ChangeLogsListCall) Fields(s ...googleapi.Field) *ChangeLogsListCall {
19046 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19047 return c
19048 }
19049
19050
19051
19052
19053 func (c *ChangeLogsListCall) IfNoneMatch(entityTag string) *ChangeLogsListCall {
19054 c.ifNoneMatch_ = entityTag
19055 return c
19056 }
19057
19058
19059 func (c *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
19060 c.ctx_ = ctx
19061 return c
19062 }
19063
19064
19065
19066 func (c *ChangeLogsListCall) Header() http.Header {
19067 if c.header_ == nil {
19068 c.header_ = make(http.Header)
19069 }
19070 return c.header_
19071 }
19072
19073 func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
19074 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19075 if c.ifNoneMatch_ != "" {
19076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19077 }
19078 var body io.Reader = nil
19079 c.urlParams_.Set("alt", alt)
19080 c.urlParams_.Set("prettyPrint", "false")
19081 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/changeLogs")
19082 urls += "?" + c.urlParams_.Encode()
19083 req, err := http.NewRequest("GET", urls, body)
19084 if err != nil {
19085 return nil, err
19086 }
19087 req.Header = reqHeaders
19088 googleapi.Expand(req.URL, map[string]string{
19089 "profileId": strconv.FormatInt(c.profileId, 10),
19090 })
19091 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19092 }
19093
19094
19095
19096
19097
19098
19099
19100 func (c *ChangeLogsListCall) Do(opts ...googleapi.CallOption) (*ChangeLogsListResponse, error) {
19101 gensupport.SetOptions(c.urlParams_, opts...)
19102 res, err := c.doRequest("json")
19103 if res != nil && res.StatusCode == http.StatusNotModified {
19104 if res.Body != nil {
19105 res.Body.Close()
19106 }
19107 return nil, gensupport.WrapError(&googleapi.Error{
19108 Code: res.StatusCode,
19109 Header: res.Header,
19110 })
19111 }
19112 if err != nil {
19113 return nil, err
19114 }
19115 defer googleapi.CloseBody(res)
19116 if err := googleapi.CheckResponse(res); err != nil {
19117 return nil, gensupport.WrapError(err)
19118 }
19119 ret := &ChangeLogsListResponse{
19120 ServerResponse: googleapi.ServerResponse{
19121 Header: res.Header,
19122 HTTPStatusCode: res.StatusCode,
19123 },
19124 }
19125 target := &ret
19126 if err := gensupport.DecodeResponse(target, res); err != nil {
19127 return nil, err
19128 }
19129 return ret, nil
19130 }
19131
19132
19133
19134
19135 func (c *ChangeLogsListCall) Pages(ctx context.Context, f func(*ChangeLogsListResponse) error) error {
19136 c.ctx_ = ctx
19137 defer c.PageToken(c.urlParams_.Get("pageToken"))
19138 for {
19139 x, err := c.Do()
19140 if err != nil {
19141 return err
19142 }
19143 if err := f(x); err != nil {
19144 return err
19145 }
19146 if x.NextPageToken == "" {
19147 return nil
19148 }
19149 c.PageToken(x.NextPageToken)
19150 }
19151 }
19152
19153 type CitiesListCall struct {
19154 s *Service
19155 profileId int64
19156 urlParams_ gensupport.URLParams
19157 ifNoneMatch_ string
19158 ctx_ context.Context
19159 header_ http.Header
19160 }
19161
19162
19163
19164
19165 func (r *CitiesService) List(profileId int64) *CitiesListCall {
19166 c := &CitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19167 c.profileId = profileId
19168 return c
19169 }
19170
19171
19172
19173 func (c *CitiesListCall) CountryDartIds(countryDartIds ...int64) *CitiesListCall {
19174 var countryDartIds_ []string
19175 for _, v := range countryDartIds {
19176 countryDartIds_ = append(countryDartIds_, fmt.Sprint(v))
19177 }
19178 c.urlParams_.SetMulti("countryDartIds", countryDartIds_)
19179 return c
19180 }
19181
19182
19183
19184 func (c *CitiesListCall) DartIds(dartIds ...int64) *CitiesListCall {
19185 var dartIds_ []string
19186 for _, v := range dartIds {
19187 dartIds_ = append(dartIds_, fmt.Sprint(v))
19188 }
19189 c.urlParams_.SetMulti("dartIds", dartIds_)
19190 return c
19191 }
19192
19193
19194
19195 func (c *CitiesListCall) NamePrefix(namePrefix string) *CitiesListCall {
19196 c.urlParams_.Set("namePrefix", namePrefix)
19197 return c
19198 }
19199
19200
19201
19202 func (c *CitiesListCall) RegionDartIds(regionDartIds ...int64) *CitiesListCall {
19203 var regionDartIds_ []string
19204 for _, v := range regionDartIds {
19205 regionDartIds_ = append(regionDartIds_, fmt.Sprint(v))
19206 }
19207 c.urlParams_.SetMulti("regionDartIds", regionDartIds_)
19208 return c
19209 }
19210
19211
19212
19213
19214 func (c *CitiesListCall) Fields(s ...googleapi.Field) *CitiesListCall {
19215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19216 return c
19217 }
19218
19219
19220
19221
19222 func (c *CitiesListCall) IfNoneMatch(entityTag string) *CitiesListCall {
19223 c.ifNoneMatch_ = entityTag
19224 return c
19225 }
19226
19227
19228 func (c *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
19229 c.ctx_ = ctx
19230 return c
19231 }
19232
19233
19234
19235 func (c *CitiesListCall) Header() http.Header {
19236 if c.header_ == nil {
19237 c.header_ = make(http.Header)
19238 }
19239 return c.header_
19240 }
19241
19242 func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
19243 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19244 if c.ifNoneMatch_ != "" {
19245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19246 }
19247 var body io.Reader = nil
19248 c.urlParams_.Set("alt", alt)
19249 c.urlParams_.Set("prettyPrint", "false")
19250 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/cities")
19251 urls += "?" + c.urlParams_.Encode()
19252 req, err := http.NewRequest("GET", urls, body)
19253 if err != nil {
19254 return nil, err
19255 }
19256 req.Header = reqHeaders
19257 googleapi.Expand(req.URL, map[string]string{
19258 "profileId": strconv.FormatInt(c.profileId, 10),
19259 })
19260 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19261 }
19262
19263
19264
19265
19266
19267
19268
19269 func (c *CitiesListCall) Do(opts ...googleapi.CallOption) (*CitiesListResponse, error) {
19270 gensupport.SetOptions(c.urlParams_, opts...)
19271 res, err := c.doRequest("json")
19272 if res != nil && res.StatusCode == http.StatusNotModified {
19273 if res.Body != nil {
19274 res.Body.Close()
19275 }
19276 return nil, gensupport.WrapError(&googleapi.Error{
19277 Code: res.StatusCode,
19278 Header: res.Header,
19279 })
19280 }
19281 if err != nil {
19282 return nil, err
19283 }
19284 defer googleapi.CloseBody(res)
19285 if err := googleapi.CheckResponse(res); err != nil {
19286 return nil, gensupport.WrapError(err)
19287 }
19288 ret := &CitiesListResponse{
19289 ServerResponse: googleapi.ServerResponse{
19290 Header: res.Header,
19291 HTTPStatusCode: res.StatusCode,
19292 },
19293 }
19294 target := &ret
19295 if err := gensupport.DecodeResponse(target, res); err != nil {
19296 return nil, err
19297 }
19298 return ret, nil
19299 }
19300
19301 type ConnectionTypesGetCall struct {
19302 s *Service
19303 profileId int64
19304 id int64
19305 urlParams_ gensupport.URLParams
19306 ifNoneMatch_ string
19307 ctx_ context.Context
19308 header_ http.Header
19309 }
19310
19311
19312
19313
19314
19315 func (r *ConnectionTypesService) Get(profileId int64, id int64) *ConnectionTypesGetCall {
19316 c := &ConnectionTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19317 c.profileId = profileId
19318 c.id = id
19319 return c
19320 }
19321
19322
19323
19324
19325 func (c *ConnectionTypesGetCall) Fields(s ...googleapi.Field) *ConnectionTypesGetCall {
19326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19327 return c
19328 }
19329
19330
19331
19332
19333 func (c *ConnectionTypesGetCall) IfNoneMatch(entityTag string) *ConnectionTypesGetCall {
19334 c.ifNoneMatch_ = entityTag
19335 return c
19336 }
19337
19338
19339 func (c *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
19340 c.ctx_ = ctx
19341 return c
19342 }
19343
19344
19345
19346 func (c *ConnectionTypesGetCall) Header() http.Header {
19347 if c.header_ == nil {
19348 c.header_ = make(http.Header)
19349 }
19350 return c.header_
19351 }
19352
19353 func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
19354 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19355 if c.ifNoneMatch_ != "" {
19356 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19357 }
19358 var body io.Reader = nil
19359 c.urlParams_.Set("alt", alt)
19360 c.urlParams_.Set("prettyPrint", "false")
19361 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/connectionTypes/{+id}")
19362 urls += "?" + c.urlParams_.Encode()
19363 req, err := http.NewRequest("GET", urls, body)
19364 if err != nil {
19365 return nil, err
19366 }
19367 req.Header = reqHeaders
19368 googleapi.Expand(req.URL, map[string]string{
19369 "profileId": strconv.FormatInt(c.profileId, 10),
19370 "id": strconv.FormatInt(c.id, 10),
19371 })
19372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19373 }
19374
19375
19376
19377
19378
19379
19380 func (c *ConnectionTypesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionType, error) {
19381 gensupport.SetOptions(c.urlParams_, opts...)
19382 res, err := c.doRequest("json")
19383 if res != nil && res.StatusCode == http.StatusNotModified {
19384 if res.Body != nil {
19385 res.Body.Close()
19386 }
19387 return nil, gensupport.WrapError(&googleapi.Error{
19388 Code: res.StatusCode,
19389 Header: res.Header,
19390 })
19391 }
19392 if err != nil {
19393 return nil, err
19394 }
19395 defer googleapi.CloseBody(res)
19396 if err := googleapi.CheckResponse(res); err != nil {
19397 return nil, gensupport.WrapError(err)
19398 }
19399 ret := &ConnectionType{
19400 ServerResponse: googleapi.ServerResponse{
19401 Header: res.Header,
19402 HTTPStatusCode: res.StatusCode,
19403 },
19404 }
19405 target := &ret
19406 if err := gensupport.DecodeResponse(target, res); err != nil {
19407 return nil, err
19408 }
19409 return ret, nil
19410 }
19411
19412 type ConnectionTypesListCall struct {
19413 s *Service
19414 profileId int64
19415 urlParams_ gensupport.URLParams
19416 ifNoneMatch_ string
19417 ctx_ context.Context
19418 header_ http.Header
19419 }
19420
19421
19422
19423
19424 func (r *ConnectionTypesService) List(profileId int64) *ConnectionTypesListCall {
19425 c := &ConnectionTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19426 c.profileId = profileId
19427 return c
19428 }
19429
19430
19431
19432
19433 func (c *ConnectionTypesListCall) Fields(s ...googleapi.Field) *ConnectionTypesListCall {
19434 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19435 return c
19436 }
19437
19438
19439
19440
19441 func (c *ConnectionTypesListCall) IfNoneMatch(entityTag string) *ConnectionTypesListCall {
19442 c.ifNoneMatch_ = entityTag
19443 return c
19444 }
19445
19446
19447 func (c *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
19448 c.ctx_ = ctx
19449 return c
19450 }
19451
19452
19453
19454 func (c *ConnectionTypesListCall) Header() http.Header {
19455 if c.header_ == nil {
19456 c.header_ = make(http.Header)
19457 }
19458 return c.header_
19459 }
19460
19461 func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
19462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19463 if c.ifNoneMatch_ != "" {
19464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19465 }
19466 var body io.Reader = nil
19467 c.urlParams_.Set("alt", alt)
19468 c.urlParams_.Set("prettyPrint", "false")
19469 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/connectionTypes")
19470 urls += "?" + c.urlParams_.Encode()
19471 req, err := http.NewRequest("GET", urls, body)
19472 if err != nil {
19473 return nil, err
19474 }
19475 req.Header = reqHeaders
19476 googleapi.Expand(req.URL, map[string]string{
19477 "profileId": strconv.FormatInt(c.profileId, 10),
19478 })
19479 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19480 }
19481
19482
19483
19484
19485
19486
19487
19488 func (c *ConnectionTypesListCall) Do(opts ...googleapi.CallOption) (*ConnectionTypesListResponse, error) {
19489 gensupport.SetOptions(c.urlParams_, opts...)
19490 res, err := c.doRequest("json")
19491 if res != nil && res.StatusCode == http.StatusNotModified {
19492 if res.Body != nil {
19493 res.Body.Close()
19494 }
19495 return nil, gensupport.WrapError(&googleapi.Error{
19496 Code: res.StatusCode,
19497 Header: res.Header,
19498 })
19499 }
19500 if err != nil {
19501 return nil, err
19502 }
19503 defer googleapi.CloseBody(res)
19504 if err := googleapi.CheckResponse(res); err != nil {
19505 return nil, gensupport.WrapError(err)
19506 }
19507 ret := &ConnectionTypesListResponse{
19508 ServerResponse: googleapi.ServerResponse{
19509 Header: res.Header,
19510 HTTPStatusCode: res.StatusCode,
19511 },
19512 }
19513 target := &ret
19514 if err := gensupport.DecodeResponse(target, res); err != nil {
19515 return nil, err
19516 }
19517 return ret, nil
19518 }
19519
19520 type ContentCategoriesDeleteCall struct {
19521 s *Service
19522 profileId int64
19523 id int64
19524 urlParams_ gensupport.URLParams
19525 ctx_ context.Context
19526 header_ http.Header
19527 }
19528
19529
19530
19531
19532
19533 func (r *ContentCategoriesService) Delete(profileId int64, id int64) *ContentCategoriesDeleteCall {
19534 c := &ContentCategoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19535 c.profileId = profileId
19536 c.id = id
19537 return c
19538 }
19539
19540
19541
19542
19543 func (c *ContentCategoriesDeleteCall) Fields(s ...googleapi.Field) *ContentCategoriesDeleteCall {
19544 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19545 return c
19546 }
19547
19548
19549 func (c *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
19550 c.ctx_ = ctx
19551 return c
19552 }
19553
19554
19555
19556 func (c *ContentCategoriesDeleteCall) Header() http.Header {
19557 if c.header_ == nil {
19558 c.header_ = make(http.Header)
19559 }
19560 return c.header_
19561 }
19562
19563 func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
19564 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19565 var body io.Reader = nil
19566 c.urlParams_.Set("alt", alt)
19567 c.urlParams_.Set("prettyPrint", "false")
19568 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories/{+id}")
19569 urls += "?" + c.urlParams_.Encode()
19570 req, err := http.NewRequest("DELETE", urls, body)
19571 if err != nil {
19572 return nil, err
19573 }
19574 req.Header = reqHeaders
19575 googleapi.Expand(req.URL, map[string]string{
19576 "profileId": strconv.FormatInt(c.profileId, 10),
19577 "id": strconv.FormatInt(c.id, 10),
19578 })
19579 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19580 }
19581
19582
19583 func (c *ContentCategoriesDeleteCall) Do(opts ...googleapi.CallOption) error {
19584 gensupport.SetOptions(c.urlParams_, opts...)
19585 res, err := c.doRequest("json")
19586 if err != nil {
19587 return err
19588 }
19589 defer googleapi.CloseBody(res)
19590 if err := googleapi.CheckResponse(res); err != nil {
19591 return gensupport.WrapError(err)
19592 }
19593 return nil
19594 }
19595
19596 type ContentCategoriesGetCall struct {
19597 s *Service
19598 profileId int64
19599 id int64
19600 urlParams_ gensupport.URLParams
19601 ifNoneMatch_ string
19602 ctx_ context.Context
19603 header_ http.Header
19604 }
19605
19606
19607
19608
19609
19610 func (r *ContentCategoriesService) Get(profileId int64, id int64) *ContentCategoriesGetCall {
19611 c := &ContentCategoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19612 c.profileId = profileId
19613 c.id = id
19614 return c
19615 }
19616
19617
19618
19619
19620 func (c *ContentCategoriesGetCall) Fields(s ...googleapi.Field) *ContentCategoriesGetCall {
19621 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19622 return c
19623 }
19624
19625
19626
19627
19628 func (c *ContentCategoriesGetCall) IfNoneMatch(entityTag string) *ContentCategoriesGetCall {
19629 c.ifNoneMatch_ = entityTag
19630 return c
19631 }
19632
19633
19634 func (c *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
19635 c.ctx_ = ctx
19636 return c
19637 }
19638
19639
19640
19641 func (c *ContentCategoriesGetCall) Header() http.Header {
19642 if c.header_ == nil {
19643 c.header_ = make(http.Header)
19644 }
19645 return c.header_
19646 }
19647
19648 func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
19649 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19650 if c.ifNoneMatch_ != "" {
19651 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19652 }
19653 var body io.Reader = nil
19654 c.urlParams_.Set("alt", alt)
19655 c.urlParams_.Set("prettyPrint", "false")
19656 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories/{+id}")
19657 urls += "?" + c.urlParams_.Encode()
19658 req, err := http.NewRequest("GET", urls, body)
19659 if err != nil {
19660 return nil, err
19661 }
19662 req.Header = reqHeaders
19663 googleapi.Expand(req.URL, map[string]string{
19664 "profileId": strconv.FormatInt(c.profileId, 10),
19665 "id": strconv.FormatInt(c.id, 10),
19666 })
19667 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19668 }
19669
19670
19671
19672
19673
19674
19675
19676 func (c *ContentCategoriesGetCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
19677 gensupport.SetOptions(c.urlParams_, opts...)
19678 res, err := c.doRequest("json")
19679 if res != nil && res.StatusCode == http.StatusNotModified {
19680 if res.Body != nil {
19681 res.Body.Close()
19682 }
19683 return nil, gensupport.WrapError(&googleapi.Error{
19684 Code: res.StatusCode,
19685 Header: res.Header,
19686 })
19687 }
19688 if err != nil {
19689 return nil, err
19690 }
19691 defer googleapi.CloseBody(res)
19692 if err := googleapi.CheckResponse(res); err != nil {
19693 return nil, gensupport.WrapError(err)
19694 }
19695 ret := &ContentCategory{
19696 ServerResponse: googleapi.ServerResponse{
19697 Header: res.Header,
19698 HTTPStatusCode: res.StatusCode,
19699 },
19700 }
19701 target := &ret
19702 if err := gensupport.DecodeResponse(target, res); err != nil {
19703 return nil, err
19704 }
19705 return ret, nil
19706 }
19707
19708 type ContentCategoriesInsertCall struct {
19709 s *Service
19710 profileId int64
19711 contentcategory *ContentCategory
19712 urlParams_ gensupport.URLParams
19713 ctx_ context.Context
19714 header_ http.Header
19715 }
19716
19717
19718
19719
19720 func (r *ContentCategoriesService) Insert(profileId int64, contentcategory *ContentCategory) *ContentCategoriesInsertCall {
19721 c := &ContentCategoriesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19722 c.profileId = profileId
19723 c.contentcategory = contentcategory
19724 return c
19725 }
19726
19727
19728
19729
19730 func (c *ContentCategoriesInsertCall) Fields(s ...googleapi.Field) *ContentCategoriesInsertCall {
19731 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19732 return c
19733 }
19734
19735
19736 func (c *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
19737 c.ctx_ = ctx
19738 return c
19739 }
19740
19741
19742
19743 func (c *ContentCategoriesInsertCall) Header() http.Header {
19744 if c.header_ == nil {
19745 c.header_ = make(http.Header)
19746 }
19747 return c.header_
19748 }
19749
19750 func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
19751 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
19752 var body io.Reader = nil
19753 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
19754 if err != nil {
19755 return nil, err
19756 }
19757 c.urlParams_.Set("alt", alt)
19758 c.urlParams_.Set("prettyPrint", "false")
19759 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories")
19760 urls += "?" + c.urlParams_.Encode()
19761 req, err := http.NewRequest("POST", urls, body)
19762 if err != nil {
19763 return nil, err
19764 }
19765 req.Header = reqHeaders
19766 googleapi.Expand(req.URL, map[string]string{
19767 "profileId": strconv.FormatInt(c.profileId, 10),
19768 })
19769 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19770 }
19771
19772
19773
19774
19775
19776
19777
19778 func (c *ContentCategoriesInsertCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
19779 gensupport.SetOptions(c.urlParams_, opts...)
19780 res, err := c.doRequest("json")
19781 if res != nil && res.StatusCode == http.StatusNotModified {
19782 if res.Body != nil {
19783 res.Body.Close()
19784 }
19785 return nil, gensupport.WrapError(&googleapi.Error{
19786 Code: res.StatusCode,
19787 Header: res.Header,
19788 })
19789 }
19790 if err != nil {
19791 return nil, err
19792 }
19793 defer googleapi.CloseBody(res)
19794 if err := googleapi.CheckResponse(res); err != nil {
19795 return nil, gensupport.WrapError(err)
19796 }
19797 ret := &ContentCategory{
19798 ServerResponse: googleapi.ServerResponse{
19799 Header: res.Header,
19800 HTTPStatusCode: res.StatusCode,
19801 },
19802 }
19803 target := &ret
19804 if err := gensupport.DecodeResponse(target, res); err != nil {
19805 return nil, err
19806 }
19807 return ret, nil
19808 }
19809
19810 type ContentCategoriesListCall struct {
19811 s *Service
19812 profileId int64
19813 urlParams_ gensupport.URLParams
19814 ifNoneMatch_ string
19815 ctx_ context.Context
19816 header_ http.Header
19817 }
19818
19819
19820
19821
19822
19823 func (r *ContentCategoriesService) List(profileId int64) *ContentCategoriesListCall {
19824 c := &ContentCategoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19825 c.profileId = profileId
19826 return c
19827 }
19828
19829
19830
19831 func (c *ContentCategoriesListCall) Ids(ids ...int64) *ContentCategoriesListCall {
19832 var ids_ []string
19833 for _, v := range ids {
19834 ids_ = append(ids_, fmt.Sprint(v))
19835 }
19836 c.urlParams_.SetMulti("ids", ids_)
19837 return c
19838 }
19839
19840
19841
19842 func (c *ContentCategoriesListCall) MaxResults(maxResults int64) *ContentCategoriesListCall {
19843 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19844 return c
19845 }
19846
19847
19848
19849 func (c *ContentCategoriesListCall) PageToken(pageToken string) *ContentCategoriesListCall {
19850 c.urlParams_.Set("pageToken", pageToken)
19851 return c
19852 }
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862 func (c *ContentCategoriesListCall) SearchString(searchString string) *ContentCategoriesListCall {
19863 c.urlParams_.Set("searchString", searchString)
19864 return c
19865 }
19866
19867
19868
19869
19870
19871
19872
19873
19874 func (c *ContentCategoriesListCall) SortField(sortField string) *ContentCategoriesListCall {
19875 c.urlParams_.Set("sortField", sortField)
19876 return c
19877 }
19878
19879
19880
19881
19882
19883
19884
19885 func (c *ContentCategoriesListCall) SortOrder(sortOrder string) *ContentCategoriesListCall {
19886 c.urlParams_.Set("sortOrder", sortOrder)
19887 return c
19888 }
19889
19890
19891
19892
19893 func (c *ContentCategoriesListCall) Fields(s ...googleapi.Field) *ContentCategoriesListCall {
19894 c.urlParams_.Set("fields", googleapi.CombineFields(s))
19895 return c
19896 }
19897
19898
19899
19900
19901 func (c *ContentCategoriesListCall) IfNoneMatch(entityTag string) *ContentCategoriesListCall {
19902 c.ifNoneMatch_ = entityTag
19903 return c
19904 }
19905
19906
19907 func (c *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
19908 c.ctx_ = ctx
19909 return c
19910 }
19911
19912
19913
19914 func (c *ContentCategoriesListCall) Header() http.Header {
19915 if c.header_ == nil {
19916 c.header_ = make(http.Header)
19917 }
19918 return c.header_
19919 }
19920
19921 func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
19922 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
19923 if c.ifNoneMatch_ != "" {
19924 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19925 }
19926 var body io.Reader = nil
19927 c.urlParams_.Set("alt", alt)
19928 c.urlParams_.Set("prettyPrint", "false")
19929 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories")
19930 urls += "?" + c.urlParams_.Encode()
19931 req, err := http.NewRequest("GET", urls, body)
19932 if err != nil {
19933 return nil, err
19934 }
19935 req.Header = reqHeaders
19936 googleapi.Expand(req.URL, map[string]string{
19937 "profileId": strconv.FormatInt(c.profileId, 10),
19938 })
19939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
19940 }
19941
19942
19943
19944
19945
19946
19947
19948 func (c *ContentCategoriesListCall) Do(opts ...googleapi.CallOption) (*ContentCategoriesListResponse, error) {
19949 gensupport.SetOptions(c.urlParams_, opts...)
19950 res, err := c.doRequest("json")
19951 if res != nil && res.StatusCode == http.StatusNotModified {
19952 if res.Body != nil {
19953 res.Body.Close()
19954 }
19955 return nil, gensupport.WrapError(&googleapi.Error{
19956 Code: res.StatusCode,
19957 Header: res.Header,
19958 })
19959 }
19960 if err != nil {
19961 return nil, err
19962 }
19963 defer googleapi.CloseBody(res)
19964 if err := googleapi.CheckResponse(res); err != nil {
19965 return nil, gensupport.WrapError(err)
19966 }
19967 ret := &ContentCategoriesListResponse{
19968 ServerResponse: googleapi.ServerResponse{
19969 Header: res.Header,
19970 HTTPStatusCode: res.StatusCode,
19971 },
19972 }
19973 target := &ret
19974 if err := gensupport.DecodeResponse(target, res); err != nil {
19975 return nil, err
19976 }
19977 return ret, nil
19978 }
19979
19980
19981
19982
19983 func (c *ContentCategoriesListCall) Pages(ctx context.Context, f func(*ContentCategoriesListResponse) error) error {
19984 c.ctx_ = ctx
19985 defer c.PageToken(c.urlParams_.Get("pageToken"))
19986 for {
19987 x, err := c.Do()
19988 if err != nil {
19989 return err
19990 }
19991 if err := f(x); err != nil {
19992 return err
19993 }
19994 if x.NextPageToken == "" {
19995 return nil
19996 }
19997 c.PageToken(x.NextPageToken)
19998 }
19999 }
20000
20001 type ContentCategoriesPatchCall struct {
20002 s *Service
20003 profileId int64
20004 contentcategory *ContentCategory
20005 urlParams_ gensupport.URLParams
20006 ctx_ context.Context
20007 header_ http.Header
20008 }
20009
20010
20011
20012
20013
20014
20015 func (r *ContentCategoriesService) Patch(profileId int64, id int64, contentcategory *ContentCategory) *ContentCategoriesPatchCall {
20016 c := &ContentCategoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20017 c.profileId = profileId
20018 c.urlParams_.Set("id", fmt.Sprint(id))
20019 c.contentcategory = contentcategory
20020 return c
20021 }
20022
20023
20024
20025
20026 func (c *ContentCategoriesPatchCall) Fields(s ...googleapi.Field) *ContentCategoriesPatchCall {
20027 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20028 return c
20029 }
20030
20031
20032 func (c *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
20033 c.ctx_ = ctx
20034 return c
20035 }
20036
20037
20038
20039 func (c *ContentCategoriesPatchCall) Header() http.Header {
20040 if c.header_ == nil {
20041 c.header_ = make(http.Header)
20042 }
20043 return c.header_
20044 }
20045
20046 func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
20047 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20048 var body io.Reader = nil
20049 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
20050 if err != nil {
20051 return nil, err
20052 }
20053 c.urlParams_.Set("alt", alt)
20054 c.urlParams_.Set("prettyPrint", "false")
20055 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories")
20056 urls += "?" + c.urlParams_.Encode()
20057 req, err := http.NewRequest("PATCH", urls, body)
20058 if err != nil {
20059 return nil, err
20060 }
20061 req.Header = reqHeaders
20062 googleapi.Expand(req.URL, map[string]string{
20063 "profileId": strconv.FormatInt(c.profileId, 10),
20064 })
20065 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20066 }
20067
20068
20069
20070
20071
20072
20073
20074 func (c *ContentCategoriesPatchCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
20075 gensupport.SetOptions(c.urlParams_, opts...)
20076 res, err := c.doRequest("json")
20077 if res != nil && res.StatusCode == http.StatusNotModified {
20078 if res.Body != nil {
20079 res.Body.Close()
20080 }
20081 return nil, gensupport.WrapError(&googleapi.Error{
20082 Code: res.StatusCode,
20083 Header: res.Header,
20084 })
20085 }
20086 if err != nil {
20087 return nil, err
20088 }
20089 defer googleapi.CloseBody(res)
20090 if err := googleapi.CheckResponse(res); err != nil {
20091 return nil, gensupport.WrapError(err)
20092 }
20093 ret := &ContentCategory{
20094 ServerResponse: googleapi.ServerResponse{
20095 Header: res.Header,
20096 HTTPStatusCode: res.StatusCode,
20097 },
20098 }
20099 target := &ret
20100 if err := gensupport.DecodeResponse(target, res); err != nil {
20101 return nil, err
20102 }
20103 return ret, nil
20104 }
20105
20106 type ContentCategoriesUpdateCall struct {
20107 s *Service
20108 profileId int64
20109 contentcategory *ContentCategory
20110 urlParams_ gensupport.URLParams
20111 ctx_ context.Context
20112 header_ http.Header
20113 }
20114
20115
20116
20117
20118 func (r *ContentCategoriesService) Update(profileId int64, contentcategory *ContentCategory) *ContentCategoriesUpdateCall {
20119 c := &ContentCategoriesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20120 c.profileId = profileId
20121 c.contentcategory = contentcategory
20122 return c
20123 }
20124
20125
20126
20127
20128 func (c *ContentCategoriesUpdateCall) Fields(s ...googleapi.Field) *ContentCategoriesUpdateCall {
20129 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20130 return c
20131 }
20132
20133
20134 func (c *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
20135 c.ctx_ = ctx
20136 return c
20137 }
20138
20139
20140
20141 func (c *ContentCategoriesUpdateCall) Header() http.Header {
20142 if c.header_ == nil {
20143 c.header_ = make(http.Header)
20144 }
20145 return c.header_
20146 }
20147
20148 func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
20149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20150 var body io.Reader = nil
20151 body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
20152 if err != nil {
20153 return nil, err
20154 }
20155 c.urlParams_.Set("alt", alt)
20156 c.urlParams_.Set("prettyPrint", "false")
20157 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/contentCategories")
20158 urls += "?" + c.urlParams_.Encode()
20159 req, err := http.NewRequest("PUT", urls, body)
20160 if err != nil {
20161 return nil, err
20162 }
20163 req.Header = reqHeaders
20164 googleapi.Expand(req.URL, map[string]string{
20165 "profileId": strconv.FormatInt(c.profileId, 10),
20166 })
20167 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20168 }
20169
20170
20171
20172
20173
20174
20175
20176 func (c *ContentCategoriesUpdateCall) Do(opts ...googleapi.CallOption) (*ContentCategory, error) {
20177 gensupport.SetOptions(c.urlParams_, opts...)
20178 res, err := c.doRequest("json")
20179 if res != nil && res.StatusCode == http.StatusNotModified {
20180 if res.Body != nil {
20181 res.Body.Close()
20182 }
20183 return nil, gensupport.WrapError(&googleapi.Error{
20184 Code: res.StatusCode,
20185 Header: res.Header,
20186 })
20187 }
20188 if err != nil {
20189 return nil, err
20190 }
20191 defer googleapi.CloseBody(res)
20192 if err := googleapi.CheckResponse(res); err != nil {
20193 return nil, gensupport.WrapError(err)
20194 }
20195 ret := &ContentCategory{
20196 ServerResponse: googleapi.ServerResponse{
20197 Header: res.Header,
20198 HTTPStatusCode: res.StatusCode,
20199 },
20200 }
20201 target := &ret
20202 if err := gensupport.DecodeResponse(target, res); err != nil {
20203 return nil, err
20204 }
20205 return ret, nil
20206 }
20207
20208 type ConversionsBatchinsertCall struct {
20209 s *Service
20210 profileId int64
20211 conversionsbatchinsertrequest *ConversionsBatchInsertRequest
20212 urlParams_ gensupport.URLParams
20213 ctx_ context.Context
20214 header_ http.Header
20215 }
20216
20217
20218
20219
20220 func (r *ConversionsService) Batchinsert(profileId int64, conversionsbatchinsertrequest *ConversionsBatchInsertRequest) *ConversionsBatchinsertCall {
20221 c := &ConversionsBatchinsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20222 c.profileId = profileId
20223 c.conversionsbatchinsertrequest = conversionsbatchinsertrequest
20224 return c
20225 }
20226
20227
20228
20229
20230 func (c *ConversionsBatchinsertCall) Fields(s ...googleapi.Field) *ConversionsBatchinsertCall {
20231 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20232 return c
20233 }
20234
20235
20236 func (c *ConversionsBatchinsertCall) Context(ctx context.Context) *ConversionsBatchinsertCall {
20237 c.ctx_ = ctx
20238 return c
20239 }
20240
20241
20242
20243 func (c *ConversionsBatchinsertCall) Header() http.Header {
20244 if c.header_ == nil {
20245 c.header_ = make(http.Header)
20246 }
20247 return c.header_
20248 }
20249
20250 func (c *ConversionsBatchinsertCall) doRequest(alt string) (*http.Response, error) {
20251 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20252 var body io.Reader = nil
20253 body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchinsertrequest)
20254 if err != nil {
20255 return nil, err
20256 }
20257 c.urlParams_.Set("alt", alt)
20258 c.urlParams_.Set("prettyPrint", "false")
20259 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchinsert")
20260 urls += "?" + c.urlParams_.Encode()
20261 req, err := http.NewRequest("POST", urls, body)
20262 if err != nil {
20263 return nil, err
20264 }
20265 req.Header = reqHeaders
20266 googleapi.Expand(req.URL, map[string]string{
20267 "profileId": strconv.FormatInt(c.profileId, 10),
20268 })
20269 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20270 }
20271
20272
20273
20274
20275
20276
20277
20278 func (c *ConversionsBatchinsertCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchInsertResponse, error) {
20279 gensupport.SetOptions(c.urlParams_, opts...)
20280 res, err := c.doRequest("json")
20281 if res != nil && res.StatusCode == http.StatusNotModified {
20282 if res.Body != nil {
20283 res.Body.Close()
20284 }
20285 return nil, gensupport.WrapError(&googleapi.Error{
20286 Code: res.StatusCode,
20287 Header: res.Header,
20288 })
20289 }
20290 if err != nil {
20291 return nil, err
20292 }
20293 defer googleapi.CloseBody(res)
20294 if err := googleapi.CheckResponse(res); err != nil {
20295 return nil, gensupport.WrapError(err)
20296 }
20297 ret := &ConversionsBatchInsertResponse{
20298 ServerResponse: googleapi.ServerResponse{
20299 Header: res.Header,
20300 HTTPStatusCode: res.StatusCode,
20301 },
20302 }
20303 target := &ret
20304 if err := gensupport.DecodeResponse(target, res); err != nil {
20305 return nil, err
20306 }
20307 return ret, nil
20308 }
20309
20310 type ConversionsBatchupdateCall struct {
20311 s *Service
20312 profileId int64
20313 conversionsbatchupdaterequest *ConversionsBatchUpdateRequest
20314 urlParams_ gensupport.URLParams
20315 ctx_ context.Context
20316 header_ http.Header
20317 }
20318
20319
20320
20321
20322 func (r *ConversionsService) Batchupdate(profileId int64, conversionsbatchupdaterequest *ConversionsBatchUpdateRequest) *ConversionsBatchupdateCall {
20323 c := &ConversionsBatchupdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20324 c.profileId = profileId
20325 c.conversionsbatchupdaterequest = conversionsbatchupdaterequest
20326 return c
20327 }
20328
20329
20330
20331
20332 func (c *ConversionsBatchupdateCall) Fields(s ...googleapi.Field) *ConversionsBatchupdateCall {
20333 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20334 return c
20335 }
20336
20337
20338 func (c *ConversionsBatchupdateCall) Context(ctx context.Context) *ConversionsBatchupdateCall {
20339 c.ctx_ = ctx
20340 return c
20341 }
20342
20343
20344
20345 func (c *ConversionsBatchupdateCall) Header() http.Header {
20346 if c.header_ == nil {
20347 c.header_ = make(http.Header)
20348 }
20349 return c.header_
20350 }
20351
20352 func (c *ConversionsBatchupdateCall) doRequest(alt string) (*http.Response, error) {
20353 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20354 var body io.Reader = nil
20355 body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionsbatchupdaterequest)
20356 if err != nil {
20357 return nil, err
20358 }
20359 c.urlParams_.Set("alt", alt)
20360 c.urlParams_.Set("prettyPrint", "false")
20361 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/conversions/batchupdate")
20362 urls += "?" + c.urlParams_.Encode()
20363 req, err := http.NewRequest("POST", urls, body)
20364 if err != nil {
20365 return nil, err
20366 }
20367 req.Header = reqHeaders
20368 googleapi.Expand(req.URL, map[string]string{
20369 "profileId": strconv.FormatInt(c.profileId, 10),
20370 })
20371 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20372 }
20373
20374
20375
20376
20377
20378
20379
20380 func (c *ConversionsBatchupdateCall) Do(opts ...googleapi.CallOption) (*ConversionsBatchUpdateResponse, error) {
20381 gensupport.SetOptions(c.urlParams_, opts...)
20382 res, err := c.doRequest("json")
20383 if res != nil && res.StatusCode == http.StatusNotModified {
20384 if res.Body != nil {
20385 res.Body.Close()
20386 }
20387 return nil, gensupport.WrapError(&googleapi.Error{
20388 Code: res.StatusCode,
20389 Header: res.Header,
20390 })
20391 }
20392 if err != nil {
20393 return nil, err
20394 }
20395 defer googleapi.CloseBody(res)
20396 if err := googleapi.CheckResponse(res); err != nil {
20397 return nil, gensupport.WrapError(err)
20398 }
20399 ret := &ConversionsBatchUpdateResponse{
20400 ServerResponse: googleapi.ServerResponse{
20401 Header: res.Header,
20402 HTTPStatusCode: res.StatusCode,
20403 },
20404 }
20405 target := &ret
20406 if err := gensupport.DecodeResponse(target, res); err != nil {
20407 return nil, err
20408 }
20409 return ret, nil
20410 }
20411
20412 type CountriesGetCall struct {
20413 s *Service
20414 profileId int64
20415 dartId int64
20416 urlParams_ gensupport.URLParams
20417 ifNoneMatch_ string
20418 ctx_ context.Context
20419 header_ http.Header
20420 }
20421
20422
20423
20424
20425
20426 func (r *CountriesService) Get(profileId int64, dartId int64) *CountriesGetCall {
20427 c := &CountriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20428 c.profileId = profileId
20429 c.dartId = dartId
20430 return c
20431 }
20432
20433
20434
20435
20436 func (c *CountriesGetCall) Fields(s ...googleapi.Field) *CountriesGetCall {
20437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20438 return c
20439 }
20440
20441
20442
20443
20444 func (c *CountriesGetCall) IfNoneMatch(entityTag string) *CountriesGetCall {
20445 c.ifNoneMatch_ = entityTag
20446 return c
20447 }
20448
20449
20450 func (c *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
20451 c.ctx_ = ctx
20452 return c
20453 }
20454
20455
20456
20457 func (c *CountriesGetCall) Header() http.Header {
20458 if c.header_ == nil {
20459 c.header_ = make(http.Header)
20460 }
20461 return c.header_
20462 }
20463
20464 func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
20465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20466 if c.ifNoneMatch_ != "" {
20467 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20468 }
20469 var body io.Reader = nil
20470 c.urlParams_.Set("alt", alt)
20471 c.urlParams_.Set("prettyPrint", "false")
20472 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/countries/{+dartId}")
20473 urls += "?" + c.urlParams_.Encode()
20474 req, err := http.NewRequest("GET", urls, body)
20475 if err != nil {
20476 return nil, err
20477 }
20478 req.Header = reqHeaders
20479 googleapi.Expand(req.URL, map[string]string{
20480 "profileId": strconv.FormatInt(c.profileId, 10),
20481 "dartId": strconv.FormatInt(c.dartId, 10),
20482 })
20483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20484 }
20485
20486
20487
20488
20489
20490
20491 func (c *CountriesGetCall) Do(opts ...googleapi.CallOption) (*Country, error) {
20492 gensupport.SetOptions(c.urlParams_, opts...)
20493 res, err := c.doRequest("json")
20494 if res != nil && res.StatusCode == http.StatusNotModified {
20495 if res.Body != nil {
20496 res.Body.Close()
20497 }
20498 return nil, gensupport.WrapError(&googleapi.Error{
20499 Code: res.StatusCode,
20500 Header: res.Header,
20501 })
20502 }
20503 if err != nil {
20504 return nil, err
20505 }
20506 defer googleapi.CloseBody(res)
20507 if err := googleapi.CheckResponse(res); err != nil {
20508 return nil, gensupport.WrapError(err)
20509 }
20510 ret := &Country{
20511 ServerResponse: googleapi.ServerResponse{
20512 Header: res.Header,
20513 HTTPStatusCode: res.StatusCode,
20514 },
20515 }
20516 target := &ret
20517 if err := gensupport.DecodeResponse(target, res); err != nil {
20518 return nil, err
20519 }
20520 return ret, nil
20521 }
20522
20523 type CountriesListCall struct {
20524 s *Service
20525 profileId int64
20526 urlParams_ gensupport.URLParams
20527 ifNoneMatch_ string
20528 ctx_ context.Context
20529 header_ http.Header
20530 }
20531
20532
20533
20534
20535 func (r *CountriesService) List(profileId int64) *CountriesListCall {
20536 c := &CountriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20537 c.profileId = profileId
20538 return c
20539 }
20540
20541
20542
20543
20544 func (c *CountriesListCall) Fields(s ...googleapi.Field) *CountriesListCall {
20545 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20546 return c
20547 }
20548
20549
20550
20551
20552 func (c *CountriesListCall) IfNoneMatch(entityTag string) *CountriesListCall {
20553 c.ifNoneMatch_ = entityTag
20554 return c
20555 }
20556
20557
20558 func (c *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
20559 c.ctx_ = ctx
20560 return c
20561 }
20562
20563
20564
20565 func (c *CountriesListCall) Header() http.Header {
20566 if c.header_ == nil {
20567 c.header_ = make(http.Header)
20568 }
20569 return c.header_
20570 }
20571
20572 func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
20573 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20574 if c.ifNoneMatch_ != "" {
20575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20576 }
20577 var body io.Reader = nil
20578 c.urlParams_.Set("alt", alt)
20579 c.urlParams_.Set("prettyPrint", "false")
20580 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/countries")
20581 urls += "?" + c.urlParams_.Encode()
20582 req, err := http.NewRequest("GET", urls, body)
20583 if err != nil {
20584 return nil, err
20585 }
20586 req.Header = reqHeaders
20587 googleapi.Expand(req.URL, map[string]string{
20588 "profileId": strconv.FormatInt(c.profileId, 10),
20589 })
20590 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20591 }
20592
20593
20594
20595
20596
20597
20598
20599 func (c *CountriesListCall) Do(opts ...googleapi.CallOption) (*CountriesListResponse, error) {
20600 gensupport.SetOptions(c.urlParams_, opts...)
20601 res, err := c.doRequest("json")
20602 if res != nil && res.StatusCode == http.StatusNotModified {
20603 if res.Body != nil {
20604 res.Body.Close()
20605 }
20606 return nil, gensupport.WrapError(&googleapi.Error{
20607 Code: res.StatusCode,
20608 Header: res.Header,
20609 })
20610 }
20611 if err != nil {
20612 return nil, err
20613 }
20614 defer googleapi.CloseBody(res)
20615 if err := googleapi.CheckResponse(res); err != nil {
20616 return nil, gensupport.WrapError(err)
20617 }
20618 ret := &CountriesListResponse{
20619 ServerResponse: googleapi.ServerResponse{
20620 Header: res.Header,
20621 HTTPStatusCode: res.StatusCode,
20622 },
20623 }
20624 target := &ret
20625 if err := gensupport.DecodeResponse(target, res); err != nil {
20626 return nil, err
20627 }
20628 return ret, nil
20629 }
20630
20631 type CreativeAssetsInsertCall struct {
20632 s *Service
20633 profileId int64
20634 advertiserId int64
20635 creativeassetmetadata *CreativeAssetMetadata
20636 urlParams_ gensupport.URLParams
20637 mediaInfo_ *gensupport.MediaInfo
20638 ctx_ context.Context
20639 header_ http.Header
20640 }
20641
20642
20643
20644
20645
20646 func (r *CreativeAssetsService) Insert(profileId int64, advertiserId int64, creativeassetmetadata *CreativeAssetMetadata) *CreativeAssetsInsertCall {
20647 c := &CreativeAssetsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20648 c.profileId = profileId
20649 c.advertiserId = advertiserId
20650 c.creativeassetmetadata = creativeassetmetadata
20651 return c
20652 }
20653
20654
20655
20656
20657
20658
20659
20660
20661 func (c *CreativeAssetsInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *CreativeAssetsInsertCall {
20662 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
20663 return c
20664 }
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675 func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
20676 c.ctx_ = ctx
20677 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
20678 return c
20679 }
20680
20681
20682
20683
20684
20685 func (c *CreativeAssetsInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *CreativeAssetsInsertCall {
20686 c.mediaInfo_.SetProgressUpdater(pu)
20687 return c
20688 }
20689
20690
20691
20692
20693 func (c *CreativeAssetsInsertCall) Fields(s ...googleapi.Field) *CreativeAssetsInsertCall {
20694 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20695 return c
20696 }
20697
20698
20699
20700
20701 func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
20702 c.ctx_ = ctx
20703 return c
20704 }
20705
20706
20707
20708 func (c *CreativeAssetsInsertCall) Header() http.Header {
20709 if c.header_ == nil {
20710 c.header_ = make(http.Header)
20711 }
20712 return c.header_
20713 }
20714
20715 func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
20716 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
20717 var body io.Reader = nil
20718 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
20719 if err != nil {
20720 return nil, err
20721 }
20722 c.urlParams_.Set("alt", alt)
20723 c.urlParams_.Set("prettyPrint", "false")
20724 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeAssets/{+advertiserId}/creativeAssets")
20725 if c.mediaInfo_ != nil {
20726 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/dfareporting/v4/userprofiles/{+profileId}/creativeAssets/{+advertiserId}/creativeAssets")
20727 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
20728 }
20729 if body == nil {
20730 body = new(bytes.Buffer)
20731 reqHeaders.Set("Content-Type", "application/json")
20732 }
20733 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
20734 defer cleanup()
20735 urls += "?" + c.urlParams_.Encode()
20736 req, err := http.NewRequest("POST", urls, body)
20737 if err != nil {
20738 return nil, err
20739 }
20740 req.Header = reqHeaders
20741 req.GetBody = getBody
20742 googleapi.Expand(req.URL, map[string]string{
20743 "profileId": strconv.FormatInt(c.profileId, 10),
20744 "advertiserId": strconv.FormatInt(c.advertiserId, 10),
20745 })
20746 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20747 }
20748
20749
20750
20751
20752
20753
20754
20755 func (c *CreativeAssetsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeAssetMetadata, error) {
20756 gensupport.SetOptions(c.urlParams_, opts...)
20757 res, err := c.doRequest("json")
20758 if res != nil && res.StatusCode == http.StatusNotModified {
20759 if res.Body != nil {
20760 res.Body.Close()
20761 }
20762 return nil, gensupport.WrapError(&googleapi.Error{
20763 Code: res.StatusCode,
20764 Header: res.Header,
20765 })
20766 }
20767 if err != nil {
20768 return nil, err
20769 }
20770 defer googleapi.CloseBody(res)
20771 if err := googleapi.CheckResponse(res); err != nil {
20772 return nil, gensupport.WrapError(err)
20773 }
20774 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
20775 if rx != nil {
20776 rx.Client = c.s.client
20777 rx.UserAgent = c.s.userAgent()
20778 ctx := c.ctx_
20779 if ctx == nil {
20780 ctx = context.TODO()
20781 }
20782 res, err = rx.Upload(ctx)
20783 if err != nil {
20784 return nil, err
20785 }
20786 defer res.Body.Close()
20787 if err := googleapi.CheckResponse(res); err != nil {
20788 return nil, gensupport.WrapError(err)
20789 }
20790 }
20791 ret := &CreativeAssetMetadata{
20792 ServerResponse: googleapi.ServerResponse{
20793 Header: res.Header,
20794 HTTPStatusCode: res.StatusCode,
20795 },
20796 }
20797 target := &ret
20798 if err := gensupport.DecodeResponse(target, res); err != nil {
20799 return nil, err
20800 }
20801 return ret, nil
20802 }
20803
20804 type CreativeFieldValuesDeleteCall struct {
20805 s *Service
20806 profileId int64
20807 creativeFieldId int64
20808 id int64
20809 urlParams_ gensupport.URLParams
20810 ctx_ context.Context
20811 header_ http.Header
20812 }
20813
20814
20815
20816
20817
20818
20819 func (r *CreativeFieldValuesService) Delete(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesDeleteCall {
20820 c := &CreativeFieldValuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20821 c.profileId = profileId
20822 c.creativeFieldId = creativeFieldId
20823 c.id = id
20824 return c
20825 }
20826
20827
20828
20829
20830 func (c *CreativeFieldValuesDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldValuesDeleteCall {
20831 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20832 return c
20833 }
20834
20835
20836 func (c *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
20837 c.ctx_ = ctx
20838 return c
20839 }
20840
20841
20842
20843 func (c *CreativeFieldValuesDeleteCall) Header() http.Header {
20844 if c.header_ == nil {
20845 c.header_ = make(http.Header)
20846 }
20847 return c.header_
20848 }
20849
20850 func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
20851 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20852 var body io.Reader = nil
20853 c.urlParams_.Set("alt", alt)
20854 c.urlParams_.Set("prettyPrint", "false")
20855 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues/{+id}")
20856 urls += "?" + c.urlParams_.Encode()
20857 req, err := http.NewRequest("DELETE", urls, body)
20858 if err != nil {
20859 return nil, err
20860 }
20861 req.Header = reqHeaders
20862 googleapi.Expand(req.URL, map[string]string{
20863 "profileId": strconv.FormatInt(c.profileId, 10),
20864 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
20865 "id": strconv.FormatInt(c.id, 10),
20866 })
20867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20868 }
20869
20870
20871 func (c *CreativeFieldValuesDeleteCall) Do(opts ...googleapi.CallOption) error {
20872 gensupport.SetOptions(c.urlParams_, opts...)
20873 res, err := c.doRequest("json")
20874 if err != nil {
20875 return err
20876 }
20877 defer googleapi.CloseBody(res)
20878 if err := googleapi.CheckResponse(res); err != nil {
20879 return gensupport.WrapError(err)
20880 }
20881 return nil
20882 }
20883
20884 type CreativeFieldValuesGetCall struct {
20885 s *Service
20886 profileId int64
20887 creativeFieldId int64
20888 id int64
20889 urlParams_ gensupport.URLParams
20890 ifNoneMatch_ string
20891 ctx_ context.Context
20892 header_ http.Header
20893 }
20894
20895
20896
20897
20898
20899
20900 func (r *CreativeFieldValuesService) Get(profileId int64, creativeFieldId int64, id int64) *CreativeFieldValuesGetCall {
20901 c := &CreativeFieldValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20902 c.profileId = profileId
20903 c.creativeFieldId = creativeFieldId
20904 c.id = id
20905 return c
20906 }
20907
20908
20909
20910
20911 func (c *CreativeFieldValuesGetCall) Fields(s ...googleapi.Field) *CreativeFieldValuesGetCall {
20912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
20913 return c
20914 }
20915
20916
20917
20918
20919 func (c *CreativeFieldValuesGetCall) IfNoneMatch(entityTag string) *CreativeFieldValuesGetCall {
20920 c.ifNoneMatch_ = entityTag
20921 return c
20922 }
20923
20924
20925 func (c *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
20926 c.ctx_ = ctx
20927 return c
20928 }
20929
20930
20931
20932 func (c *CreativeFieldValuesGetCall) Header() http.Header {
20933 if c.header_ == nil {
20934 c.header_ = make(http.Header)
20935 }
20936 return c.header_
20937 }
20938
20939 func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
20940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
20941 if c.ifNoneMatch_ != "" {
20942 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20943 }
20944 var body io.Reader = nil
20945 c.urlParams_.Set("alt", alt)
20946 c.urlParams_.Set("prettyPrint", "false")
20947 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues/{+id}")
20948 urls += "?" + c.urlParams_.Encode()
20949 req, err := http.NewRequest("GET", urls, body)
20950 if err != nil {
20951 return nil, err
20952 }
20953 req.Header = reqHeaders
20954 googleapi.Expand(req.URL, map[string]string{
20955 "profileId": strconv.FormatInt(c.profileId, 10),
20956 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
20957 "id": strconv.FormatInt(c.id, 10),
20958 })
20959 return gensupport.SendRequest(c.ctx_, c.s.client, req)
20960 }
20961
20962
20963
20964
20965
20966
20967
20968 func (c *CreativeFieldValuesGetCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
20969 gensupport.SetOptions(c.urlParams_, opts...)
20970 res, err := c.doRequest("json")
20971 if res != nil && res.StatusCode == http.StatusNotModified {
20972 if res.Body != nil {
20973 res.Body.Close()
20974 }
20975 return nil, gensupport.WrapError(&googleapi.Error{
20976 Code: res.StatusCode,
20977 Header: res.Header,
20978 })
20979 }
20980 if err != nil {
20981 return nil, err
20982 }
20983 defer googleapi.CloseBody(res)
20984 if err := googleapi.CheckResponse(res); err != nil {
20985 return nil, gensupport.WrapError(err)
20986 }
20987 ret := &CreativeFieldValue{
20988 ServerResponse: googleapi.ServerResponse{
20989 Header: res.Header,
20990 HTTPStatusCode: res.StatusCode,
20991 },
20992 }
20993 target := &ret
20994 if err := gensupport.DecodeResponse(target, res); err != nil {
20995 return nil, err
20996 }
20997 return ret, nil
20998 }
20999
21000 type CreativeFieldValuesInsertCall struct {
21001 s *Service
21002 profileId int64
21003 creativeFieldId int64
21004 creativefieldvalue *CreativeFieldValue
21005 urlParams_ gensupport.URLParams
21006 ctx_ context.Context
21007 header_ http.Header
21008 }
21009
21010
21011
21012
21013
21014 func (r *CreativeFieldValuesService) Insert(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesInsertCall {
21015 c := &CreativeFieldValuesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21016 c.profileId = profileId
21017 c.creativeFieldId = creativeFieldId
21018 c.creativefieldvalue = creativefieldvalue
21019 return c
21020 }
21021
21022
21023
21024
21025 func (c *CreativeFieldValuesInsertCall) Fields(s ...googleapi.Field) *CreativeFieldValuesInsertCall {
21026 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21027 return c
21028 }
21029
21030
21031 func (c *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
21032 c.ctx_ = ctx
21033 return c
21034 }
21035
21036
21037
21038 func (c *CreativeFieldValuesInsertCall) Header() http.Header {
21039 if c.header_ == nil {
21040 c.header_ = make(http.Header)
21041 }
21042 return c.header_
21043 }
21044
21045 func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
21046 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21047 var body io.Reader = nil
21048 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
21049 if err != nil {
21050 return nil, err
21051 }
21052 c.urlParams_.Set("alt", alt)
21053 c.urlParams_.Set("prettyPrint", "false")
21054 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues")
21055 urls += "?" + c.urlParams_.Encode()
21056 req, err := http.NewRequest("POST", urls, body)
21057 if err != nil {
21058 return nil, err
21059 }
21060 req.Header = reqHeaders
21061 googleapi.Expand(req.URL, map[string]string{
21062 "profileId": strconv.FormatInt(c.profileId, 10),
21063 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
21064 })
21065 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21066 }
21067
21068
21069
21070
21071
21072
21073
21074 func (c *CreativeFieldValuesInsertCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
21075 gensupport.SetOptions(c.urlParams_, opts...)
21076 res, err := c.doRequest("json")
21077 if res != nil && res.StatusCode == http.StatusNotModified {
21078 if res.Body != nil {
21079 res.Body.Close()
21080 }
21081 return nil, gensupport.WrapError(&googleapi.Error{
21082 Code: res.StatusCode,
21083 Header: res.Header,
21084 })
21085 }
21086 if err != nil {
21087 return nil, err
21088 }
21089 defer googleapi.CloseBody(res)
21090 if err := googleapi.CheckResponse(res); err != nil {
21091 return nil, gensupport.WrapError(err)
21092 }
21093 ret := &CreativeFieldValue{
21094 ServerResponse: googleapi.ServerResponse{
21095 Header: res.Header,
21096 HTTPStatusCode: res.StatusCode,
21097 },
21098 }
21099 target := &ret
21100 if err := gensupport.DecodeResponse(target, res); err != nil {
21101 return nil, err
21102 }
21103 return ret, nil
21104 }
21105
21106 type CreativeFieldValuesListCall struct {
21107 s *Service
21108 profileId int64
21109 creativeFieldId int64
21110 urlParams_ gensupport.URLParams
21111 ifNoneMatch_ string
21112 ctx_ context.Context
21113 header_ http.Header
21114 }
21115
21116
21117
21118
21119
21120
21121 func (r *CreativeFieldValuesService) List(profileId int64, creativeFieldId int64) *CreativeFieldValuesListCall {
21122 c := &CreativeFieldValuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21123 c.profileId = profileId
21124 c.creativeFieldId = creativeFieldId
21125 return c
21126 }
21127
21128
21129
21130 func (c *CreativeFieldValuesListCall) Ids(ids ...int64) *CreativeFieldValuesListCall {
21131 var ids_ []string
21132 for _, v := range ids {
21133 ids_ = append(ids_, fmt.Sprint(v))
21134 }
21135 c.urlParams_.SetMulti("ids", ids_)
21136 return c
21137 }
21138
21139
21140
21141 func (c *CreativeFieldValuesListCall) MaxResults(maxResults int64) *CreativeFieldValuesListCall {
21142 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21143 return c
21144 }
21145
21146
21147
21148 func (c *CreativeFieldValuesListCall) PageToken(pageToken string) *CreativeFieldValuesListCall {
21149 c.urlParams_.Set("pageToken", pageToken)
21150 return c
21151 }
21152
21153
21154
21155
21156 func (c *CreativeFieldValuesListCall) SearchString(searchString string) *CreativeFieldValuesListCall {
21157 c.urlParams_.Set("searchString", searchString)
21158 return c
21159 }
21160
21161
21162
21163
21164
21165
21166
21167
21168 func (c *CreativeFieldValuesListCall) SortField(sortField string) *CreativeFieldValuesListCall {
21169 c.urlParams_.Set("sortField", sortField)
21170 return c
21171 }
21172
21173
21174
21175
21176
21177
21178
21179 func (c *CreativeFieldValuesListCall) SortOrder(sortOrder string) *CreativeFieldValuesListCall {
21180 c.urlParams_.Set("sortOrder", sortOrder)
21181 return c
21182 }
21183
21184
21185
21186
21187 func (c *CreativeFieldValuesListCall) Fields(s ...googleapi.Field) *CreativeFieldValuesListCall {
21188 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21189 return c
21190 }
21191
21192
21193
21194
21195 func (c *CreativeFieldValuesListCall) IfNoneMatch(entityTag string) *CreativeFieldValuesListCall {
21196 c.ifNoneMatch_ = entityTag
21197 return c
21198 }
21199
21200
21201 func (c *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
21202 c.ctx_ = ctx
21203 return c
21204 }
21205
21206
21207
21208 func (c *CreativeFieldValuesListCall) Header() http.Header {
21209 if c.header_ == nil {
21210 c.header_ = make(http.Header)
21211 }
21212 return c.header_
21213 }
21214
21215 func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
21216 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21217 if c.ifNoneMatch_ != "" {
21218 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21219 }
21220 var body io.Reader = nil
21221 c.urlParams_.Set("alt", alt)
21222 c.urlParams_.Set("prettyPrint", "false")
21223 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues")
21224 urls += "?" + c.urlParams_.Encode()
21225 req, err := http.NewRequest("GET", urls, body)
21226 if err != nil {
21227 return nil, err
21228 }
21229 req.Header = reqHeaders
21230 googleapi.Expand(req.URL, map[string]string{
21231 "profileId": strconv.FormatInt(c.profileId, 10),
21232 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
21233 })
21234 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21235 }
21236
21237
21238
21239
21240
21241
21242
21243 func (c *CreativeFieldValuesListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValuesListResponse, error) {
21244 gensupport.SetOptions(c.urlParams_, opts...)
21245 res, err := c.doRequest("json")
21246 if res != nil && res.StatusCode == http.StatusNotModified {
21247 if res.Body != nil {
21248 res.Body.Close()
21249 }
21250 return nil, gensupport.WrapError(&googleapi.Error{
21251 Code: res.StatusCode,
21252 Header: res.Header,
21253 })
21254 }
21255 if err != nil {
21256 return nil, err
21257 }
21258 defer googleapi.CloseBody(res)
21259 if err := googleapi.CheckResponse(res); err != nil {
21260 return nil, gensupport.WrapError(err)
21261 }
21262 ret := &CreativeFieldValuesListResponse{
21263 ServerResponse: googleapi.ServerResponse{
21264 Header: res.Header,
21265 HTTPStatusCode: res.StatusCode,
21266 },
21267 }
21268 target := &ret
21269 if err := gensupport.DecodeResponse(target, res); err != nil {
21270 return nil, err
21271 }
21272 return ret, nil
21273 }
21274
21275
21276
21277
21278 func (c *CreativeFieldValuesListCall) Pages(ctx context.Context, f func(*CreativeFieldValuesListResponse) error) error {
21279 c.ctx_ = ctx
21280 defer c.PageToken(c.urlParams_.Get("pageToken"))
21281 for {
21282 x, err := c.Do()
21283 if err != nil {
21284 return err
21285 }
21286 if err := f(x); err != nil {
21287 return err
21288 }
21289 if x.NextPageToken == "" {
21290 return nil
21291 }
21292 c.PageToken(x.NextPageToken)
21293 }
21294 }
21295
21296 type CreativeFieldValuesPatchCall struct {
21297 s *Service
21298 profileId int64
21299 creativeFieldId int64
21300 creativefieldvalue *CreativeFieldValue
21301 urlParams_ gensupport.URLParams
21302 ctx_ context.Context
21303 header_ http.Header
21304 }
21305
21306
21307
21308
21309
21310
21311
21312 func (r *CreativeFieldValuesService) Patch(profileId int64, creativeFieldId int64, id int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesPatchCall {
21313 c := &CreativeFieldValuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21314 c.profileId = profileId
21315 c.creativeFieldId = creativeFieldId
21316 c.urlParams_.Set("id", fmt.Sprint(id))
21317 c.creativefieldvalue = creativefieldvalue
21318 return c
21319 }
21320
21321
21322
21323
21324 func (c *CreativeFieldValuesPatchCall) Fields(s ...googleapi.Field) *CreativeFieldValuesPatchCall {
21325 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21326 return c
21327 }
21328
21329
21330 func (c *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
21331 c.ctx_ = ctx
21332 return c
21333 }
21334
21335
21336
21337 func (c *CreativeFieldValuesPatchCall) Header() http.Header {
21338 if c.header_ == nil {
21339 c.header_ = make(http.Header)
21340 }
21341 return c.header_
21342 }
21343
21344 func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
21345 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21346 var body io.Reader = nil
21347 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
21348 if err != nil {
21349 return nil, err
21350 }
21351 c.urlParams_.Set("alt", alt)
21352 c.urlParams_.Set("prettyPrint", "false")
21353 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues")
21354 urls += "?" + c.urlParams_.Encode()
21355 req, err := http.NewRequest("PATCH", urls, body)
21356 if err != nil {
21357 return nil, err
21358 }
21359 req.Header = reqHeaders
21360 googleapi.Expand(req.URL, map[string]string{
21361 "profileId": strconv.FormatInt(c.profileId, 10),
21362 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
21363 })
21364 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21365 }
21366
21367
21368
21369
21370
21371
21372
21373 func (c *CreativeFieldValuesPatchCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
21374 gensupport.SetOptions(c.urlParams_, opts...)
21375 res, err := c.doRequest("json")
21376 if res != nil && res.StatusCode == http.StatusNotModified {
21377 if res.Body != nil {
21378 res.Body.Close()
21379 }
21380 return nil, gensupport.WrapError(&googleapi.Error{
21381 Code: res.StatusCode,
21382 Header: res.Header,
21383 })
21384 }
21385 if err != nil {
21386 return nil, err
21387 }
21388 defer googleapi.CloseBody(res)
21389 if err := googleapi.CheckResponse(res); err != nil {
21390 return nil, gensupport.WrapError(err)
21391 }
21392 ret := &CreativeFieldValue{
21393 ServerResponse: googleapi.ServerResponse{
21394 Header: res.Header,
21395 HTTPStatusCode: res.StatusCode,
21396 },
21397 }
21398 target := &ret
21399 if err := gensupport.DecodeResponse(target, res); err != nil {
21400 return nil, err
21401 }
21402 return ret, nil
21403 }
21404
21405 type CreativeFieldValuesUpdateCall struct {
21406 s *Service
21407 profileId int64
21408 creativeFieldId int64
21409 creativefieldvalue *CreativeFieldValue
21410 urlParams_ gensupport.URLParams
21411 ctx_ context.Context
21412 header_ http.Header
21413 }
21414
21415
21416
21417
21418
21419 func (r *CreativeFieldValuesService) Update(profileId int64, creativeFieldId int64, creativefieldvalue *CreativeFieldValue) *CreativeFieldValuesUpdateCall {
21420 c := &CreativeFieldValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21421 c.profileId = profileId
21422 c.creativeFieldId = creativeFieldId
21423 c.creativefieldvalue = creativefieldvalue
21424 return c
21425 }
21426
21427
21428
21429
21430 func (c *CreativeFieldValuesUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldValuesUpdateCall {
21431 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21432 return c
21433 }
21434
21435
21436 func (c *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
21437 c.ctx_ = ctx
21438 return c
21439 }
21440
21441
21442
21443 func (c *CreativeFieldValuesUpdateCall) Header() http.Header {
21444 if c.header_ == nil {
21445 c.header_ = make(http.Header)
21446 }
21447 return c.header_
21448 }
21449
21450 func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
21451 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21452 var body io.Reader = nil
21453 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
21454 if err != nil {
21455 return nil, err
21456 }
21457 c.urlParams_.Set("alt", alt)
21458 c.urlParams_.Set("prettyPrint", "false")
21459 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+creativeFieldId}/creativeFieldValues")
21460 urls += "?" + c.urlParams_.Encode()
21461 req, err := http.NewRequest("PUT", urls, body)
21462 if err != nil {
21463 return nil, err
21464 }
21465 req.Header = reqHeaders
21466 googleapi.Expand(req.URL, map[string]string{
21467 "profileId": strconv.FormatInt(c.profileId, 10),
21468 "creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
21469 })
21470 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21471 }
21472
21473
21474
21475
21476
21477
21478
21479 func (c *CreativeFieldValuesUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeFieldValue, error) {
21480 gensupport.SetOptions(c.urlParams_, opts...)
21481 res, err := c.doRequest("json")
21482 if res != nil && res.StatusCode == http.StatusNotModified {
21483 if res.Body != nil {
21484 res.Body.Close()
21485 }
21486 return nil, gensupport.WrapError(&googleapi.Error{
21487 Code: res.StatusCode,
21488 Header: res.Header,
21489 })
21490 }
21491 if err != nil {
21492 return nil, err
21493 }
21494 defer googleapi.CloseBody(res)
21495 if err := googleapi.CheckResponse(res); err != nil {
21496 return nil, gensupport.WrapError(err)
21497 }
21498 ret := &CreativeFieldValue{
21499 ServerResponse: googleapi.ServerResponse{
21500 Header: res.Header,
21501 HTTPStatusCode: res.StatusCode,
21502 },
21503 }
21504 target := &ret
21505 if err := gensupport.DecodeResponse(target, res); err != nil {
21506 return nil, err
21507 }
21508 return ret, nil
21509 }
21510
21511 type CreativeFieldsDeleteCall struct {
21512 s *Service
21513 profileId int64
21514 id int64
21515 urlParams_ gensupport.URLParams
21516 ctx_ context.Context
21517 header_ http.Header
21518 }
21519
21520
21521
21522
21523
21524 func (r *CreativeFieldsService) Delete(profileId int64, id int64) *CreativeFieldsDeleteCall {
21525 c := &CreativeFieldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21526 c.profileId = profileId
21527 c.id = id
21528 return c
21529 }
21530
21531
21532
21533
21534 func (c *CreativeFieldsDeleteCall) Fields(s ...googleapi.Field) *CreativeFieldsDeleteCall {
21535 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21536 return c
21537 }
21538
21539
21540 func (c *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
21541 c.ctx_ = ctx
21542 return c
21543 }
21544
21545
21546
21547 func (c *CreativeFieldsDeleteCall) Header() http.Header {
21548 if c.header_ == nil {
21549 c.header_ = make(http.Header)
21550 }
21551 return c.header_
21552 }
21553
21554 func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
21555 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21556 var body io.Reader = nil
21557 c.urlParams_.Set("alt", alt)
21558 c.urlParams_.Set("prettyPrint", "false")
21559 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+id}")
21560 urls += "?" + c.urlParams_.Encode()
21561 req, err := http.NewRequest("DELETE", urls, body)
21562 if err != nil {
21563 return nil, err
21564 }
21565 req.Header = reqHeaders
21566 googleapi.Expand(req.URL, map[string]string{
21567 "profileId": strconv.FormatInt(c.profileId, 10),
21568 "id": strconv.FormatInt(c.id, 10),
21569 })
21570 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21571 }
21572
21573
21574 func (c *CreativeFieldsDeleteCall) Do(opts ...googleapi.CallOption) error {
21575 gensupport.SetOptions(c.urlParams_, opts...)
21576 res, err := c.doRequest("json")
21577 if err != nil {
21578 return err
21579 }
21580 defer googleapi.CloseBody(res)
21581 if err := googleapi.CheckResponse(res); err != nil {
21582 return gensupport.WrapError(err)
21583 }
21584 return nil
21585 }
21586
21587 type CreativeFieldsGetCall struct {
21588 s *Service
21589 profileId int64
21590 id int64
21591 urlParams_ gensupport.URLParams
21592 ifNoneMatch_ string
21593 ctx_ context.Context
21594 header_ http.Header
21595 }
21596
21597
21598
21599
21600
21601 func (r *CreativeFieldsService) Get(profileId int64, id int64) *CreativeFieldsGetCall {
21602 c := &CreativeFieldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21603 c.profileId = profileId
21604 c.id = id
21605 return c
21606 }
21607
21608
21609
21610
21611 func (c *CreativeFieldsGetCall) Fields(s ...googleapi.Field) *CreativeFieldsGetCall {
21612 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21613 return c
21614 }
21615
21616
21617
21618
21619 func (c *CreativeFieldsGetCall) IfNoneMatch(entityTag string) *CreativeFieldsGetCall {
21620 c.ifNoneMatch_ = entityTag
21621 return c
21622 }
21623
21624
21625 func (c *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
21626 c.ctx_ = ctx
21627 return c
21628 }
21629
21630
21631
21632 func (c *CreativeFieldsGetCall) Header() http.Header {
21633 if c.header_ == nil {
21634 c.header_ = make(http.Header)
21635 }
21636 return c.header_
21637 }
21638
21639 func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
21640 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21641 if c.ifNoneMatch_ != "" {
21642 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21643 }
21644 var body io.Reader = nil
21645 c.urlParams_.Set("alt", alt)
21646 c.urlParams_.Set("prettyPrint", "false")
21647 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields/{+id}")
21648 urls += "?" + c.urlParams_.Encode()
21649 req, err := http.NewRequest("GET", urls, body)
21650 if err != nil {
21651 return nil, err
21652 }
21653 req.Header = reqHeaders
21654 googleapi.Expand(req.URL, map[string]string{
21655 "profileId": strconv.FormatInt(c.profileId, 10),
21656 "id": strconv.FormatInt(c.id, 10),
21657 })
21658 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21659 }
21660
21661
21662
21663
21664
21665
21666 func (c *CreativeFieldsGetCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
21667 gensupport.SetOptions(c.urlParams_, opts...)
21668 res, err := c.doRequest("json")
21669 if res != nil && res.StatusCode == http.StatusNotModified {
21670 if res.Body != nil {
21671 res.Body.Close()
21672 }
21673 return nil, gensupport.WrapError(&googleapi.Error{
21674 Code: res.StatusCode,
21675 Header: res.Header,
21676 })
21677 }
21678 if err != nil {
21679 return nil, err
21680 }
21681 defer googleapi.CloseBody(res)
21682 if err := googleapi.CheckResponse(res); err != nil {
21683 return nil, gensupport.WrapError(err)
21684 }
21685 ret := &CreativeField{
21686 ServerResponse: googleapi.ServerResponse{
21687 Header: res.Header,
21688 HTTPStatusCode: res.StatusCode,
21689 },
21690 }
21691 target := &ret
21692 if err := gensupport.DecodeResponse(target, res); err != nil {
21693 return nil, err
21694 }
21695 return ret, nil
21696 }
21697
21698 type CreativeFieldsInsertCall struct {
21699 s *Service
21700 profileId int64
21701 creativefield *CreativeField
21702 urlParams_ gensupport.URLParams
21703 ctx_ context.Context
21704 header_ http.Header
21705 }
21706
21707
21708
21709
21710 func (r *CreativeFieldsService) Insert(profileId int64, creativefield *CreativeField) *CreativeFieldsInsertCall {
21711 c := &CreativeFieldsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21712 c.profileId = profileId
21713 c.creativefield = creativefield
21714 return c
21715 }
21716
21717
21718
21719
21720 func (c *CreativeFieldsInsertCall) Fields(s ...googleapi.Field) *CreativeFieldsInsertCall {
21721 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21722 return c
21723 }
21724
21725
21726 func (c *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
21727 c.ctx_ = ctx
21728 return c
21729 }
21730
21731
21732
21733 func (c *CreativeFieldsInsertCall) Header() http.Header {
21734 if c.header_ == nil {
21735 c.header_ = make(http.Header)
21736 }
21737 return c.header_
21738 }
21739
21740 func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
21741 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
21742 var body io.Reader = nil
21743 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
21744 if err != nil {
21745 return nil, err
21746 }
21747 c.urlParams_.Set("alt", alt)
21748 c.urlParams_.Set("prettyPrint", "false")
21749 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields")
21750 urls += "?" + c.urlParams_.Encode()
21751 req, err := http.NewRequest("POST", urls, body)
21752 if err != nil {
21753 return nil, err
21754 }
21755 req.Header = reqHeaders
21756 googleapi.Expand(req.URL, map[string]string{
21757 "profileId": strconv.FormatInt(c.profileId, 10),
21758 })
21759 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21760 }
21761
21762
21763
21764
21765
21766
21767 func (c *CreativeFieldsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
21768 gensupport.SetOptions(c.urlParams_, opts...)
21769 res, err := c.doRequest("json")
21770 if res != nil && res.StatusCode == http.StatusNotModified {
21771 if res.Body != nil {
21772 res.Body.Close()
21773 }
21774 return nil, gensupport.WrapError(&googleapi.Error{
21775 Code: res.StatusCode,
21776 Header: res.Header,
21777 })
21778 }
21779 if err != nil {
21780 return nil, err
21781 }
21782 defer googleapi.CloseBody(res)
21783 if err := googleapi.CheckResponse(res); err != nil {
21784 return nil, gensupport.WrapError(err)
21785 }
21786 ret := &CreativeField{
21787 ServerResponse: googleapi.ServerResponse{
21788 Header: res.Header,
21789 HTTPStatusCode: res.StatusCode,
21790 },
21791 }
21792 target := &ret
21793 if err := gensupport.DecodeResponse(target, res); err != nil {
21794 return nil, err
21795 }
21796 return ret, nil
21797 }
21798
21799 type CreativeFieldsListCall struct {
21800 s *Service
21801 profileId int64
21802 urlParams_ gensupport.URLParams
21803 ifNoneMatch_ string
21804 ctx_ context.Context
21805 header_ http.Header
21806 }
21807
21808
21809
21810
21811
21812 func (r *CreativeFieldsService) List(profileId int64) *CreativeFieldsListCall {
21813 c := &CreativeFieldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21814 c.profileId = profileId
21815 return c
21816 }
21817
21818
21819
21820 func (c *CreativeFieldsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeFieldsListCall {
21821 var advertiserIds_ []string
21822 for _, v := range advertiserIds {
21823 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
21824 }
21825 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
21826 return c
21827 }
21828
21829
21830
21831 func (c *CreativeFieldsListCall) Ids(ids ...int64) *CreativeFieldsListCall {
21832 var ids_ []string
21833 for _, v := range ids {
21834 ids_ = append(ids_, fmt.Sprint(v))
21835 }
21836 c.urlParams_.SetMulti("ids", ids_)
21837 return c
21838 }
21839
21840
21841
21842 func (c *CreativeFieldsListCall) MaxResults(maxResults int64) *CreativeFieldsListCall {
21843 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21844 return c
21845 }
21846
21847
21848
21849 func (c *CreativeFieldsListCall) PageToken(pageToken string) *CreativeFieldsListCall {
21850 c.urlParams_.Set("pageToken", pageToken)
21851 return c
21852 }
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862 func (c *CreativeFieldsListCall) SearchString(searchString string) *CreativeFieldsListCall {
21863 c.urlParams_.Set("searchString", searchString)
21864 return c
21865 }
21866
21867
21868
21869
21870
21871
21872
21873
21874 func (c *CreativeFieldsListCall) SortField(sortField string) *CreativeFieldsListCall {
21875 c.urlParams_.Set("sortField", sortField)
21876 return c
21877 }
21878
21879
21880
21881
21882
21883
21884
21885 func (c *CreativeFieldsListCall) SortOrder(sortOrder string) *CreativeFieldsListCall {
21886 c.urlParams_.Set("sortOrder", sortOrder)
21887 return c
21888 }
21889
21890
21891
21892
21893 func (c *CreativeFieldsListCall) Fields(s ...googleapi.Field) *CreativeFieldsListCall {
21894 c.urlParams_.Set("fields", googleapi.CombineFields(s))
21895 return c
21896 }
21897
21898
21899
21900
21901 func (c *CreativeFieldsListCall) IfNoneMatch(entityTag string) *CreativeFieldsListCall {
21902 c.ifNoneMatch_ = entityTag
21903 return c
21904 }
21905
21906
21907 func (c *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
21908 c.ctx_ = ctx
21909 return c
21910 }
21911
21912
21913
21914 func (c *CreativeFieldsListCall) Header() http.Header {
21915 if c.header_ == nil {
21916 c.header_ = make(http.Header)
21917 }
21918 return c.header_
21919 }
21920
21921 func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
21922 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
21923 if c.ifNoneMatch_ != "" {
21924 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21925 }
21926 var body io.Reader = nil
21927 c.urlParams_.Set("alt", alt)
21928 c.urlParams_.Set("prettyPrint", "false")
21929 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields")
21930 urls += "?" + c.urlParams_.Encode()
21931 req, err := http.NewRequest("GET", urls, body)
21932 if err != nil {
21933 return nil, err
21934 }
21935 req.Header = reqHeaders
21936 googleapi.Expand(req.URL, map[string]string{
21937 "profileId": strconv.FormatInt(c.profileId, 10),
21938 })
21939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
21940 }
21941
21942
21943
21944
21945
21946
21947
21948 func (c *CreativeFieldsListCall) Do(opts ...googleapi.CallOption) (*CreativeFieldsListResponse, error) {
21949 gensupport.SetOptions(c.urlParams_, opts...)
21950 res, err := c.doRequest("json")
21951 if res != nil && res.StatusCode == http.StatusNotModified {
21952 if res.Body != nil {
21953 res.Body.Close()
21954 }
21955 return nil, gensupport.WrapError(&googleapi.Error{
21956 Code: res.StatusCode,
21957 Header: res.Header,
21958 })
21959 }
21960 if err != nil {
21961 return nil, err
21962 }
21963 defer googleapi.CloseBody(res)
21964 if err := googleapi.CheckResponse(res); err != nil {
21965 return nil, gensupport.WrapError(err)
21966 }
21967 ret := &CreativeFieldsListResponse{
21968 ServerResponse: googleapi.ServerResponse{
21969 Header: res.Header,
21970 HTTPStatusCode: res.StatusCode,
21971 },
21972 }
21973 target := &ret
21974 if err := gensupport.DecodeResponse(target, res); err != nil {
21975 return nil, err
21976 }
21977 return ret, nil
21978 }
21979
21980
21981
21982
21983 func (c *CreativeFieldsListCall) Pages(ctx context.Context, f func(*CreativeFieldsListResponse) error) error {
21984 c.ctx_ = ctx
21985 defer c.PageToken(c.urlParams_.Get("pageToken"))
21986 for {
21987 x, err := c.Do()
21988 if err != nil {
21989 return err
21990 }
21991 if err := f(x); err != nil {
21992 return err
21993 }
21994 if x.NextPageToken == "" {
21995 return nil
21996 }
21997 c.PageToken(x.NextPageToken)
21998 }
21999 }
22000
22001 type CreativeFieldsPatchCall struct {
22002 s *Service
22003 profileId int64
22004 creativefield *CreativeField
22005 urlParams_ gensupport.URLParams
22006 ctx_ context.Context
22007 header_ http.Header
22008 }
22009
22010
22011
22012
22013
22014
22015 func (r *CreativeFieldsService) Patch(profileId int64, id int64, creativefield *CreativeField) *CreativeFieldsPatchCall {
22016 c := &CreativeFieldsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22017 c.profileId = profileId
22018 c.urlParams_.Set("id", fmt.Sprint(id))
22019 c.creativefield = creativefield
22020 return c
22021 }
22022
22023
22024
22025
22026 func (c *CreativeFieldsPatchCall) Fields(s ...googleapi.Field) *CreativeFieldsPatchCall {
22027 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22028 return c
22029 }
22030
22031
22032 func (c *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
22033 c.ctx_ = ctx
22034 return c
22035 }
22036
22037
22038
22039 func (c *CreativeFieldsPatchCall) Header() http.Header {
22040 if c.header_ == nil {
22041 c.header_ = make(http.Header)
22042 }
22043 return c.header_
22044 }
22045
22046 func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
22047 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22048 var body io.Reader = nil
22049 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
22050 if err != nil {
22051 return nil, err
22052 }
22053 c.urlParams_.Set("alt", alt)
22054 c.urlParams_.Set("prettyPrint", "false")
22055 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields")
22056 urls += "?" + c.urlParams_.Encode()
22057 req, err := http.NewRequest("PATCH", urls, body)
22058 if err != nil {
22059 return nil, err
22060 }
22061 req.Header = reqHeaders
22062 googleapi.Expand(req.URL, map[string]string{
22063 "profileId": strconv.FormatInt(c.profileId, 10),
22064 })
22065 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22066 }
22067
22068
22069
22070
22071
22072
22073 func (c *CreativeFieldsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
22074 gensupport.SetOptions(c.urlParams_, opts...)
22075 res, err := c.doRequest("json")
22076 if res != nil && res.StatusCode == http.StatusNotModified {
22077 if res.Body != nil {
22078 res.Body.Close()
22079 }
22080 return nil, gensupport.WrapError(&googleapi.Error{
22081 Code: res.StatusCode,
22082 Header: res.Header,
22083 })
22084 }
22085 if err != nil {
22086 return nil, err
22087 }
22088 defer googleapi.CloseBody(res)
22089 if err := googleapi.CheckResponse(res); err != nil {
22090 return nil, gensupport.WrapError(err)
22091 }
22092 ret := &CreativeField{
22093 ServerResponse: googleapi.ServerResponse{
22094 Header: res.Header,
22095 HTTPStatusCode: res.StatusCode,
22096 },
22097 }
22098 target := &ret
22099 if err := gensupport.DecodeResponse(target, res); err != nil {
22100 return nil, err
22101 }
22102 return ret, nil
22103 }
22104
22105 type CreativeFieldsUpdateCall struct {
22106 s *Service
22107 profileId int64
22108 creativefield *CreativeField
22109 urlParams_ gensupport.URLParams
22110 ctx_ context.Context
22111 header_ http.Header
22112 }
22113
22114
22115
22116
22117 func (r *CreativeFieldsService) Update(profileId int64, creativefield *CreativeField) *CreativeFieldsUpdateCall {
22118 c := &CreativeFieldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22119 c.profileId = profileId
22120 c.creativefield = creativefield
22121 return c
22122 }
22123
22124
22125
22126
22127 func (c *CreativeFieldsUpdateCall) Fields(s ...googleapi.Field) *CreativeFieldsUpdateCall {
22128 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22129 return c
22130 }
22131
22132
22133 func (c *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
22134 c.ctx_ = ctx
22135 return c
22136 }
22137
22138
22139
22140 func (c *CreativeFieldsUpdateCall) Header() http.Header {
22141 if c.header_ == nil {
22142 c.header_ = make(http.Header)
22143 }
22144 return c.header_
22145 }
22146
22147 func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
22148 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22149 var body io.Reader = nil
22150 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
22151 if err != nil {
22152 return nil, err
22153 }
22154 c.urlParams_.Set("alt", alt)
22155 c.urlParams_.Set("prettyPrint", "false")
22156 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeFields")
22157 urls += "?" + c.urlParams_.Encode()
22158 req, err := http.NewRequest("PUT", urls, body)
22159 if err != nil {
22160 return nil, err
22161 }
22162 req.Header = reqHeaders
22163 googleapi.Expand(req.URL, map[string]string{
22164 "profileId": strconv.FormatInt(c.profileId, 10),
22165 })
22166 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22167 }
22168
22169
22170
22171
22172
22173
22174 func (c *CreativeFieldsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeField, error) {
22175 gensupport.SetOptions(c.urlParams_, opts...)
22176 res, err := c.doRequest("json")
22177 if res != nil && res.StatusCode == http.StatusNotModified {
22178 if res.Body != nil {
22179 res.Body.Close()
22180 }
22181 return nil, gensupport.WrapError(&googleapi.Error{
22182 Code: res.StatusCode,
22183 Header: res.Header,
22184 })
22185 }
22186 if err != nil {
22187 return nil, err
22188 }
22189 defer googleapi.CloseBody(res)
22190 if err := googleapi.CheckResponse(res); err != nil {
22191 return nil, gensupport.WrapError(err)
22192 }
22193 ret := &CreativeField{
22194 ServerResponse: googleapi.ServerResponse{
22195 Header: res.Header,
22196 HTTPStatusCode: res.StatusCode,
22197 },
22198 }
22199 target := &ret
22200 if err := gensupport.DecodeResponse(target, res); err != nil {
22201 return nil, err
22202 }
22203 return ret, nil
22204 }
22205
22206 type CreativeGroupsGetCall struct {
22207 s *Service
22208 profileId int64
22209 id int64
22210 urlParams_ gensupport.URLParams
22211 ifNoneMatch_ string
22212 ctx_ context.Context
22213 header_ http.Header
22214 }
22215
22216
22217
22218
22219
22220 func (r *CreativeGroupsService) Get(profileId int64, id int64) *CreativeGroupsGetCall {
22221 c := &CreativeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22222 c.profileId = profileId
22223 c.id = id
22224 return c
22225 }
22226
22227
22228
22229
22230 func (c *CreativeGroupsGetCall) Fields(s ...googleapi.Field) *CreativeGroupsGetCall {
22231 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22232 return c
22233 }
22234
22235
22236
22237
22238 func (c *CreativeGroupsGetCall) IfNoneMatch(entityTag string) *CreativeGroupsGetCall {
22239 c.ifNoneMatch_ = entityTag
22240 return c
22241 }
22242
22243
22244 func (c *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
22245 c.ctx_ = ctx
22246 return c
22247 }
22248
22249
22250
22251 func (c *CreativeGroupsGetCall) Header() http.Header {
22252 if c.header_ == nil {
22253 c.header_ = make(http.Header)
22254 }
22255 return c.header_
22256 }
22257
22258 func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
22259 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22260 if c.ifNoneMatch_ != "" {
22261 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22262 }
22263 var body io.Reader = nil
22264 c.urlParams_.Set("alt", alt)
22265 c.urlParams_.Set("prettyPrint", "false")
22266 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeGroups/{+id}")
22267 urls += "?" + c.urlParams_.Encode()
22268 req, err := http.NewRequest("GET", urls, body)
22269 if err != nil {
22270 return nil, err
22271 }
22272 req.Header = reqHeaders
22273 googleapi.Expand(req.URL, map[string]string{
22274 "profileId": strconv.FormatInt(c.profileId, 10),
22275 "id": strconv.FormatInt(c.id, 10),
22276 })
22277 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22278 }
22279
22280
22281
22282
22283
22284
22285 func (c *CreativeGroupsGetCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
22286 gensupport.SetOptions(c.urlParams_, opts...)
22287 res, err := c.doRequest("json")
22288 if res != nil && res.StatusCode == http.StatusNotModified {
22289 if res.Body != nil {
22290 res.Body.Close()
22291 }
22292 return nil, gensupport.WrapError(&googleapi.Error{
22293 Code: res.StatusCode,
22294 Header: res.Header,
22295 })
22296 }
22297 if err != nil {
22298 return nil, err
22299 }
22300 defer googleapi.CloseBody(res)
22301 if err := googleapi.CheckResponse(res); err != nil {
22302 return nil, gensupport.WrapError(err)
22303 }
22304 ret := &CreativeGroup{
22305 ServerResponse: googleapi.ServerResponse{
22306 Header: res.Header,
22307 HTTPStatusCode: res.StatusCode,
22308 },
22309 }
22310 target := &ret
22311 if err := gensupport.DecodeResponse(target, res); err != nil {
22312 return nil, err
22313 }
22314 return ret, nil
22315 }
22316
22317 type CreativeGroupsInsertCall struct {
22318 s *Service
22319 profileId int64
22320 creativegroup *CreativeGroup
22321 urlParams_ gensupport.URLParams
22322 ctx_ context.Context
22323 header_ http.Header
22324 }
22325
22326
22327
22328
22329 func (r *CreativeGroupsService) Insert(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsInsertCall {
22330 c := &CreativeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22331 c.profileId = profileId
22332 c.creativegroup = creativegroup
22333 return c
22334 }
22335
22336
22337
22338
22339 func (c *CreativeGroupsInsertCall) Fields(s ...googleapi.Field) *CreativeGroupsInsertCall {
22340 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22341 return c
22342 }
22343
22344
22345 func (c *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
22346 c.ctx_ = ctx
22347 return c
22348 }
22349
22350
22351
22352 func (c *CreativeGroupsInsertCall) Header() http.Header {
22353 if c.header_ == nil {
22354 c.header_ = make(http.Header)
22355 }
22356 return c.header_
22357 }
22358
22359 func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
22360 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22361 var body io.Reader = nil
22362 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
22363 if err != nil {
22364 return nil, err
22365 }
22366 c.urlParams_.Set("alt", alt)
22367 c.urlParams_.Set("prettyPrint", "false")
22368 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeGroups")
22369 urls += "?" + c.urlParams_.Encode()
22370 req, err := http.NewRequest("POST", urls, body)
22371 if err != nil {
22372 return nil, err
22373 }
22374 req.Header = reqHeaders
22375 googleapi.Expand(req.URL, map[string]string{
22376 "profileId": strconv.FormatInt(c.profileId, 10),
22377 })
22378 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22379 }
22380
22381
22382
22383
22384
22385
22386 func (c *CreativeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
22387 gensupport.SetOptions(c.urlParams_, opts...)
22388 res, err := c.doRequest("json")
22389 if res != nil && res.StatusCode == http.StatusNotModified {
22390 if res.Body != nil {
22391 res.Body.Close()
22392 }
22393 return nil, gensupport.WrapError(&googleapi.Error{
22394 Code: res.StatusCode,
22395 Header: res.Header,
22396 })
22397 }
22398 if err != nil {
22399 return nil, err
22400 }
22401 defer googleapi.CloseBody(res)
22402 if err := googleapi.CheckResponse(res); err != nil {
22403 return nil, gensupport.WrapError(err)
22404 }
22405 ret := &CreativeGroup{
22406 ServerResponse: googleapi.ServerResponse{
22407 Header: res.Header,
22408 HTTPStatusCode: res.StatusCode,
22409 },
22410 }
22411 target := &ret
22412 if err := gensupport.DecodeResponse(target, res); err != nil {
22413 return nil, err
22414 }
22415 return ret, nil
22416 }
22417
22418 type CreativeGroupsListCall struct {
22419 s *Service
22420 profileId int64
22421 urlParams_ gensupport.URLParams
22422 ifNoneMatch_ string
22423 ctx_ context.Context
22424 header_ http.Header
22425 }
22426
22427
22428
22429
22430
22431 func (r *CreativeGroupsService) List(profileId int64) *CreativeGroupsListCall {
22432 c := &CreativeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22433 c.profileId = profileId
22434 return c
22435 }
22436
22437
22438
22439 func (c *CreativeGroupsListCall) AdvertiserIds(advertiserIds ...int64) *CreativeGroupsListCall {
22440 var advertiserIds_ []string
22441 for _, v := range advertiserIds {
22442 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
22443 }
22444 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
22445 return c
22446 }
22447
22448
22449
22450 func (c *CreativeGroupsListCall) GroupNumber(groupNumber int64) *CreativeGroupsListCall {
22451 c.urlParams_.Set("groupNumber", fmt.Sprint(groupNumber))
22452 return c
22453 }
22454
22455
22456
22457 func (c *CreativeGroupsListCall) Ids(ids ...int64) *CreativeGroupsListCall {
22458 var ids_ []string
22459 for _, v := range ids {
22460 ids_ = append(ids_, fmt.Sprint(v))
22461 }
22462 c.urlParams_.SetMulti("ids", ids_)
22463 return c
22464 }
22465
22466
22467
22468 func (c *CreativeGroupsListCall) MaxResults(maxResults int64) *CreativeGroupsListCall {
22469 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22470 return c
22471 }
22472
22473
22474
22475 func (c *CreativeGroupsListCall) PageToken(pageToken string) *CreativeGroupsListCall {
22476 c.urlParams_.Set("pageToken", pageToken)
22477 return c
22478 }
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488 func (c *CreativeGroupsListCall) SearchString(searchString string) *CreativeGroupsListCall {
22489 c.urlParams_.Set("searchString", searchString)
22490 return c
22491 }
22492
22493
22494
22495
22496
22497
22498
22499
22500 func (c *CreativeGroupsListCall) SortField(sortField string) *CreativeGroupsListCall {
22501 c.urlParams_.Set("sortField", sortField)
22502 return c
22503 }
22504
22505
22506
22507
22508
22509
22510
22511 func (c *CreativeGroupsListCall) SortOrder(sortOrder string) *CreativeGroupsListCall {
22512 c.urlParams_.Set("sortOrder", sortOrder)
22513 return c
22514 }
22515
22516
22517
22518
22519 func (c *CreativeGroupsListCall) Fields(s ...googleapi.Field) *CreativeGroupsListCall {
22520 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22521 return c
22522 }
22523
22524
22525
22526
22527 func (c *CreativeGroupsListCall) IfNoneMatch(entityTag string) *CreativeGroupsListCall {
22528 c.ifNoneMatch_ = entityTag
22529 return c
22530 }
22531
22532
22533 func (c *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
22534 c.ctx_ = ctx
22535 return c
22536 }
22537
22538
22539
22540 func (c *CreativeGroupsListCall) Header() http.Header {
22541 if c.header_ == nil {
22542 c.header_ = make(http.Header)
22543 }
22544 return c.header_
22545 }
22546
22547 func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
22548 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22549 if c.ifNoneMatch_ != "" {
22550 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22551 }
22552 var body io.Reader = nil
22553 c.urlParams_.Set("alt", alt)
22554 c.urlParams_.Set("prettyPrint", "false")
22555 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeGroups")
22556 urls += "?" + c.urlParams_.Encode()
22557 req, err := http.NewRequest("GET", urls, body)
22558 if err != nil {
22559 return nil, err
22560 }
22561 req.Header = reqHeaders
22562 googleapi.Expand(req.URL, map[string]string{
22563 "profileId": strconv.FormatInt(c.profileId, 10),
22564 })
22565 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22566 }
22567
22568
22569
22570
22571
22572
22573
22574 func (c *CreativeGroupsListCall) Do(opts ...googleapi.CallOption) (*CreativeGroupsListResponse, error) {
22575 gensupport.SetOptions(c.urlParams_, opts...)
22576 res, err := c.doRequest("json")
22577 if res != nil && res.StatusCode == http.StatusNotModified {
22578 if res.Body != nil {
22579 res.Body.Close()
22580 }
22581 return nil, gensupport.WrapError(&googleapi.Error{
22582 Code: res.StatusCode,
22583 Header: res.Header,
22584 })
22585 }
22586 if err != nil {
22587 return nil, err
22588 }
22589 defer googleapi.CloseBody(res)
22590 if err := googleapi.CheckResponse(res); err != nil {
22591 return nil, gensupport.WrapError(err)
22592 }
22593 ret := &CreativeGroupsListResponse{
22594 ServerResponse: googleapi.ServerResponse{
22595 Header: res.Header,
22596 HTTPStatusCode: res.StatusCode,
22597 },
22598 }
22599 target := &ret
22600 if err := gensupport.DecodeResponse(target, res); err != nil {
22601 return nil, err
22602 }
22603 return ret, nil
22604 }
22605
22606
22607
22608
22609 func (c *CreativeGroupsListCall) Pages(ctx context.Context, f func(*CreativeGroupsListResponse) error) error {
22610 c.ctx_ = ctx
22611 defer c.PageToken(c.urlParams_.Get("pageToken"))
22612 for {
22613 x, err := c.Do()
22614 if err != nil {
22615 return err
22616 }
22617 if err := f(x); err != nil {
22618 return err
22619 }
22620 if x.NextPageToken == "" {
22621 return nil
22622 }
22623 c.PageToken(x.NextPageToken)
22624 }
22625 }
22626
22627 type CreativeGroupsPatchCall struct {
22628 s *Service
22629 profileId int64
22630 creativegroup *CreativeGroup
22631 urlParams_ gensupport.URLParams
22632 ctx_ context.Context
22633 header_ http.Header
22634 }
22635
22636
22637
22638
22639
22640
22641 func (r *CreativeGroupsService) Patch(profileId int64, id int64, creativegroup *CreativeGroup) *CreativeGroupsPatchCall {
22642 c := &CreativeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22643 c.profileId = profileId
22644 c.urlParams_.Set("id", fmt.Sprint(id))
22645 c.creativegroup = creativegroup
22646 return c
22647 }
22648
22649
22650
22651
22652 func (c *CreativeGroupsPatchCall) Fields(s ...googleapi.Field) *CreativeGroupsPatchCall {
22653 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22654 return c
22655 }
22656
22657
22658 func (c *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
22659 c.ctx_ = ctx
22660 return c
22661 }
22662
22663
22664
22665 func (c *CreativeGroupsPatchCall) Header() http.Header {
22666 if c.header_ == nil {
22667 c.header_ = make(http.Header)
22668 }
22669 return c.header_
22670 }
22671
22672 func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
22673 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22674 var body io.Reader = nil
22675 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
22676 if err != nil {
22677 return nil, err
22678 }
22679 c.urlParams_.Set("alt", alt)
22680 c.urlParams_.Set("prettyPrint", "false")
22681 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeGroups")
22682 urls += "?" + c.urlParams_.Encode()
22683 req, err := http.NewRequest("PATCH", urls, body)
22684 if err != nil {
22685 return nil, err
22686 }
22687 req.Header = reqHeaders
22688 googleapi.Expand(req.URL, map[string]string{
22689 "profileId": strconv.FormatInt(c.profileId, 10),
22690 })
22691 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22692 }
22693
22694
22695
22696
22697
22698
22699 func (c *CreativeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
22700 gensupport.SetOptions(c.urlParams_, opts...)
22701 res, err := c.doRequest("json")
22702 if res != nil && res.StatusCode == http.StatusNotModified {
22703 if res.Body != nil {
22704 res.Body.Close()
22705 }
22706 return nil, gensupport.WrapError(&googleapi.Error{
22707 Code: res.StatusCode,
22708 Header: res.Header,
22709 })
22710 }
22711 if err != nil {
22712 return nil, err
22713 }
22714 defer googleapi.CloseBody(res)
22715 if err := googleapi.CheckResponse(res); err != nil {
22716 return nil, gensupport.WrapError(err)
22717 }
22718 ret := &CreativeGroup{
22719 ServerResponse: googleapi.ServerResponse{
22720 Header: res.Header,
22721 HTTPStatusCode: res.StatusCode,
22722 },
22723 }
22724 target := &ret
22725 if err := gensupport.DecodeResponse(target, res); err != nil {
22726 return nil, err
22727 }
22728 return ret, nil
22729 }
22730
22731 type CreativeGroupsUpdateCall struct {
22732 s *Service
22733 profileId int64
22734 creativegroup *CreativeGroup
22735 urlParams_ gensupport.URLParams
22736 ctx_ context.Context
22737 header_ http.Header
22738 }
22739
22740
22741
22742
22743 func (r *CreativeGroupsService) Update(profileId int64, creativegroup *CreativeGroup) *CreativeGroupsUpdateCall {
22744 c := &CreativeGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22745 c.profileId = profileId
22746 c.creativegroup = creativegroup
22747 return c
22748 }
22749
22750
22751
22752
22753 func (c *CreativeGroupsUpdateCall) Fields(s ...googleapi.Field) *CreativeGroupsUpdateCall {
22754 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22755 return c
22756 }
22757
22758
22759 func (c *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
22760 c.ctx_ = ctx
22761 return c
22762 }
22763
22764
22765
22766 func (c *CreativeGroupsUpdateCall) Header() http.Header {
22767 if c.header_ == nil {
22768 c.header_ = make(http.Header)
22769 }
22770 return c.header_
22771 }
22772
22773 func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
22774 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22775 var body io.Reader = nil
22776 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
22777 if err != nil {
22778 return nil, err
22779 }
22780 c.urlParams_.Set("alt", alt)
22781 c.urlParams_.Set("prettyPrint", "false")
22782 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creativeGroups")
22783 urls += "?" + c.urlParams_.Encode()
22784 req, err := http.NewRequest("PUT", urls, body)
22785 if err != nil {
22786 return nil, err
22787 }
22788 req.Header = reqHeaders
22789 googleapi.Expand(req.URL, map[string]string{
22790 "profileId": strconv.FormatInt(c.profileId, 10),
22791 })
22792 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22793 }
22794
22795
22796
22797
22798
22799
22800 func (c *CreativeGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*CreativeGroup, error) {
22801 gensupport.SetOptions(c.urlParams_, opts...)
22802 res, err := c.doRequest("json")
22803 if res != nil && res.StatusCode == http.StatusNotModified {
22804 if res.Body != nil {
22805 res.Body.Close()
22806 }
22807 return nil, gensupport.WrapError(&googleapi.Error{
22808 Code: res.StatusCode,
22809 Header: res.Header,
22810 })
22811 }
22812 if err != nil {
22813 return nil, err
22814 }
22815 defer googleapi.CloseBody(res)
22816 if err := googleapi.CheckResponse(res); err != nil {
22817 return nil, gensupport.WrapError(err)
22818 }
22819 ret := &CreativeGroup{
22820 ServerResponse: googleapi.ServerResponse{
22821 Header: res.Header,
22822 HTTPStatusCode: res.StatusCode,
22823 },
22824 }
22825 target := &ret
22826 if err := gensupport.DecodeResponse(target, res); err != nil {
22827 return nil, err
22828 }
22829 return ret, nil
22830 }
22831
22832 type CreativesGetCall struct {
22833 s *Service
22834 profileId int64
22835 id int64
22836 urlParams_ gensupport.URLParams
22837 ifNoneMatch_ string
22838 ctx_ context.Context
22839 header_ http.Header
22840 }
22841
22842
22843
22844
22845
22846 func (r *CreativesService) Get(profileId int64, id int64) *CreativesGetCall {
22847 c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22848 c.profileId = profileId
22849 c.id = id
22850 return c
22851 }
22852
22853
22854
22855
22856 func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall {
22857 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22858 return c
22859 }
22860
22861
22862
22863
22864 func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall {
22865 c.ifNoneMatch_ = entityTag
22866 return c
22867 }
22868
22869
22870 func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
22871 c.ctx_ = ctx
22872 return c
22873 }
22874
22875
22876
22877 func (c *CreativesGetCall) Header() http.Header {
22878 if c.header_ == nil {
22879 c.header_ = make(http.Header)
22880 }
22881 return c.header_
22882 }
22883
22884 func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
22885 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
22886 if c.ifNoneMatch_ != "" {
22887 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22888 }
22889 var body io.Reader = nil
22890 c.urlParams_.Set("alt", alt)
22891 c.urlParams_.Set("prettyPrint", "false")
22892 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creatives/{+id}")
22893 urls += "?" + c.urlParams_.Encode()
22894 req, err := http.NewRequest("GET", urls, body)
22895 if err != nil {
22896 return nil, err
22897 }
22898 req.Header = reqHeaders
22899 googleapi.Expand(req.URL, map[string]string{
22900 "profileId": strconv.FormatInt(c.profileId, 10),
22901 "id": strconv.FormatInt(c.id, 10),
22902 })
22903 return gensupport.SendRequest(c.ctx_, c.s.client, req)
22904 }
22905
22906
22907
22908
22909
22910
22911 func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
22912 gensupport.SetOptions(c.urlParams_, opts...)
22913 res, err := c.doRequest("json")
22914 if res != nil && res.StatusCode == http.StatusNotModified {
22915 if res.Body != nil {
22916 res.Body.Close()
22917 }
22918 return nil, gensupport.WrapError(&googleapi.Error{
22919 Code: res.StatusCode,
22920 Header: res.Header,
22921 })
22922 }
22923 if err != nil {
22924 return nil, err
22925 }
22926 defer googleapi.CloseBody(res)
22927 if err := googleapi.CheckResponse(res); err != nil {
22928 return nil, gensupport.WrapError(err)
22929 }
22930 ret := &Creative{
22931 ServerResponse: googleapi.ServerResponse{
22932 Header: res.Header,
22933 HTTPStatusCode: res.StatusCode,
22934 },
22935 }
22936 target := &ret
22937 if err := gensupport.DecodeResponse(target, res); err != nil {
22938 return nil, err
22939 }
22940 return ret, nil
22941 }
22942
22943 type CreativesInsertCall struct {
22944 s *Service
22945 profileId int64
22946 creative *Creative
22947 urlParams_ gensupport.URLParams
22948 ctx_ context.Context
22949 header_ http.Header
22950 }
22951
22952
22953
22954
22955 func (r *CreativesService) Insert(profileId int64, creative *Creative) *CreativesInsertCall {
22956 c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22957 c.profileId = profileId
22958 c.creative = creative
22959 return c
22960 }
22961
22962
22963
22964
22965 func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall {
22966 c.urlParams_.Set("fields", googleapi.CombineFields(s))
22967 return c
22968 }
22969
22970
22971 func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
22972 c.ctx_ = ctx
22973 return c
22974 }
22975
22976
22977
22978 func (c *CreativesInsertCall) Header() http.Header {
22979 if c.header_ == nil {
22980 c.header_ = make(http.Header)
22981 }
22982 return c.header_
22983 }
22984
22985 func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
22986 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
22987 var body io.Reader = nil
22988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
22989 if err != nil {
22990 return nil, err
22991 }
22992 c.urlParams_.Set("alt", alt)
22993 c.urlParams_.Set("prettyPrint", "false")
22994 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creatives")
22995 urls += "?" + c.urlParams_.Encode()
22996 req, err := http.NewRequest("POST", urls, body)
22997 if err != nil {
22998 return nil, err
22999 }
23000 req.Header = reqHeaders
23001 googleapi.Expand(req.URL, map[string]string{
23002 "profileId": strconv.FormatInt(c.profileId, 10),
23003 })
23004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23005 }
23006
23007
23008
23009
23010
23011
23012 func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
23013 gensupport.SetOptions(c.urlParams_, opts...)
23014 res, err := c.doRequest("json")
23015 if res != nil && res.StatusCode == http.StatusNotModified {
23016 if res.Body != nil {
23017 res.Body.Close()
23018 }
23019 return nil, gensupport.WrapError(&googleapi.Error{
23020 Code: res.StatusCode,
23021 Header: res.Header,
23022 })
23023 }
23024 if err != nil {
23025 return nil, err
23026 }
23027 defer googleapi.CloseBody(res)
23028 if err := googleapi.CheckResponse(res); err != nil {
23029 return nil, gensupport.WrapError(err)
23030 }
23031 ret := &Creative{
23032 ServerResponse: googleapi.ServerResponse{
23033 Header: res.Header,
23034 HTTPStatusCode: res.StatusCode,
23035 },
23036 }
23037 target := &ret
23038 if err := gensupport.DecodeResponse(target, res); err != nil {
23039 return nil, err
23040 }
23041 return ret, nil
23042 }
23043
23044 type CreativesListCall struct {
23045 s *Service
23046 profileId int64
23047 urlParams_ gensupport.URLParams
23048 ifNoneMatch_ string
23049 ctx_ context.Context
23050 header_ http.Header
23051 }
23052
23053
23054
23055
23056
23057 func (r *CreativesService) List(profileId int64) *CreativesListCall {
23058 c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23059 c.profileId = profileId
23060 return c
23061 }
23062
23063
23064
23065 func (c *CreativesListCall) Active(active bool) *CreativesListCall {
23066 c.urlParams_.Set("active", fmt.Sprint(active))
23067 return c
23068 }
23069
23070
23071
23072 func (c *CreativesListCall) AdvertiserId(advertiserId int64) *CreativesListCall {
23073 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
23074 return c
23075 }
23076
23077
23078
23079 func (c *CreativesListCall) Archived(archived bool) *CreativesListCall {
23080 c.urlParams_.Set("archived", fmt.Sprint(archived))
23081 return c
23082 }
23083
23084
23085
23086 func (c *CreativesListCall) CampaignId(campaignId int64) *CreativesListCall {
23087 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
23088 return c
23089 }
23090
23091
23092
23093 func (c *CreativesListCall) CompanionCreativeIds(companionCreativeIds ...int64) *CreativesListCall {
23094 var companionCreativeIds_ []string
23095 for _, v := range companionCreativeIds {
23096 companionCreativeIds_ = append(companionCreativeIds_, fmt.Sprint(v))
23097 }
23098 c.urlParams_.SetMulti("companionCreativeIds", companionCreativeIds_)
23099 return c
23100 }
23101
23102
23103
23104 func (c *CreativesListCall) CreativeFieldIds(creativeFieldIds ...int64) *CreativesListCall {
23105 var creativeFieldIds_ []string
23106 for _, v := range creativeFieldIds {
23107 creativeFieldIds_ = append(creativeFieldIds_, fmt.Sprint(v))
23108 }
23109 c.urlParams_.SetMulti("creativeFieldIds", creativeFieldIds_)
23110 return c
23111 }
23112
23113
23114 func (c *CreativesListCall) Ids(ids ...int64) *CreativesListCall {
23115 var ids_ []string
23116 for _, v := range ids {
23117 ids_ = append(ids_, fmt.Sprint(v))
23118 }
23119 c.urlParams_.SetMulti("ids", ids_)
23120 return c
23121 }
23122
23123
23124
23125 func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall {
23126 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23127 return c
23128 }
23129
23130
23131
23132 func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall {
23133 c.urlParams_.Set("pageToken", pageToken)
23134 return c
23135 }
23136
23137
23138
23139 func (c *CreativesListCall) RenderingIds(renderingIds ...int64) *CreativesListCall {
23140 var renderingIds_ []string
23141 for _, v := range renderingIds {
23142 renderingIds_ = append(renderingIds_, fmt.Sprint(v))
23143 }
23144 c.urlParams_.SetMulti("renderingIds", renderingIds_)
23145 return c
23146 }
23147
23148
23149
23150
23151
23152
23153
23154
23155 func (c *CreativesListCall) SearchString(searchString string) *CreativesListCall {
23156 c.urlParams_.Set("searchString", searchString)
23157 return c
23158 }
23159
23160
23161
23162 func (c *CreativesListCall) SizeIds(sizeIds ...int64) *CreativesListCall {
23163 var sizeIds_ []string
23164 for _, v := range sizeIds {
23165 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
23166 }
23167 c.urlParams_.SetMulti("sizeIds", sizeIds_)
23168 return c
23169 }
23170
23171
23172
23173
23174
23175
23176
23177
23178 func (c *CreativesListCall) SortField(sortField string) *CreativesListCall {
23179 c.urlParams_.Set("sortField", sortField)
23180 return c
23181 }
23182
23183
23184
23185
23186
23187
23188
23189 func (c *CreativesListCall) SortOrder(sortOrder string) *CreativesListCall {
23190 c.urlParams_.Set("sortOrder", sortOrder)
23191 return c
23192 }
23193
23194
23195
23196 func (c *CreativesListCall) StudioCreativeId(studioCreativeId int64) *CreativesListCall {
23197 c.urlParams_.Set("studioCreativeId", fmt.Sprint(studioCreativeId))
23198 return c
23199 }
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231 func (c *CreativesListCall) Types(types ...string) *CreativesListCall {
23232 c.urlParams_.SetMulti("types", append([]string{}, types...))
23233 return c
23234 }
23235
23236
23237
23238
23239 func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall {
23240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23241 return c
23242 }
23243
23244
23245
23246
23247 func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall {
23248 c.ifNoneMatch_ = entityTag
23249 return c
23250 }
23251
23252
23253 func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
23254 c.ctx_ = ctx
23255 return c
23256 }
23257
23258
23259
23260 func (c *CreativesListCall) Header() http.Header {
23261 if c.header_ == nil {
23262 c.header_ = make(http.Header)
23263 }
23264 return c.header_
23265 }
23266
23267 func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
23268 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23269 if c.ifNoneMatch_ != "" {
23270 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23271 }
23272 var body io.Reader = nil
23273 c.urlParams_.Set("alt", alt)
23274 c.urlParams_.Set("prettyPrint", "false")
23275 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creatives")
23276 urls += "?" + c.urlParams_.Encode()
23277 req, err := http.NewRequest("GET", urls, body)
23278 if err != nil {
23279 return nil, err
23280 }
23281 req.Header = reqHeaders
23282 googleapi.Expand(req.URL, map[string]string{
23283 "profileId": strconv.FormatInt(c.profileId, 10),
23284 })
23285 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23286 }
23287
23288
23289
23290
23291
23292
23293
23294 func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesListResponse, error) {
23295 gensupport.SetOptions(c.urlParams_, opts...)
23296 res, err := c.doRequest("json")
23297 if res != nil && res.StatusCode == http.StatusNotModified {
23298 if res.Body != nil {
23299 res.Body.Close()
23300 }
23301 return nil, gensupport.WrapError(&googleapi.Error{
23302 Code: res.StatusCode,
23303 Header: res.Header,
23304 })
23305 }
23306 if err != nil {
23307 return nil, err
23308 }
23309 defer googleapi.CloseBody(res)
23310 if err := googleapi.CheckResponse(res); err != nil {
23311 return nil, gensupport.WrapError(err)
23312 }
23313 ret := &CreativesListResponse{
23314 ServerResponse: googleapi.ServerResponse{
23315 Header: res.Header,
23316 HTTPStatusCode: res.StatusCode,
23317 },
23318 }
23319 target := &ret
23320 if err := gensupport.DecodeResponse(target, res); err != nil {
23321 return nil, err
23322 }
23323 return ret, nil
23324 }
23325
23326
23327
23328
23329 func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesListResponse) error) error {
23330 c.ctx_ = ctx
23331 defer c.PageToken(c.urlParams_.Get("pageToken"))
23332 for {
23333 x, err := c.Do()
23334 if err != nil {
23335 return err
23336 }
23337 if err := f(x); err != nil {
23338 return err
23339 }
23340 if x.NextPageToken == "" {
23341 return nil
23342 }
23343 c.PageToken(x.NextPageToken)
23344 }
23345 }
23346
23347 type CreativesPatchCall struct {
23348 s *Service
23349 profileId int64
23350 creative *Creative
23351 urlParams_ gensupport.URLParams
23352 ctx_ context.Context
23353 header_ http.Header
23354 }
23355
23356
23357
23358
23359
23360 func (r *CreativesService) Patch(profileId int64, id int64, creative *Creative) *CreativesPatchCall {
23361 c := &CreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23362 c.profileId = profileId
23363 c.urlParams_.Set("id", fmt.Sprint(id))
23364 c.creative = creative
23365 return c
23366 }
23367
23368
23369
23370
23371 func (c *CreativesPatchCall) Fields(s ...googleapi.Field) *CreativesPatchCall {
23372 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23373 return c
23374 }
23375
23376
23377 func (c *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
23378 c.ctx_ = ctx
23379 return c
23380 }
23381
23382
23383
23384 func (c *CreativesPatchCall) Header() http.Header {
23385 if c.header_ == nil {
23386 c.header_ = make(http.Header)
23387 }
23388 return c.header_
23389 }
23390
23391 func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
23392 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23393 var body io.Reader = nil
23394 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
23395 if err != nil {
23396 return nil, err
23397 }
23398 c.urlParams_.Set("alt", alt)
23399 c.urlParams_.Set("prettyPrint", "false")
23400 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creatives")
23401 urls += "?" + c.urlParams_.Encode()
23402 req, err := http.NewRequest("PATCH", urls, body)
23403 if err != nil {
23404 return nil, err
23405 }
23406 req.Header = reqHeaders
23407 googleapi.Expand(req.URL, map[string]string{
23408 "profileId": strconv.FormatInt(c.profileId, 10),
23409 })
23410 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23411 }
23412
23413
23414
23415
23416
23417
23418 func (c *CreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
23419 gensupport.SetOptions(c.urlParams_, opts...)
23420 res, err := c.doRequest("json")
23421 if res != nil && res.StatusCode == http.StatusNotModified {
23422 if res.Body != nil {
23423 res.Body.Close()
23424 }
23425 return nil, gensupport.WrapError(&googleapi.Error{
23426 Code: res.StatusCode,
23427 Header: res.Header,
23428 })
23429 }
23430 if err != nil {
23431 return nil, err
23432 }
23433 defer googleapi.CloseBody(res)
23434 if err := googleapi.CheckResponse(res); err != nil {
23435 return nil, gensupport.WrapError(err)
23436 }
23437 ret := &Creative{
23438 ServerResponse: googleapi.ServerResponse{
23439 Header: res.Header,
23440 HTTPStatusCode: res.StatusCode,
23441 },
23442 }
23443 target := &ret
23444 if err := gensupport.DecodeResponse(target, res); err != nil {
23445 return nil, err
23446 }
23447 return ret, nil
23448 }
23449
23450 type CreativesUpdateCall struct {
23451 s *Service
23452 profileId int64
23453 creative *Creative
23454 urlParams_ gensupport.URLParams
23455 ctx_ context.Context
23456 header_ http.Header
23457 }
23458
23459
23460
23461
23462 func (r *CreativesService) Update(profileId int64, creative *Creative) *CreativesUpdateCall {
23463 c := &CreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23464 c.profileId = profileId
23465 c.creative = creative
23466 return c
23467 }
23468
23469
23470
23471
23472 func (c *CreativesUpdateCall) Fields(s ...googleapi.Field) *CreativesUpdateCall {
23473 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23474 return c
23475 }
23476
23477
23478 func (c *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
23479 c.ctx_ = ctx
23480 return c
23481 }
23482
23483
23484
23485 func (c *CreativesUpdateCall) Header() http.Header {
23486 if c.header_ == nil {
23487 c.header_ = make(http.Header)
23488 }
23489 return c.header_
23490 }
23491
23492 func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
23493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23494 var body io.Reader = nil
23495 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
23496 if err != nil {
23497 return nil, err
23498 }
23499 c.urlParams_.Set("alt", alt)
23500 c.urlParams_.Set("prettyPrint", "false")
23501 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/creatives")
23502 urls += "?" + c.urlParams_.Encode()
23503 req, err := http.NewRequest("PUT", urls, body)
23504 if err != nil {
23505 return nil, err
23506 }
23507 req.Header = reqHeaders
23508 googleapi.Expand(req.URL, map[string]string{
23509 "profileId": strconv.FormatInt(c.profileId, 10),
23510 })
23511 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23512 }
23513
23514
23515
23516
23517
23518
23519 func (c *CreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
23520 gensupport.SetOptions(c.urlParams_, opts...)
23521 res, err := c.doRequest("json")
23522 if res != nil && res.StatusCode == http.StatusNotModified {
23523 if res.Body != nil {
23524 res.Body.Close()
23525 }
23526 return nil, gensupport.WrapError(&googleapi.Error{
23527 Code: res.StatusCode,
23528 Header: res.Header,
23529 })
23530 }
23531 if err != nil {
23532 return nil, err
23533 }
23534 defer googleapi.CloseBody(res)
23535 if err := googleapi.CheckResponse(res); err != nil {
23536 return nil, gensupport.WrapError(err)
23537 }
23538 ret := &Creative{
23539 ServerResponse: googleapi.ServerResponse{
23540 Header: res.Header,
23541 HTTPStatusCode: res.StatusCode,
23542 },
23543 }
23544 target := &ret
23545 if err := gensupport.DecodeResponse(target, res); err != nil {
23546 return nil, err
23547 }
23548 return ret, nil
23549 }
23550
23551 type DimensionValuesQueryCall struct {
23552 s *Service
23553 profileId int64
23554 dimensionvaluerequest *DimensionValueRequest
23555 urlParams_ gensupport.URLParams
23556 ctx_ context.Context
23557 header_ http.Header
23558 }
23559
23560
23561
23562
23563 func (r *DimensionValuesService) Query(profileId int64, dimensionvaluerequest *DimensionValueRequest) *DimensionValuesQueryCall {
23564 c := &DimensionValuesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23565 c.profileId = profileId
23566 c.dimensionvaluerequest = dimensionvaluerequest
23567 return c
23568 }
23569
23570
23571
23572 func (c *DimensionValuesQueryCall) MaxResults(maxResults int64) *DimensionValuesQueryCall {
23573 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23574 return c
23575 }
23576
23577
23578
23579 func (c *DimensionValuesQueryCall) PageToken(pageToken string) *DimensionValuesQueryCall {
23580 c.urlParams_.Set("pageToken", pageToken)
23581 return c
23582 }
23583
23584
23585
23586
23587 func (c *DimensionValuesQueryCall) Fields(s ...googleapi.Field) *DimensionValuesQueryCall {
23588 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23589 return c
23590 }
23591
23592
23593 func (c *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
23594 c.ctx_ = ctx
23595 return c
23596 }
23597
23598
23599
23600 func (c *DimensionValuesQueryCall) Header() http.Header {
23601 if c.header_ == nil {
23602 c.header_ = make(http.Header)
23603 }
23604 return c.header_
23605 }
23606
23607 func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
23608 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23609 var body io.Reader = nil
23610 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
23611 if err != nil {
23612 return nil, err
23613 }
23614 c.urlParams_.Set("alt", alt)
23615 c.urlParams_.Set("prettyPrint", "false")
23616 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/dimensionvalues/query")
23617 urls += "?" + c.urlParams_.Encode()
23618 req, err := http.NewRequest("POST", urls, body)
23619 if err != nil {
23620 return nil, err
23621 }
23622 req.Header = reqHeaders
23623 googleapi.Expand(req.URL, map[string]string{
23624 "profileId": strconv.FormatInt(c.profileId, 10),
23625 })
23626 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23627 }
23628
23629
23630
23631
23632
23633
23634
23635 func (c *DimensionValuesQueryCall) Do(opts ...googleapi.CallOption) (*DimensionValueList, error) {
23636 gensupport.SetOptions(c.urlParams_, opts...)
23637 res, err := c.doRequest("json")
23638 if res != nil && res.StatusCode == http.StatusNotModified {
23639 if res.Body != nil {
23640 res.Body.Close()
23641 }
23642 return nil, gensupport.WrapError(&googleapi.Error{
23643 Code: res.StatusCode,
23644 Header: res.Header,
23645 })
23646 }
23647 if err != nil {
23648 return nil, err
23649 }
23650 defer googleapi.CloseBody(res)
23651 if err := googleapi.CheckResponse(res); err != nil {
23652 return nil, gensupport.WrapError(err)
23653 }
23654 ret := &DimensionValueList{
23655 ServerResponse: googleapi.ServerResponse{
23656 Header: res.Header,
23657 HTTPStatusCode: res.StatusCode,
23658 },
23659 }
23660 target := &ret
23661 if err := gensupport.DecodeResponse(target, res); err != nil {
23662 return nil, err
23663 }
23664 return ret, nil
23665 }
23666
23667
23668
23669
23670 func (c *DimensionValuesQueryCall) Pages(ctx context.Context, f func(*DimensionValueList) error) error {
23671 c.ctx_ = ctx
23672 defer c.PageToken(c.urlParams_.Get("pageToken"))
23673 for {
23674 x, err := c.Do()
23675 if err != nil {
23676 return err
23677 }
23678 if err := f(x); err != nil {
23679 return err
23680 }
23681 if x.NextPageToken == "" {
23682 return nil
23683 }
23684 c.PageToken(x.NextPageToken)
23685 }
23686 }
23687
23688 type DirectorySitesGetCall struct {
23689 s *Service
23690 profileId int64
23691 id int64
23692 urlParams_ gensupport.URLParams
23693 ifNoneMatch_ string
23694 ctx_ context.Context
23695 header_ http.Header
23696 }
23697
23698
23699
23700
23701
23702 func (r *DirectorySitesService) Get(profileId int64, id int64) *DirectorySitesGetCall {
23703 c := &DirectorySitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23704 c.profileId = profileId
23705 c.id = id
23706 return c
23707 }
23708
23709
23710
23711
23712 func (c *DirectorySitesGetCall) Fields(s ...googleapi.Field) *DirectorySitesGetCall {
23713 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23714 return c
23715 }
23716
23717
23718
23719
23720 func (c *DirectorySitesGetCall) IfNoneMatch(entityTag string) *DirectorySitesGetCall {
23721 c.ifNoneMatch_ = entityTag
23722 return c
23723 }
23724
23725
23726 func (c *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
23727 c.ctx_ = ctx
23728 return c
23729 }
23730
23731
23732
23733 func (c *DirectorySitesGetCall) Header() http.Header {
23734 if c.header_ == nil {
23735 c.header_ = make(http.Header)
23736 }
23737 return c.header_
23738 }
23739
23740 func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
23741 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
23742 if c.ifNoneMatch_ != "" {
23743 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23744 }
23745 var body io.Reader = nil
23746 c.urlParams_.Set("alt", alt)
23747 c.urlParams_.Set("prettyPrint", "false")
23748 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/directorySites/{+id}")
23749 urls += "?" + c.urlParams_.Encode()
23750 req, err := http.NewRequest("GET", urls, body)
23751 if err != nil {
23752 return nil, err
23753 }
23754 req.Header = reqHeaders
23755 googleapi.Expand(req.URL, map[string]string{
23756 "profileId": strconv.FormatInt(c.profileId, 10),
23757 "id": strconv.FormatInt(c.id, 10),
23758 })
23759 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23760 }
23761
23762
23763
23764
23765
23766
23767 func (c *DirectorySitesGetCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
23768 gensupport.SetOptions(c.urlParams_, opts...)
23769 res, err := c.doRequest("json")
23770 if res != nil && res.StatusCode == http.StatusNotModified {
23771 if res.Body != nil {
23772 res.Body.Close()
23773 }
23774 return nil, gensupport.WrapError(&googleapi.Error{
23775 Code: res.StatusCode,
23776 Header: res.Header,
23777 })
23778 }
23779 if err != nil {
23780 return nil, err
23781 }
23782 defer googleapi.CloseBody(res)
23783 if err := googleapi.CheckResponse(res); err != nil {
23784 return nil, gensupport.WrapError(err)
23785 }
23786 ret := &DirectorySite{
23787 ServerResponse: googleapi.ServerResponse{
23788 Header: res.Header,
23789 HTTPStatusCode: res.StatusCode,
23790 },
23791 }
23792 target := &ret
23793 if err := gensupport.DecodeResponse(target, res); err != nil {
23794 return nil, err
23795 }
23796 return ret, nil
23797 }
23798
23799 type DirectorySitesInsertCall struct {
23800 s *Service
23801 profileId int64
23802 directorysite *DirectorySite
23803 urlParams_ gensupport.URLParams
23804 ctx_ context.Context
23805 header_ http.Header
23806 }
23807
23808
23809
23810
23811 func (r *DirectorySitesService) Insert(profileId int64, directorysite *DirectorySite) *DirectorySitesInsertCall {
23812 c := &DirectorySitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23813 c.profileId = profileId
23814 c.directorysite = directorysite
23815 return c
23816 }
23817
23818
23819
23820
23821 func (c *DirectorySitesInsertCall) Fields(s ...googleapi.Field) *DirectorySitesInsertCall {
23822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
23823 return c
23824 }
23825
23826
23827 func (c *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
23828 c.ctx_ = ctx
23829 return c
23830 }
23831
23832
23833
23834 func (c *DirectorySitesInsertCall) Header() http.Header {
23835 if c.header_ == nil {
23836 c.header_ = make(http.Header)
23837 }
23838 return c.header_
23839 }
23840
23841 func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
23842 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
23843 var body io.Reader = nil
23844 body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
23845 if err != nil {
23846 return nil, err
23847 }
23848 c.urlParams_.Set("alt", alt)
23849 c.urlParams_.Set("prettyPrint", "false")
23850 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/directorySites")
23851 urls += "?" + c.urlParams_.Encode()
23852 req, err := http.NewRequest("POST", urls, body)
23853 if err != nil {
23854 return nil, err
23855 }
23856 req.Header = reqHeaders
23857 googleapi.Expand(req.URL, map[string]string{
23858 "profileId": strconv.FormatInt(c.profileId, 10),
23859 })
23860 return gensupport.SendRequest(c.ctx_, c.s.client, req)
23861 }
23862
23863
23864
23865
23866
23867
23868 func (c *DirectorySitesInsertCall) Do(opts ...googleapi.CallOption) (*DirectorySite, error) {
23869 gensupport.SetOptions(c.urlParams_, opts...)
23870 res, err := c.doRequest("json")
23871 if res != nil && res.StatusCode == http.StatusNotModified {
23872 if res.Body != nil {
23873 res.Body.Close()
23874 }
23875 return nil, gensupport.WrapError(&googleapi.Error{
23876 Code: res.StatusCode,
23877 Header: res.Header,
23878 })
23879 }
23880 if err != nil {
23881 return nil, err
23882 }
23883 defer googleapi.CloseBody(res)
23884 if err := googleapi.CheckResponse(res); err != nil {
23885 return nil, gensupport.WrapError(err)
23886 }
23887 ret := &DirectorySite{
23888 ServerResponse: googleapi.ServerResponse{
23889 Header: res.Header,
23890 HTTPStatusCode: res.StatusCode,
23891 },
23892 }
23893 target := &ret
23894 if err := gensupport.DecodeResponse(target, res); err != nil {
23895 return nil, err
23896 }
23897 return ret, nil
23898 }
23899
23900 type DirectorySitesListCall struct {
23901 s *Service
23902 profileId int64
23903 urlParams_ gensupport.URLParams
23904 ifNoneMatch_ string
23905 ctx_ context.Context
23906 header_ http.Header
23907 }
23908
23909
23910
23911
23912
23913 func (r *DirectorySitesService) List(profileId int64) *DirectorySitesListCall {
23914 c := &DirectorySitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23915 c.profileId = profileId
23916 return c
23917 }
23918
23919
23920
23921
23922 func (c *DirectorySitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *DirectorySitesListCall {
23923 c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
23924 return c
23925 }
23926
23927
23928
23929
23930 func (c *DirectorySitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *DirectorySitesListCall {
23931 c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
23932 return c
23933 }
23934
23935
23936
23937
23938 func (c *DirectorySitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *DirectorySitesListCall {
23939 c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
23940 return c
23941 }
23942
23943
23944
23945 func (c *DirectorySitesListCall) Active(active bool) *DirectorySitesListCall {
23946 c.urlParams_.Set("active", fmt.Sprint(active))
23947 return c
23948 }
23949
23950
23951
23952 func (c *DirectorySitesListCall) DfpNetworkCode(dfpNetworkCode string) *DirectorySitesListCall {
23953 c.urlParams_.Set("dfpNetworkCode", dfpNetworkCode)
23954 return c
23955 }
23956
23957
23958
23959 func (c *DirectorySitesListCall) Ids(ids ...int64) *DirectorySitesListCall {
23960 var ids_ []string
23961 for _, v := range ids {
23962 ids_ = append(ids_, fmt.Sprint(v))
23963 }
23964 c.urlParams_.SetMulti("ids", ids_)
23965 return c
23966 }
23967
23968
23969
23970 func (c *DirectorySitesListCall) MaxResults(maxResults int64) *DirectorySitesListCall {
23971 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23972 return c
23973 }
23974
23975
23976
23977 func (c *DirectorySitesListCall) PageToken(pageToken string) *DirectorySitesListCall {
23978 c.urlParams_.Set("pageToken", pageToken)
23979 return c
23980 }
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990 func (c *DirectorySitesListCall) SearchString(searchString string) *DirectorySitesListCall {
23991 c.urlParams_.Set("searchString", searchString)
23992 return c
23993 }
23994
23995
23996
23997
23998
23999
24000
24001
24002 func (c *DirectorySitesListCall) SortField(sortField string) *DirectorySitesListCall {
24003 c.urlParams_.Set("sortField", sortField)
24004 return c
24005 }
24006
24007
24008
24009
24010
24011
24012
24013 func (c *DirectorySitesListCall) SortOrder(sortOrder string) *DirectorySitesListCall {
24014 c.urlParams_.Set("sortOrder", sortOrder)
24015 return c
24016 }
24017
24018
24019
24020
24021 func (c *DirectorySitesListCall) Fields(s ...googleapi.Field) *DirectorySitesListCall {
24022 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24023 return c
24024 }
24025
24026
24027
24028
24029 func (c *DirectorySitesListCall) IfNoneMatch(entityTag string) *DirectorySitesListCall {
24030 c.ifNoneMatch_ = entityTag
24031 return c
24032 }
24033
24034
24035 func (c *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
24036 c.ctx_ = ctx
24037 return c
24038 }
24039
24040
24041
24042 func (c *DirectorySitesListCall) Header() http.Header {
24043 if c.header_ == nil {
24044 c.header_ = make(http.Header)
24045 }
24046 return c.header_
24047 }
24048
24049 func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
24050 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24051 if c.ifNoneMatch_ != "" {
24052 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24053 }
24054 var body io.Reader = nil
24055 c.urlParams_.Set("alt", alt)
24056 c.urlParams_.Set("prettyPrint", "false")
24057 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/directorySites")
24058 urls += "?" + c.urlParams_.Encode()
24059 req, err := http.NewRequest("GET", urls, body)
24060 if err != nil {
24061 return nil, err
24062 }
24063 req.Header = reqHeaders
24064 googleapi.Expand(req.URL, map[string]string{
24065 "profileId": strconv.FormatInt(c.profileId, 10),
24066 })
24067 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24068 }
24069
24070
24071
24072
24073
24074
24075
24076 func (c *DirectorySitesListCall) Do(opts ...googleapi.CallOption) (*DirectorySitesListResponse, error) {
24077 gensupport.SetOptions(c.urlParams_, opts...)
24078 res, err := c.doRequest("json")
24079 if res != nil && res.StatusCode == http.StatusNotModified {
24080 if res.Body != nil {
24081 res.Body.Close()
24082 }
24083 return nil, gensupport.WrapError(&googleapi.Error{
24084 Code: res.StatusCode,
24085 Header: res.Header,
24086 })
24087 }
24088 if err != nil {
24089 return nil, err
24090 }
24091 defer googleapi.CloseBody(res)
24092 if err := googleapi.CheckResponse(res); err != nil {
24093 return nil, gensupport.WrapError(err)
24094 }
24095 ret := &DirectorySitesListResponse{
24096 ServerResponse: googleapi.ServerResponse{
24097 Header: res.Header,
24098 HTTPStatusCode: res.StatusCode,
24099 },
24100 }
24101 target := &ret
24102 if err := gensupport.DecodeResponse(target, res); err != nil {
24103 return nil, err
24104 }
24105 return ret, nil
24106 }
24107
24108
24109
24110
24111 func (c *DirectorySitesListCall) Pages(ctx context.Context, f func(*DirectorySitesListResponse) error) error {
24112 c.ctx_ = ctx
24113 defer c.PageToken(c.urlParams_.Get("pageToken"))
24114 for {
24115 x, err := c.Do()
24116 if err != nil {
24117 return err
24118 }
24119 if err := f(x); err != nil {
24120 return err
24121 }
24122 if x.NextPageToken == "" {
24123 return nil
24124 }
24125 c.PageToken(x.NextPageToken)
24126 }
24127 }
24128
24129 type DynamicTargetingKeysDeleteCall struct {
24130 s *Service
24131 profileId int64
24132 objectId int64
24133 urlParams_ gensupport.URLParams
24134 ctx_ context.Context
24135 header_ http.Header
24136 }
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148 func (r *DynamicTargetingKeysService) Delete(profileId int64, objectId int64, name string, objectType string) *DynamicTargetingKeysDeleteCall {
24149 c := &DynamicTargetingKeysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24150 c.profileId = profileId
24151 c.objectId = objectId
24152 c.urlParams_.Set("name", name)
24153 c.urlParams_.Set("objectType", objectType)
24154 return c
24155 }
24156
24157
24158
24159
24160 func (c *DynamicTargetingKeysDeleteCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysDeleteCall {
24161 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24162 return c
24163 }
24164
24165
24166 func (c *DynamicTargetingKeysDeleteCall) Context(ctx context.Context) *DynamicTargetingKeysDeleteCall {
24167 c.ctx_ = ctx
24168 return c
24169 }
24170
24171
24172
24173 func (c *DynamicTargetingKeysDeleteCall) Header() http.Header {
24174 if c.header_ == nil {
24175 c.header_ = make(http.Header)
24176 }
24177 return c.header_
24178 }
24179
24180 func (c *DynamicTargetingKeysDeleteCall) doRequest(alt string) (*http.Response, error) {
24181 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24182 var body io.Reader = nil
24183 c.urlParams_.Set("alt", alt)
24184 c.urlParams_.Set("prettyPrint", "false")
24185 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/dynamicTargetingKeys/{+objectId}")
24186 urls += "?" + c.urlParams_.Encode()
24187 req, err := http.NewRequest("DELETE", urls, body)
24188 if err != nil {
24189 return nil, err
24190 }
24191 req.Header = reqHeaders
24192 googleapi.Expand(req.URL, map[string]string{
24193 "profileId": strconv.FormatInt(c.profileId, 10),
24194 "objectId": strconv.FormatInt(c.objectId, 10),
24195 })
24196 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24197 }
24198
24199
24200 func (c *DynamicTargetingKeysDeleteCall) Do(opts ...googleapi.CallOption) error {
24201 gensupport.SetOptions(c.urlParams_, opts...)
24202 res, err := c.doRequest("json")
24203 if err != nil {
24204 return err
24205 }
24206 defer googleapi.CloseBody(res)
24207 if err := googleapi.CheckResponse(res); err != nil {
24208 return gensupport.WrapError(err)
24209 }
24210 return nil
24211 }
24212
24213 type DynamicTargetingKeysInsertCall struct {
24214 s *Service
24215 profileId int64
24216 dynamictargetingkey *DynamicTargetingKey
24217 urlParams_ gensupport.URLParams
24218 ctx_ context.Context
24219 header_ http.Header
24220 }
24221
24222
24223
24224
24225
24226
24227
24228 func (r *DynamicTargetingKeysService) Insert(profileId int64, dynamictargetingkey *DynamicTargetingKey) *DynamicTargetingKeysInsertCall {
24229 c := &DynamicTargetingKeysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24230 c.profileId = profileId
24231 c.dynamictargetingkey = dynamictargetingkey
24232 return c
24233 }
24234
24235
24236
24237
24238 func (c *DynamicTargetingKeysInsertCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysInsertCall {
24239 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24240 return c
24241 }
24242
24243
24244 func (c *DynamicTargetingKeysInsertCall) Context(ctx context.Context) *DynamicTargetingKeysInsertCall {
24245 c.ctx_ = ctx
24246 return c
24247 }
24248
24249
24250
24251 func (c *DynamicTargetingKeysInsertCall) Header() http.Header {
24252 if c.header_ == nil {
24253 c.header_ = make(http.Header)
24254 }
24255 return c.header_
24256 }
24257
24258 func (c *DynamicTargetingKeysInsertCall) doRequest(alt string) (*http.Response, error) {
24259 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24260 var body io.Reader = nil
24261 body, err := googleapi.WithoutDataWrapper.JSONReader(c.dynamictargetingkey)
24262 if err != nil {
24263 return nil, err
24264 }
24265 c.urlParams_.Set("alt", alt)
24266 c.urlParams_.Set("prettyPrint", "false")
24267 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/dynamicTargetingKeys")
24268 urls += "?" + c.urlParams_.Encode()
24269 req, err := http.NewRequest("POST", urls, body)
24270 if err != nil {
24271 return nil, err
24272 }
24273 req.Header = reqHeaders
24274 googleapi.Expand(req.URL, map[string]string{
24275 "profileId": strconv.FormatInt(c.profileId, 10),
24276 })
24277 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24278 }
24279
24280
24281
24282
24283
24284
24285
24286 func (c *DynamicTargetingKeysInsertCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKey, error) {
24287 gensupport.SetOptions(c.urlParams_, opts...)
24288 res, err := c.doRequest("json")
24289 if res != nil && res.StatusCode == http.StatusNotModified {
24290 if res.Body != nil {
24291 res.Body.Close()
24292 }
24293 return nil, gensupport.WrapError(&googleapi.Error{
24294 Code: res.StatusCode,
24295 Header: res.Header,
24296 })
24297 }
24298 if err != nil {
24299 return nil, err
24300 }
24301 defer googleapi.CloseBody(res)
24302 if err := googleapi.CheckResponse(res); err != nil {
24303 return nil, gensupport.WrapError(err)
24304 }
24305 ret := &DynamicTargetingKey{
24306 ServerResponse: googleapi.ServerResponse{
24307 Header: res.Header,
24308 HTTPStatusCode: res.StatusCode,
24309 },
24310 }
24311 target := &ret
24312 if err := gensupport.DecodeResponse(target, res); err != nil {
24313 return nil, err
24314 }
24315 return ret, nil
24316 }
24317
24318 type DynamicTargetingKeysListCall struct {
24319 s *Service
24320 profileId int64
24321 urlParams_ gensupport.URLParams
24322 ifNoneMatch_ string
24323 ctx_ context.Context
24324 header_ http.Header
24325 }
24326
24327
24328
24329
24330 func (r *DynamicTargetingKeysService) List(profileId int64) *DynamicTargetingKeysListCall {
24331 c := &DynamicTargetingKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24332 c.profileId = profileId
24333 return c
24334 }
24335
24336
24337
24338 func (c *DynamicTargetingKeysListCall) AdvertiserId(advertiserId int64) *DynamicTargetingKeysListCall {
24339 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
24340 return c
24341 }
24342
24343
24344
24345 func (c *DynamicTargetingKeysListCall) Names(names ...string) *DynamicTargetingKeysListCall {
24346 c.urlParams_.SetMulti("names", append([]string{}, names...))
24347 return c
24348 }
24349
24350
24351
24352 func (c *DynamicTargetingKeysListCall) ObjectId(objectId int64) *DynamicTargetingKeysListCall {
24353 c.urlParams_.Set("objectId", fmt.Sprint(objectId))
24354 return c
24355 }
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366 func (c *DynamicTargetingKeysListCall) ObjectType(objectType string) *DynamicTargetingKeysListCall {
24367 c.urlParams_.Set("objectType", objectType)
24368 return c
24369 }
24370
24371
24372
24373
24374 func (c *DynamicTargetingKeysListCall) Fields(s ...googleapi.Field) *DynamicTargetingKeysListCall {
24375 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24376 return c
24377 }
24378
24379
24380
24381
24382 func (c *DynamicTargetingKeysListCall) IfNoneMatch(entityTag string) *DynamicTargetingKeysListCall {
24383 c.ifNoneMatch_ = entityTag
24384 return c
24385 }
24386
24387
24388 func (c *DynamicTargetingKeysListCall) Context(ctx context.Context) *DynamicTargetingKeysListCall {
24389 c.ctx_ = ctx
24390 return c
24391 }
24392
24393
24394
24395 func (c *DynamicTargetingKeysListCall) Header() http.Header {
24396 if c.header_ == nil {
24397 c.header_ = make(http.Header)
24398 }
24399 return c.header_
24400 }
24401
24402 func (c *DynamicTargetingKeysListCall) doRequest(alt string) (*http.Response, error) {
24403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24404 if c.ifNoneMatch_ != "" {
24405 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24406 }
24407 var body io.Reader = nil
24408 c.urlParams_.Set("alt", alt)
24409 c.urlParams_.Set("prettyPrint", "false")
24410 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/dynamicTargetingKeys")
24411 urls += "?" + c.urlParams_.Encode()
24412 req, err := http.NewRequest("GET", urls, body)
24413 if err != nil {
24414 return nil, err
24415 }
24416 req.Header = reqHeaders
24417 googleapi.Expand(req.URL, map[string]string{
24418 "profileId": strconv.FormatInt(c.profileId, 10),
24419 })
24420 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24421 }
24422
24423
24424
24425
24426
24427
24428
24429 func (c *DynamicTargetingKeysListCall) Do(opts ...googleapi.CallOption) (*DynamicTargetingKeysListResponse, error) {
24430 gensupport.SetOptions(c.urlParams_, opts...)
24431 res, err := c.doRequest("json")
24432 if res != nil && res.StatusCode == http.StatusNotModified {
24433 if res.Body != nil {
24434 res.Body.Close()
24435 }
24436 return nil, gensupport.WrapError(&googleapi.Error{
24437 Code: res.StatusCode,
24438 Header: res.Header,
24439 })
24440 }
24441 if err != nil {
24442 return nil, err
24443 }
24444 defer googleapi.CloseBody(res)
24445 if err := googleapi.CheckResponse(res); err != nil {
24446 return nil, gensupport.WrapError(err)
24447 }
24448 ret := &DynamicTargetingKeysListResponse{
24449 ServerResponse: googleapi.ServerResponse{
24450 Header: res.Header,
24451 HTTPStatusCode: res.StatusCode,
24452 },
24453 }
24454 target := &ret
24455 if err := gensupport.DecodeResponse(target, res); err != nil {
24456 return nil, err
24457 }
24458 return ret, nil
24459 }
24460
24461 type EventTagsDeleteCall struct {
24462 s *Service
24463 profileId int64
24464 id int64
24465 urlParams_ gensupport.URLParams
24466 ctx_ context.Context
24467 header_ http.Header
24468 }
24469
24470
24471
24472
24473
24474 func (r *EventTagsService) Delete(profileId int64, id int64) *EventTagsDeleteCall {
24475 c := &EventTagsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24476 c.profileId = profileId
24477 c.id = id
24478 return c
24479 }
24480
24481
24482
24483
24484 func (c *EventTagsDeleteCall) Fields(s ...googleapi.Field) *EventTagsDeleteCall {
24485 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24486 return c
24487 }
24488
24489
24490 func (c *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
24491 c.ctx_ = ctx
24492 return c
24493 }
24494
24495
24496
24497 func (c *EventTagsDeleteCall) Header() http.Header {
24498 if c.header_ == nil {
24499 c.header_ = make(http.Header)
24500 }
24501 return c.header_
24502 }
24503
24504 func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
24505 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24506 var body io.Reader = nil
24507 c.urlParams_.Set("alt", alt)
24508 c.urlParams_.Set("prettyPrint", "false")
24509 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags/{+id}")
24510 urls += "?" + c.urlParams_.Encode()
24511 req, err := http.NewRequest("DELETE", urls, body)
24512 if err != nil {
24513 return nil, err
24514 }
24515 req.Header = reqHeaders
24516 googleapi.Expand(req.URL, map[string]string{
24517 "profileId": strconv.FormatInt(c.profileId, 10),
24518 "id": strconv.FormatInt(c.id, 10),
24519 })
24520 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24521 }
24522
24523
24524 func (c *EventTagsDeleteCall) Do(opts ...googleapi.CallOption) error {
24525 gensupport.SetOptions(c.urlParams_, opts...)
24526 res, err := c.doRequest("json")
24527 if err != nil {
24528 return err
24529 }
24530 defer googleapi.CloseBody(res)
24531 if err := googleapi.CheckResponse(res); err != nil {
24532 return gensupport.WrapError(err)
24533 }
24534 return nil
24535 }
24536
24537 type EventTagsGetCall struct {
24538 s *Service
24539 profileId int64
24540 id int64
24541 urlParams_ gensupport.URLParams
24542 ifNoneMatch_ string
24543 ctx_ context.Context
24544 header_ http.Header
24545 }
24546
24547
24548
24549
24550
24551 func (r *EventTagsService) Get(profileId int64, id int64) *EventTagsGetCall {
24552 c := &EventTagsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24553 c.profileId = profileId
24554 c.id = id
24555 return c
24556 }
24557
24558
24559
24560
24561 func (c *EventTagsGetCall) Fields(s ...googleapi.Field) *EventTagsGetCall {
24562 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24563 return c
24564 }
24565
24566
24567
24568
24569 func (c *EventTagsGetCall) IfNoneMatch(entityTag string) *EventTagsGetCall {
24570 c.ifNoneMatch_ = entityTag
24571 return c
24572 }
24573
24574
24575 func (c *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
24576 c.ctx_ = ctx
24577 return c
24578 }
24579
24580
24581
24582 func (c *EventTagsGetCall) Header() http.Header {
24583 if c.header_ == nil {
24584 c.header_ = make(http.Header)
24585 }
24586 return c.header_
24587 }
24588
24589 func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
24590 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24591 if c.ifNoneMatch_ != "" {
24592 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24593 }
24594 var body io.Reader = nil
24595 c.urlParams_.Set("alt", alt)
24596 c.urlParams_.Set("prettyPrint", "false")
24597 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags/{+id}")
24598 urls += "?" + c.urlParams_.Encode()
24599 req, err := http.NewRequest("GET", urls, body)
24600 if err != nil {
24601 return nil, err
24602 }
24603 req.Header = reqHeaders
24604 googleapi.Expand(req.URL, map[string]string{
24605 "profileId": strconv.FormatInt(c.profileId, 10),
24606 "id": strconv.FormatInt(c.id, 10),
24607 })
24608 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24609 }
24610
24611
24612
24613
24614
24615
24616 func (c *EventTagsGetCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
24617 gensupport.SetOptions(c.urlParams_, opts...)
24618 res, err := c.doRequest("json")
24619 if res != nil && res.StatusCode == http.StatusNotModified {
24620 if res.Body != nil {
24621 res.Body.Close()
24622 }
24623 return nil, gensupport.WrapError(&googleapi.Error{
24624 Code: res.StatusCode,
24625 Header: res.Header,
24626 })
24627 }
24628 if err != nil {
24629 return nil, err
24630 }
24631 defer googleapi.CloseBody(res)
24632 if err := googleapi.CheckResponse(res); err != nil {
24633 return nil, gensupport.WrapError(err)
24634 }
24635 ret := &EventTag{
24636 ServerResponse: googleapi.ServerResponse{
24637 Header: res.Header,
24638 HTTPStatusCode: res.StatusCode,
24639 },
24640 }
24641 target := &ret
24642 if err := gensupport.DecodeResponse(target, res); err != nil {
24643 return nil, err
24644 }
24645 return ret, nil
24646 }
24647
24648 type EventTagsInsertCall struct {
24649 s *Service
24650 profileId int64
24651 eventtag *EventTag
24652 urlParams_ gensupport.URLParams
24653 ctx_ context.Context
24654 header_ http.Header
24655 }
24656
24657
24658
24659
24660 func (r *EventTagsService) Insert(profileId int64, eventtag *EventTag) *EventTagsInsertCall {
24661 c := &EventTagsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24662 c.profileId = profileId
24663 c.eventtag = eventtag
24664 return c
24665 }
24666
24667
24668
24669
24670 func (c *EventTagsInsertCall) Fields(s ...googleapi.Field) *EventTagsInsertCall {
24671 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24672 return c
24673 }
24674
24675
24676 func (c *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
24677 c.ctx_ = ctx
24678 return c
24679 }
24680
24681
24682
24683 func (c *EventTagsInsertCall) Header() http.Header {
24684 if c.header_ == nil {
24685 c.header_ = make(http.Header)
24686 }
24687 return c.header_
24688 }
24689
24690 func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
24691 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
24692 var body io.Reader = nil
24693 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
24694 if err != nil {
24695 return nil, err
24696 }
24697 c.urlParams_.Set("alt", alt)
24698 c.urlParams_.Set("prettyPrint", "false")
24699 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags")
24700 urls += "?" + c.urlParams_.Encode()
24701 req, err := http.NewRequest("POST", urls, body)
24702 if err != nil {
24703 return nil, err
24704 }
24705 req.Header = reqHeaders
24706 googleapi.Expand(req.URL, map[string]string{
24707 "profileId": strconv.FormatInt(c.profileId, 10),
24708 })
24709 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24710 }
24711
24712
24713
24714
24715
24716
24717 func (c *EventTagsInsertCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
24718 gensupport.SetOptions(c.urlParams_, opts...)
24719 res, err := c.doRequest("json")
24720 if res != nil && res.StatusCode == http.StatusNotModified {
24721 if res.Body != nil {
24722 res.Body.Close()
24723 }
24724 return nil, gensupport.WrapError(&googleapi.Error{
24725 Code: res.StatusCode,
24726 Header: res.Header,
24727 })
24728 }
24729 if err != nil {
24730 return nil, err
24731 }
24732 defer googleapi.CloseBody(res)
24733 if err := googleapi.CheckResponse(res); err != nil {
24734 return nil, gensupport.WrapError(err)
24735 }
24736 ret := &EventTag{
24737 ServerResponse: googleapi.ServerResponse{
24738 Header: res.Header,
24739 HTTPStatusCode: res.StatusCode,
24740 },
24741 }
24742 target := &ret
24743 if err := gensupport.DecodeResponse(target, res); err != nil {
24744 return nil, err
24745 }
24746 return ret, nil
24747 }
24748
24749 type EventTagsListCall struct {
24750 s *Service
24751 profileId int64
24752 urlParams_ gensupport.URLParams
24753 ifNoneMatch_ string
24754 ctx_ context.Context
24755 header_ http.Header
24756 }
24757
24758
24759
24760
24761 func (r *EventTagsService) List(profileId int64) *EventTagsListCall {
24762 c := &EventTagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24763 c.profileId = profileId
24764 return c
24765 }
24766
24767
24768
24769 func (c *EventTagsListCall) AdId(adId int64) *EventTagsListCall {
24770 c.urlParams_.Set("adId", fmt.Sprint(adId))
24771 return c
24772 }
24773
24774
24775
24776 func (c *EventTagsListCall) AdvertiserId(advertiserId int64) *EventTagsListCall {
24777 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
24778 return c
24779 }
24780
24781
24782
24783 func (c *EventTagsListCall) CampaignId(campaignId int64) *EventTagsListCall {
24784 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
24785 return c
24786 }
24787
24788
24789
24790
24791
24792
24793
24794
24795 func (c *EventTagsListCall) DefinitionsOnly(definitionsOnly bool) *EventTagsListCall {
24796 c.urlParams_.Set("definitionsOnly", fmt.Sprint(definitionsOnly))
24797 return c
24798 }
24799
24800
24801
24802
24803
24804
24805
24806
24807 func (c *EventTagsListCall) Enabled(enabled bool) *EventTagsListCall {
24808 c.urlParams_.Set("enabled", fmt.Sprint(enabled))
24809 return c
24810 }
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830 func (c *EventTagsListCall) EventTagTypes(eventTagTypes ...string) *EventTagsListCall {
24831 c.urlParams_.SetMulti("eventTagTypes", append([]string{}, eventTagTypes...))
24832 return c
24833 }
24834
24835
24836
24837 func (c *EventTagsListCall) Ids(ids ...int64) *EventTagsListCall {
24838 var ids_ []string
24839 for _, v := range ids {
24840 ids_ = append(ids_, fmt.Sprint(v))
24841 }
24842 c.urlParams_.SetMulti("ids", ids_)
24843 return c
24844 }
24845
24846
24847
24848
24849
24850
24851
24852
24853 func (c *EventTagsListCall) SearchString(searchString string) *EventTagsListCall {
24854 c.urlParams_.Set("searchString", searchString)
24855 return c
24856 }
24857
24858
24859
24860
24861
24862
24863
24864
24865 func (c *EventTagsListCall) SortField(sortField string) *EventTagsListCall {
24866 c.urlParams_.Set("sortField", sortField)
24867 return c
24868 }
24869
24870
24871
24872
24873
24874
24875
24876 func (c *EventTagsListCall) SortOrder(sortOrder string) *EventTagsListCall {
24877 c.urlParams_.Set("sortOrder", sortOrder)
24878 return c
24879 }
24880
24881
24882
24883
24884 func (c *EventTagsListCall) Fields(s ...googleapi.Field) *EventTagsListCall {
24885 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24886 return c
24887 }
24888
24889
24890
24891
24892 func (c *EventTagsListCall) IfNoneMatch(entityTag string) *EventTagsListCall {
24893 c.ifNoneMatch_ = entityTag
24894 return c
24895 }
24896
24897
24898 func (c *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
24899 c.ctx_ = ctx
24900 return c
24901 }
24902
24903
24904
24905 func (c *EventTagsListCall) Header() http.Header {
24906 if c.header_ == nil {
24907 c.header_ = make(http.Header)
24908 }
24909 return c.header_
24910 }
24911
24912 func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
24913 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
24914 if c.ifNoneMatch_ != "" {
24915 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24916 }
24917 var body io.Reader = nil
24918 c.urlParams_.Set("alt", alt)
24919 c.urlParams_.Set("prettyPrint", "false")
24920 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags")
24921 urls += "?" + c.urlParams_.Encode()
24922 req, err := http.NewRequest("GET", urls, body)
24923 if err != nil {
24924 return nil, err
24925 }
24926 req.Header = reqHeaders
24927 googleapi.Expand(req.URL, map[string]string{
24928 "profileId": strconv.FormatInt(c.profileId, 10),
24929 })
24930 return gensupport.SendRequest(c.ctx_, c.s.client, req)
24931 }
24932
24933
24934
24935
24936
24937
24938
24939 func (c *EventTagsListCall) Do(opts ...googleapi.CallOption) (*EventTagsListResponse, error) {
24940 gensupport.SetOptions(c.urlParams_, opts...)
24941 res, err := c.doRequest("json")
24942 if res != nil && res.StatusCode == http.StatusNotModified {
24943 if res.Body != nil {
24944 res.Body.Close()
24945 }
24946 return nil, gensupport.WrapError(&googleapi.Error{
24947 Code: res.StatusCode,
24948 Header: res.Header,
24949 })
24950 }
24951 if err != nil {
24952 return nil, err
24953 }
24954 defer googleapi.CloseBody(res)
24955 if err := googleapi.CheckResponse(res); err != nil {
24956 return nil, gensupport.WrapError(err)
24957 }
24958 ret := &EventTagsListResponse{
24959 ServerResponse: googleapi.ServerResponse{
24960 Header: res.Header,
24961 HTTPStatusCode: res.StatusCode,
24962 },
24963 }
24964 target := &ret
24965 if err := gensupport.DecodeResponse(target, res); err != nil {
24966 return nil, err
24967 }
24968 return ret, nil
24969 }
24970
24971 type EventTagsPatchCall struct {
24972 s *Service
24973 profileId int64
24974 eventtag *EventTag
24975 urlParams_ gensupport.URLParams
24976 ctx_ context.Context
24977 header_ http.Header
24978 }
24979
24980
24981
24982
24983
24984 func (r *EventTagsService) Patch(profileId int64, id int64, eventtag *EventTag) *EventTagsPatchCall {
24985 c := &EventTagsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24986 c.profileId = profileId
24987 c.urlParams_.Set("id", fmt.Sprint(id))
24988 c.eventtag = eventtag
24989 return c
24990 }
24991
24992
24993
24994
24995 func (c *EventTagsPatchCall) Fields(s ...googleapi.Field) *EventTagsPatchCall {
24996 c.urlParams_.Set("fields", googleapi.CombineFields(s))
24997 return c
24998 }
24999
25000
25001 func (c *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
25002 c.ctx_ = ctx
25003 return c
25004 }
25005
25006
25007
25008 func (c *EventTagsPatchCall) Header() http.Header {
25009 if c.header_ == nil {
25010 c.header_ = make(http.Header)
25011 }
25012 return c.header_
25013 }
25014
25015 func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
25016 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25017 var body io.Reader = nil
25018 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
25019 if err != nil {
25020 return nil, err
25021 }
25022 c.urlParams_.Set("alt", alt)
25023 c.urlParams_.Set("prettyPrint", "false")
25024 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags")
25025 urls += "?" + c.urlParams_.Encode()
25026 req, err := http.NewRequest("PATCH", urls, body)
25027 if err != nil {
25028 return nil, err
25029 }
25030 req.Header = reqHeaders
25031 googleapi.Expand(req.URL, map[string]string{
25032 "profileId": strconv.FormatInt(c.profileId, 10),
25033 })
25034 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25035 }
25036
25037
25038
25039
25040
25041
25042 func (c *EventTagsPatchCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
25043 gensupport.SetOptions(c.urlParams_, opts...)
25044 res, err := c.doRequest("json")
25045 if res != nil && res.StatusCode == http.StatusNotModified {
25046 if res.Body != nil {
25047 res.Body.Close()
25048 }
25049 return nil, gensupport.WrapError(&googleapi.Error{
25050 Code: res.StatusCode,
25051 Header: res.Header,
25052 })
25053 }
25054 if err != nil {
25055 return nil, err
25056 }
25057 defer googleapi.CloseBody(res)
25058 if err := googleapi.CheckResponse(res); err != nil {
25059 return nil, gensupport.WrapError(err)
25060 }
25061 ret := &EventTag{
25062 ServerResponse: googleapi.ServerResponse{
25063 Header: res.Header,
25064 HTTPStatusCode: res.StatusCode,
25065 },
25066 }
25067 target := &ret
25068 if err := gensupport.DecodeResponse(target, res); err != nil {
25069 return nil, err
25070 }
25071 return ret, nil
25072 }
25073
25074 type EventTagsUpdateCall struct {
25075 s *Service
25076 profileId int64
25077 eventtag *EventTag
25078 urlParams_ gensupport.URLParams
25079 ctx_ context.Context
25080 header_ http.Header
25081 }
25082
25083
25084
25085
25086 func (r *EventTagsService) Update(profileId int64, eventtag *EventTag) *EventTagsUpdateCall {
25087 c := &EventTagsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25088 c.profileId = profileId
25089 c.eventtag = eventtag
25090 return c
25091 }
25092
25093
25094
25095
25096 func (c *EventTagsUpdateCall) Fields(s ...googleapi.Field) *EventTagsUpdateCall {
25097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25098 return c
25099 }
25100
25101
25102 func (c *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
25103 c.ctx_ = ctx
25104 return c
25105 }
25106
25107
25108
25109 func (c *EventTagsUpdateCall) Header() http.Header {
25110 if c.header_ == nil {
25111 c.header_ = make(http.Header)
25112 }
25113 return c.header_
25114 }
25115
25116 func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
25117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25118 var body io.Reader = nil
25119 body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
25120 if err != nil {
25121 return nil, err
25122 }
25123 c.urlParams_.Set("alt", alt)
25124 c.urlParams_.Set("prettyPrint", "false")
25125 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/eventTags")
25126 urls += "?" + c.urlParams_.Encode()
25127 req, err := http.NewRequest("PUT", urls, body)
25128 if err != nil {
25129 return nil, err
25130 }
25131 req.Header = reqHeaders
25132 googleapi.Expand(req.URL, map[string]string{
25133 "profileId": strconv.FormatInt(c.profileId, 10),
25134 })
25135 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25136 }
25137
25138
25139
25140
25141
25142
25143 func (c *EventTagsUpdateCall) Do(opts ...googleapi.CallOption) (*EventTag, error) {
25144 gensupport.SetOptions(c.urlParams_, opts...)
25145 res, err := c.doRequest("json")
25146 if res != nil && res.StatusCode == http.StatusNotModified {
25147 if res.Body != nil {
25148 res.Body.Close()
25149 }
25150 return nil, gensupport.WrapError(&googleapi.Error{
25151 Code: res.StatusCode,
25152 Header: res.Header,
25153 })
25154 }
25155 if err != nil {
25156 return nil, err
25157 }
25158 defer googleapi.CloseBody(res)
25159 if err := googleapi.CheckResponse(res); err != nil {
25160 return nil, gensupport.WrapError(err)
25161 }
25162 ret := &EventTag{
25163 ServerResponse: googleapi.ServerResponse{
25164 Header: res.Header,
25165 HTTPStatusCode: res.StatusCode,
25166 },
25167 }
25168 target := &ret
25169 if err := gensupport.DecodeResponse(target, res); err != nil {
25170 return nil, err
25171 }
25172 return ret, nil
25173 }
25174
25175 type FilesGetCall struct {
25176 s *Service
25177 reportId int64
25178 fileId int64
25179 urlParams_ gensupport.URLParams
25180 ifNoneMatch_ string
25181 ctx_ context.Context
25182 header_ http.Header
25183 }
25184
25185
25186
25187
25188
25189
25190 func (r *FilesService) Get(reportId int64, fileId int64) *FilesGetCall {
25191 c := &FilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25192 c.reportId = reportId
25193 c.fileId = fileId
25194 return c
25195 }
25196
25197
25198
25199
25200 func (c *FilesGetCall) Fields(s ...googleapi.Field) *FilesGetCall {
25201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25202 return c
25203 }
25204
25205
25206
25207
25208 func (c *FilesGetCall) IfNoneMatch(entityTag string) *FilesGetCall {
25209 c.ifNoneMatch_ = entityTag
25210 return c
25211 }
25212
25213
25214 func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
25215 c.ctx_ = ctx
25216 return c
25217 }
25218
25219
25220
25221 func (c *FilesGetCall) Header() http.Header {
25222 if c.header_ == nil {
25223 c.header_ = make(http.Header)
25224 }
25225 return c.header_
25226 }
25227
25228 func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
25229 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25230 if c.ifNoneMatch_ != "" {
25231 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25232 }
25233 var body io.Reader = nil
25234 c.urlParams_.Set("alt", alt)
25235 c.urlParams_.Set("prettyPrint", "false")
25236 urls := googleapi.ResolveRelative(c.s.BasePath, "reports/{reportId}/files/{fileId}")
25237 urls += "?" + c.urlParams_.Encode()
25238 req, err := http.NewRequest("GET", urls, body)
25239 if err != nil {
25240 return nil, err
25241 }
25242 req.Header = reqHeaders
25243 googleapi.Expand(req.URL, map[string]string{
25244 "reportId": strconv.FormatInt(c.reportId, 10),
25245 "fileId": strconv.FormatInt(c.fileId, 10),
25246 })
25247 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25248 }
25249
25250
25251
25252
25253 func (c *FilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
25254 gensupport.SetOptions(c.urlParams_, opts...)
25255 res, err := c.doRequest("media")
25256 if err != nil {
25257 return nil, err
25258 }
25259 if err := googleapi.CheckResponse(res); err != nil {
25260 res.Body.Close()
25261 return nil, gensupport.WrapError(err)
25262 }
25263 return res, nil
25264 }
25265
25266
25267
25268
25269
25270
25271 func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
25272 gensupport.SetOptions(c.urlParams_, opts...)
25273 res, err := c.doRequest("json")
25274 if res != nil && res.StatusCode == http.StatusNotModified {
25275 if res.Body != nil {
25276 res.Body.Close()
25277 }
25278 return nil, gensupport.WrapError(&googleapi.Error{
25279 Code: res.StatusCode,
25280 Header: res.Header,
25281 })
25282 }
25283 if err != nil {
25284 return nil, err
25285 }
25286 defer googleapi.CloseBody(res)
25287 if err := googleapi.CheckResponse(res); err != nil {
25288 return nil, gensupport.WrapError(err)
25289 }
25290 ret := &File{
25291 ServerResponse: googleapi.ServerResponse{
25292 Header: res.Header,
25293 HTTPStatusCode: res.StatusCode,
25294 },
25295 }
25296 target := &ret
25297 if err := gensupport.DecodeResponse(target, res); err != nil {
25298 return nil, err
25299 }
25300 return ret, nil
25301 }
25302
25303 type FilesListCall struct {
25304 s *Service
25305 profileId int64
25306 urlParams_ gensupport.URLParams
25307 ifNoneMatch_ string
25308 ctx_ context.Context
25309 header_ http.Header
25310 }
25311
25312
25313
25314
25315 func (r *FilesService) List(profileId int64) *FilesListCall {
25316 c := &FilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25317 c.profileId = profileId
25318 return c
25319 }
25320
25321
25322
25323 func (c *FilesListCall) MaxResults(maxResults int64) *FilesListCall {
25324 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25325 return c
25326 }
25327
25328
25329
25330 func (c *FilesListCall) PageToken(pageToken string) *FilesListCall {
25331 c.urlParams_.Set("pageToken", pageToken)
25332 return c
25333 }
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343 func (c *FilesListCall) Scope(scope string) *FilesListCall {
25344 c.urlParams_.Set("scope", scope)
25345 return c
25346 }
25347
25348
25349
25350
25351
25352
25353
25354
25355 func (c *FilesListCall) SortField(sortField string) *FilesListCall {
25356 c.urlParams_.Set("sortField", sortField)
25357 return c
25358 }
25359
25360
25361
25362
25363
25364
25365
25366 func (c *FilesListCall) SortOrder(sortOrder string) *FilesListCall {
25367 c.urlParams_.Set("sortOrder", sortOrder)
25368 return c
25369 }
25370
25371
25372
25373
25374 func (c *FilesListCall) Fields(s ...googleapi.Field) *FilesListCall {
25375 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25376 return c
25377 }
25378
25379
25380
25381
25382 func (c *FilesListCall) IfNoneMatch(entityTag string) *FilesListCall {
25383 c.ifNoneMatch_ = entityTag
25384 return c
25385 }
25386
25387
25388 func (c *FilesListCall) Context(ctx context.Context) *FilesListCall {
25389 c.ctx_ = ctx
25390 return c
25391 }
25392
25393
25394
25395 func (c *FilesListCall) Header() http.Header {
25396 if c.header_ == nil {
25397 c.header_ = make(http.Header)
25398 }
25399 return c.header_
25400 }
25401
25402 func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
25403 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25404 if c.ifNoneMatch_ != "" {
25405 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25406 }
25407 var body io.Reader = nil
25408 c.urlParams_.Set("alt", alt)
25409 c.urlParams_.Set("prettyPrint", "false")
25410 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/files")
25411 urls += "?" + c.urlParams_.Encode()
25412 req, err := http.NewRequest("GET", urls, body)
25413 if err != nil {
25414 return nil, err
25415 }
25416 req.Header = reqHeaders
25417 googleapi.Expand(req.URL, map[string]string{
25418 "profileId": strconv.FormatInt(c.profileId, 10),
25419 })
25420 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25421 }
25422
25423
25424
25425
25426
25427
25428 func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
25429 gensupport.SetOptions(c.urlParams_, opts...)
25430 res, err := c.doRequest("json")
25431 if res != nil && res.StatusCode == http.StatusNotModified {
25432 if res.Body != nil {
25433 res.Body.Close()
25434 }
25435 return nil, gensupport.WrapError(&googleapi.Error{
25436 Code: res.StatusCode,
25437 Header: res.Header,
25438 })
25439 }
25440 if err != nil {
25441 return nil, err
25442 }
25443 defer googleapi.CloseBody(res)
25444 if err := googleapi.CheckResponse(res); err != nil {
25445 return nil, gensupport.WrapError(err)
25446 }
25447 ret := &FileList{
25448 ServerResponse: googleapi.ServerResponse{
25449 Header: res.Header,
25450 HTTPStatusCode: res.StatusCode,
25451 },
25452 }
25453 target := &ret
25454 if err := gensupport.DecodeResponse(target, res); err != nil {
25455 return nil, err
25456 }
25457 return ret, nil
25458 }
25459
25460
25461
25462
25463 func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
25464 c.ctx_ = ctx
25465 defer c.PageToken(c.urlParams_.Get("pageToken"))
25466 for {
25467 x, err := c.Do()
25468 if err != nil {
25469 return err
25470 }
25471 if err := f(x); err != nil {
25472 return err
25473 }
25474 if x.NextPageToken == "" {
25475 return nil
25476 }
25477 c.PageToken(x.NextPageToken)
25478 }
25479 }
25480
25481 type FloodlightActivitiesDeleteCall struct {
25482 s *Service
25483 profileId int64
25484 id int64
25485 urlParams_ gensupport.URLParams
25486 ctx_ context.Context
25487 header_ http.Header
25488 }
25489
25490
25491
25492
25493
25494 func (r *FloodlightActivitiesService) Delete(profileId int64, id int64) *FloodlightActivitiesDeleteCall {
25495 c := &FloodlightActivitiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25496 c.profileId = profileId
25497 c.id = id
25498 return c
25499 }
25500
25501
25502
25503
25504 func (c *FloodlightActivitiesDeleteCall) Fields(s ...googleapi.Field) *FloodlightActivitiesDeleteCall {
25505 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25506 return c
25507 }
25508
25509
25510 func (c *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
25511 c.ctx_ = ctx
25512 return c
25513 }
25514
25515
25516
25517 func (c *FloodlightActivitiesDeleteCall) Header() http.Header {
25518 if c.header_ == nil {
25519 c.header_ = make(http.Header)
25520 }
25521 return c.header_
25522 }
25523
25524 func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
25525 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25526 var body io.Reader = nil
25527 c.urlParams_.Set("alt", alt)
25528 c.urlParams_.Set("prettyPrint", "false")
25529 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities/{+id}")
25530 urls += "?" + c.urlParams_.Encode()
25531 req, err := http.NewRequest("DELETE", urls, body)
25532 if err != nil {
25533 return nil, err
25534 }
25535 req.Header = reqHeaders
25536 googleapi.Expand(req.URL, map[string]string{
25537 "profileId": strconv.FormatInt(c.profileId, 10),
25538 "id": strconv.FormatInt(c.id, 10),
25539 })
25540 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25541 }
25542
25543
25544 func (c *FloodlightActivitiesDeleteCall) Do(opts ...googleapi.CallOption) error {
25545 gensupport.SetOptions(c.urlParams_, opts...)
25546 res, err := c.doRequest("json")
25547 if err != nil {
25548 return err
25549 }
25550 defer googleapi.CloseBody(res)
25551 if err := googleapi.CheckResponse(res); err != nil {
25552 return gensupport.WrapError(err)
25553 }
25554 return nil
25555 }
25556
25557 type FloodlightActivitiesGeneratetagCall struct {
25558 s *Service
25559 profileId int64
25560 urlParams_ gensupport.URLParams
25561 ctx_ context.Context
25562 header_ http.Header
25563 }
25564
25565
25566
25567
25568 func (r *FloodlightActivitiesService) Generatetag(profileId int64) *FloodlightActivitiesGeneratetagCall {
25569 c := &FloodlightActivitiesGeneratetagCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25570 c.profileId = profileId
25571 return c
25572 }
25573
25574
25575
25576 func (c *FloodlightActivitiesGeneratetagCall) FloodlightActivityId(floodlightActivityId int64) *FloodlightActivitiesGeneratetagCall {
25577 c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
25578 return c
25579 }
25580
25581
25582
25583
25584 func (c *FloodlightActivitiesGeneratetagCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGeneratetagCall {
25585 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25586 return c
25587 }
25588
25589
25590 func (c *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
25591 c.ctx_ = ctx
25592 return c
25593 }
25594
25595
25596
25597 func (c *FloodlightActivitiesGeneratetagCall) Header() http.Header {
25598 if c.header_ == nil {
25599 c.header_ = make(http.Header)
25600 }
25601 return c.header_
25602 }
25603
25604 func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
25605 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25606 var body io.Reader = nil
25607 c.urlParams_.Set("alt", alt)
25608 c.urlParams_.Set("prettyPrint", "false")
25609 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities/generatetag")
25610 urls += "?" + c.urlParams_.Encode()
25611 req, err := http.NewRequest("POST", urls, body)
25612 if err != nil {
25613 return nil, err
25614 }
25615 req.Header = reqHeaders
25616 googleapi.Expand(req.URL, map[string]string{
25617 "profileId": strconv.FormatInt(c.profileId, 10),
25618 })
25619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25620 }
25621
25622
25623
25624
25625
25626
25627
25628 func (c *FloodlightActivitiesGeneratetagCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesGenerateTagResponse, error) {
25629 gensupport.SetOptions(c.urlParams_, opts...)
25630 res, err := c.doRequest("json")
25631 if res != nil && res.StatusCode == http.StatusNotModified {
25632 if res.Body != nil {
25633 res.Body.Close()
25634 }
25635 return nil, gensupport.WrapError(&googleapi.Error{
25636 Code: res.StatusCode,
25637 Header: res.Header,
25638 })
25639 }
25640 if err != nil {
25641 return nil, err
25642 }
25643 defer googleapi.CloseBody(res)
25644 if err := googleapi.CheckResponse(res); err != nil {
25645 return nil, gensupport.WrapError(err)
25646 }
25647 ret := &FloodlightActivitiesGenerateTagResponse{
25648 ServerResponse: googleapi.ServerResponse{
25649 Header: res.Header,
25650 HTTPStatusCode: res.StatusCode,
25651 },
25652 }
25653 target := &ret
25654 if err := gensupport.DecodeResponse(target, res); err != nil {
25655 return nil, err
25656 }
25657 return ret, nil
25658 }
25659
25660 type FloodlightActivitiesGetCall struct {
25661 s *Service
25662 profileId int64
25663 id int64
25664 urlParams_ gensupport.URLParams
25665 ifNoneMatch_ string
25666 ctx_ context.Context
25667 header_ http.Header
25668 }
25669
25670
25671
25672
25673
25674 func (r *FloodlightActivitiesService) Get(profileId int64, id int64) *FloodlightActivitiesGetCall {
25675 c := &FloodlightActivitiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25676 c.profileId = profileId
25677 c.id = id
25678 return c
25679 }
25680
25681
25682
25683
25684 func (c *FloodlightActivitiesGetCall) Fields(s ...googleapi.Field) *FloodlightActivitiesGetCall {
25685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25686 return c
25687 }
25688
25689
25690
25691
25692 func (c *FloodlightActivitiesGetCall) IfNoneMatch(entityTag string) *FloodlightActivitiesGetCall {
25693 c.ifNoneMatch_ = entityTag
25694 return c
25695 }
25696
25697
25698 func (c *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
25699 c.ctx_ = ctx
25700 return c
25701 }
25702
25703
25704
25705 func (c *FloodlightActivitiesGetCall) Header() http.Header {
25706 if c.header_ == nil {
25707 c.header_ = make(http.Header)
25708 }
25709 return c.header_
25710 }
25711
25712 func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
25713 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
25714 if c.ifNoneMatch_ != "" {
25715 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25716 }
25717 var body io.Reader = nil
25718 c.urlParams_.Set("alt", alt)
25719 c.urlParams_.Set("prettyPrint", "false")
25720 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities/{+id}")
25721 urls += "?" + c.urlParams_.Encode()
25722 req, err := http.NewRequest("GET", urls, body)
25723 if err != nil {
25724 return nil, err
25725 }
25726 req.Header = reqHeaders
25727 googleapi.Expand(req.URL, map[string]string{
25728 "profileId": strconv.FormatInt(c.profileId, 10),
25729 "id": strconv.FormatInt(c.id, 10),
25730 })
25731 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25732 }
25733
25734
25735
25736
25737
25738
25739
25740 func (c *FloodlightActivitiesGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
25741 gensupport.SetOptions(c.urlParams_, opts...)
25742 res, err := c.doRequest("json")
25743 if res != nil && res.StatusCode == http.StatusNotModified {
25744 if res.Body != nil {
25745 res.Body.Close()
25746 }
25747 return nil, gensupport.WrapError(&googleapi.Error{
25748 Code: res.StatusCode,
25749 Header: res.Header,
25750 })
25751 }
25752 if err != nil {
25753 return nil, err
25754 }
25755 defer googleapi.CloseBody(res)
25756 if err := googleapi.CheckResponse(res); err != nil {
25757 return nil, gensupport.WrapError(err)
25758 }
25759 ret := &FloodlightActivity{
25760 ServerResponse: googleapi.ServerResponse{
25761 Header: res.Header,
25762 HTTPStatusCode: res.StatusCode,
25763 },
25764 }
25765 target := &ret
25766 if err := gensupport.DecodeResponse(target, res); err != nil {
25767 return nil, err
25768 }
25769 return ret, nil
25770 }
25771
25772 type FloodlightActivitiesInsertCall struct {
25773 s *Service
25774 profileId int64
25775 floodlightactivity *FloodlightActivity
25776 urlParams_ gensupport.URLParams
25777 ctx_ context.Context
25778 header_ http.Header
25779 }
25780
25781
25782
25783
25784 func (r *FloodlightActivitiesService) Insert(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesInsertCall {
25785 c := &FloodlightActivitiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25786 c.profileId = profileId
25787 c.floodlightactivity = floodlightactivity
25788 return c
25789 }
25790
25791
25792
25793
25794 func (c *FloodlightActivitiesInsertCall) Fields(s ...googleapi.Field) *FloodlightActivitiesInsertCall {
25795 c.urlParams_.Set("fields", googleapi.CombineFields(s))
25796 return c
25797 }
25798
25799
25800 func (c *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
25801 c.ctx_ = ctx
25802 return c
25803 }
25804
25805
25806
25807 func (c *FloodlightActivitiesInsertCall) Header() http.Header {
25808 if c.header_ == nil {
25809 c.header_ = make(http.Header)
25810 }
25811 return c.header_
25812 }
25813
25814 func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
25815 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
25816 var body io.Reader = nil
25817 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
25818 if err != nil {
25819 return nil, err
25820 }
25821 c.urlParams_.Set("alt", alt)
25822 c.urlParams_.Set("prettyPrint", "false")
25823 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities")
25824 urls += "?" + c.urlParams_.Encode()
25825 req, err := http.NewRequest("POST", urls, body)
25826 if err != nil {
25827 return nil, err
25828 }
25829 req.Header = reqHeaders
25830 googleapi.Expand(req.URL, map[string]string{
25831 "profileId": strconv.FormatInt(c.profileId, 10),
25832 })
25833 return gensupport.SendRequest(c.ctx_, c.s.client, req)
25834 }
25835
25836
25837
25838
25839
25840
25841
25842 func (c *FloodlightActivitiesInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
25843 gensupport.SetOptions(c.urlParams_, opts...)
25844 res, err := c.doRequest("json")
25845 if res != nil && res.StatusCode == http.StatusNotModified {
25846 if res.Body != nil {
25847 res.Body.Close()
25848 }
25849 return nil, gensupport.WrapError(&googleapi.Error{
25850 Code: res.StatusCode,
25851 Header: res.Header,
25852 })
25853 }
25854 if err != nil {
25855 return nil, err
25856 }
25857 defer googleapi.CloseBody(res)
25858 if err := googleapi.CheckResponse(res); err != nil {
25859 return nil, gensupport.WrapError(err)
25860 }
25861 ret := &FloodlightActivity{
25862 ServerResponse: googleapi.ServerResponse{
25863 Header: res.Header,
25864 HTTPStatusCode: res.StatusCode,
25865 },
25866 }
25867 target := &ret
25868 if err := gensupport.DecodeResponse(target, res); err != nil {
25869 return nil, err
25870 }
25871 return ret, nil
25872 }
25873
25874 type FloodlightActivitiesListCall struct {
25875 s *Service
25876 profileId int64
25877 urlParams_ gensupport.URLParams
25878 ifNoneMatch_ string
25879 ctx_ context.Context
25880 header_ http.Header
25881 }
25882
25883
25884
25885
25886
25887 func (r *FloodlightActivitiesService) List(profileId int64) *FloodlightActivitiesListCall {
25888 c := &FloodlightActivitiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25889 c.profileId = profileId
25890 return c
25891 }
25892
25893
25894
25895
25896 func (c *FloodlightActivitiesListCall) AdvertiserId(advertiserId int64) *FloodlightActivitiesListCall {
25897 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
25898 return c
25899 }
25900
25901
25902
25903
25904 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupIds(floodlightActivityGroupIds ...int64) *FloodlightActivitiesListCall {
25905 var floodlightActivityGroupIds_ []string
25906 for _, v := range floodlightActivityGroupIds {
25907 floodlightActivityGroupIds_ = append(floodlightActivityGroupIds_, fmt.Sprint(v))
25908 }
25909 c.urlParams_.SetMulti("floodlightActivityGroupIds", floodlightActivityGroupIds_)
25910 return c
25911 }
25912
25913
25914
25915
25916 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupName(floodlightActivityGroupName string) *FloodlightActivitiesListCall {
25917 c.urlParams_.Set("floodlightActivityGroupName", floodlightActivityGroupName)
25918 return c
25919 }
25920
25921
25922
25923
25924 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupTagString(floodlightActivityGroupTagString string) *FloodlightActivitiesListCall {
25925 c.urlParams_.Set("floodlightActivityGroupTagString", floodlightActivityGroupTagString)
25926 return c
25927 }
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937 func (c *FloodlightActivitiesListCall) FloodlightActivityGroupType(floodlightActivityGroupType string) *FloodlightActivitiesListCall {
25938 c.urlParams_.Set("floodlightActivityGroupType", floodlightActivityGroupType)
25939 return c
25940 }
25941
25942
25943
25944
25945
25946 func (c *FloodlightActivitiesListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivitiesListCall {
25947 c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
25948 return c
25949 }
25950
25951
25952
25953
25954 func (c *FloodlightActivitiesListCall) Ids(ids ...int64) *FloodlightActivitiesListCall {
25955 var ids_ []string
25956 for _, v := range ids {
25957 ids_ = append(ids_, fmt.Sprint(v))
25958 }
25959 c.urlParams_.SetMulti("ids", ids_)
25960 return c
25961 }
25962
25963
25964
25965 func (c *FloodlightActivitiesListCall) MaxResults(maxResults int64) *FloodlightActivitiesListCall {
25966 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25967 return c
25968 }
25969
25970
25971
25972 func (c *FloodlightActivitiesListCall) PageToken(pageToken string) *FloodlightActivitiesListCall {
25973 c.urlParams_.Set("pageToken", pageToken)
25974 return c
25975 }
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986 func (c *FloodlightActivitiesListCall) SearchString(searchString string) *FloodlightActivitiesListCall {
25987 c.urlParams_.Set("searchString", searchString)
25988 return c
25989 }
25990
25991
25992
25993
25994
25995
25996
25997
25998 func (c *FloodlightActivitiesListCall) SortField(sortField string) *FloodlightActivitiesListCall {
25999 c.urlParams_.Set("sortField", sortField)
26000 return c
26001 }
26002
26003
26004
26005
26006
26007
26008
26009 func (c *FloodlightActivitiesListCall) SortOrder(sortOrder string) *FloodlightActivitiesListCall {
26010 c.urlParams_.Set("sortOrder", sortOrder)
26011 return c
26012 }
26013
26014
26015
26016 func (c *FloodlightActivitiesListCall) TagString(tagString string) *FloodlightActivitiesListCall {
26017 c.urlParams_.Set("tagString", tagString)
26018 return c
26019 }
26020
26021
26022
26023
26024 func (c *FloodlightActivitiesListCall) Fields(s ...googleapi.Field) *FloodlightActivitiesListCall {
26025 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26026 return c
26027 }
26028
26029
26030
26031
26032 func (c *FloodlightActivitiesListCall) IfNoneMatch(entityTag string) *FloodlightActivitiesListCall {
26033 c.ifNoneMatch_ = entityTag
26034 return c
26035 }
26036
26037
26038 func (c *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
26039 c.ctx_ = ctx
26040 return c
26041 }
26042
26043
26044
26045 func (c *FloodlightActivitiesListCall) Header() http.Header {
26046 if c.header_ == nil {
26047 c.header_ = make(http.Header)
26048 }
26049 return c.header_
26050 }
26051
26052 func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
26053 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26054 if c.ifNoneMatch_ != "" {
26055 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26056 }
26057 var body io.Reader = nil
26058 c.urlParams_.Set("alt", alt)
26059 c.urlParams_.Set("prettyPrint", "false")
26060 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities")
26061 urls += "?" + c.urlParams_.Encode()
26062 req, err := http.NewRequest("GET", urls, body)
26063 if err != nil {
26064 return nil, err
26065 }
26066 req.Header = reqHeaders
26067 googleapi.Expand(req.URL, map[string]string{
26068 "profileId": strconv.FormatInt(c.profileId, 10),
26069 })
26070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26071 }
26072
26073
26074
26075
26076
26077
26078
26079 func (c *FloodlightActivitiesListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivitiesListResponse, error) {
26080 gensupport.SetOptions(c.urlParams_, opts...)
26081 res, err := c.doRequest("json")
26082 if res != nil && res.StatusCode == http.StatusNotModified {
26083 if res.Body != nil {
26084 res.Body.Close()
26085 }
26086 return nil, gensupport.WrapError(&googleapi.Error{
26087 Code: res.StatusCode,
26088 Header: res.Header,
26089 })
26090 }
26091 if err != nil {
26092 return nil, err
26093 }
26094 defer googleapi.CloseBody(res)
26095 if err := googleapi.CheckResponse(res); err != nil {
26096 return nil, gensupport.WrapError(err)
26097 }
26098 ret := &FloodlightActivitiesListResponse{
26099 ServerResponse: googleapi.ServerResponse{
26100 Header: res.Header,
26101 HTTPStatusCode: res.StatusCode,
26102 },
26103 }
26104 target := &ret
26105 if err := gensupport.DecodeResponse(target, res); err != nil {
26106 return nil, err
26107 }
26108 return ret, nil
26109 }
26110
26111
26112
26113
26114 func (c *FloodlightActivitiesListCall) Pages(ctx context.Context, f func(*FloodlightActivitiesListResponse) error) error {
26115 c.ctx_ = ctx
26116 defer c.PageToken(c.urlParams_.Get("pageToken"))
26117 for {
26118 x, err := c.Do()
26119 if err != nil {
26120 return err
26121 }
26122 if err := f(x); err != nil {
26123 return err
26124 }
26125 if x.NextPageToken == "" {
26126 return nil
26127 }
26128 c.PageToken(x.NextPageToken)
26129 }
26130 }
26131
26132 type FloodlightActivitiesPatchCall struct {
26133 s *Service
26134 profileId int64
26135 floodlightactivity *FloodlightActivity
26136 urlParams_ gensupport.URLParams
26137 ctx_ context.Context
26138 header_ http.Header
26139 }
26140
26141
26142
26143
26144
26145 func (r *FloodlightActivitiesService) Patch(profileId int64, id int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesPatchCall {
26146 c := &FloodlightActivitiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26147 c.profileId = profileId
26148 c.urlParams_.Set("id", fmt.Sprint(id))
26149 c.floodlightactivity = floodlightactivity
26150 return c
26151 }
26152
26153
26154
26155
26156 func (c *FloodlightActivitiesPatchCall) Fields(s ...googleapi.Field) *FloodlightActivitiesPatchCall {
26157 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26158 return c
26159 }
26160
26161
26162 func (c *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
26163 c.ctx_ = ctx
26164 return c
26165 }
26166
26167
26168
26169 func (c *FloodlightActivitiesPatchCall) Header() http.Header {
26170 if c.header_ == nil {
26171 c.header_ = make(http.Header)
26172 }
26173 return c.header_
26174 }
26175
26176 func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
26177 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26178 var body io.Reader = nil
26179 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
26180 if err != nil {
26181 return nil, err
26182 }
26183 c.urlParams_.Set("alt", alt)
26184 c.urlParams_.Set("prettyPrint", "false")
26185 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities")
26186 urls += "?" + c.urlParams_.Encode()
26187 req, err := http.NewRequest("PATCH", urls, body)
26188 if err != nil {
26189 return nil, err
26190 }
26191 req.Header = reqHeaders
26192 googleapi.Expand(req.URL, map[string]string{
26193 "profileId": strconv.FormatInt(c.profileId, 10),
26194 })
26195 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26196 }
26197
26198
26199
26200
26201
26202
26203
26204 func (c *FloodlightActivitiesPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
26205 gensupport.SetOptions(c.urlParams_, opts...)
26206 res, err := c.doRequest("json")
26207 if res != nil && res.StatusCode == http.StatusNotModified {
26208 if res.Body != nil {
26209 res.Body.Close()
26210 }
26211 return nil, gensupport.WrapError(&googleapi.Error{
26212 Code: res.StatusCode,
26213 Header: res.Header,
26214 })
26215 }
26216 if err != nil {
26217 return nil, err
26218 }
26219 defer googleapi.CloseBody(res)
26220 if err := googleapi.CheckResponse(res); err != nil {
26221 return nil, gensupport.WrapError(err)
26222 }
26223 ret := &FloodlightActivity{
26224 ServerResponse: googleapi.ServerResponse{
26225 Header: res.Header,
26226 HTTPStatusCode: res.StatusCode,
26227 },
26228 }
26229 target := &ret
26230 if err := gensupport.DecodeResponse(target, res); err != nil {
26231 return nil, err
26232 }
26233 return ret, nil
26234 }
26235
26236 type FloodlightActivitiesUpdateCall struct {
26237 s *Service
26238 profileId int64
26239 floodlightactivity *FloodlightActivity
26240 urlParams_ gensupport.URLParams
26241 ctx_ context.Context
26242 header_ http.Header
26243 }
26244
26245
26246
26247
26248 func (r *FloodlightActivitiesService) Update(profileId int64, floodlightactivity *FloodlightActivity) *FloodlightActivitiesUpdateCall {
26249 c := &FloodlightActivitiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26250 c.profileId = profileId
26251 c.floodlightactivity = floodlightactivity
26252 return c
26253 }
26254
26255
26256
26257
26258 func (c *FloodlightActivitiesUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivitiesUpdateCall {
26259 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26260 return c
26261 }
26262
26263
26264 func (c *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
26265 c.ctx_ = ctx
26266 return c
26267 }
26268
26269
26270
26271 func (c *FloodlightActivitiesUpdateCall) Header() http.Header {
26272 if c.header_ == nil {
26273 c.header_ = make(http.Header)
26274 }
26275 return c.header_
26276 }
26277
26278 func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
26279 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26280 var body io.Reader = nil
26281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
26282 if err != nil {
26283 return nil, err
26284 }
26285 c.urlParams_.Set("alt", alt)
26286 c.urlParams_.Set("prettyPrint", "false")
26287 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivities")
26288 urls += "?" + c.urlParams_.Encode()
26289 req, err := http.NewRequest("PUT", urls, body)
26290 if err != nil {
26291 return nil, err
26292 }
26293 req.Header = reqHeaders
26294 googleapi.Expand(req.URL, map[string]string{
26295 "profileId": strconv.FormatInt(c.profileId, 10),
26296 })
26297 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26298 }
26299
26300
26301
26302
26303
26304
26305
26306 func (c *FloodlightActivitiesUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivity, error) {
26307 gensupport.SetOptions(c.urlParams_, opts...)
26308 res, err := c.doRequest("json")
26309 if res != nil && res.StatusCode == http.StatusNotModified {
26310 if res.Body != nil {
26311 res.Body.Close()
26312 }
26313 return nil, gensupport.WrapError(&googleapi.Error{
26314 Code: res.StatusCode,
26315 Header: res.Header,
26316 })
26317 }
26318 if err != nil {
26319 return nil, err
26320 }
26321 defer googleapi.CloseBody(res)
26322 if err := googleapi.CheckResponse(res); err != nil {
26323 return nil, gensupport.WrapError(err)
26324 }
26325 ret := &FloodlightActivity{
26326 ServerResponse: googleapi.ServerResponse{
26327 Header: res.Header,
26328 HTTPStatusCode: res.StatusCode,
26329 },
26330 }
26331 target := &ret
26332 if err := gensupport.DecodeResponse(target, res); err != nil {
26333 return nil, err
26334 }
26335 return ret, nil
26336 }
26337
26338 type FloodlightActivityGroupsGetCall struct {
26339 s *Service
26340 profileId int64
26341 id int64
26342 urlParams_ gensupport.URLParams
26343 ifNoneMatch_ string
26344 ctx_ context.Context
26345 header_ http.Header
26346 }
26347
26348
26349
26350
26351
26352 func (r *FloodlightActivityGroupsService) Get(profileId int64, id int64) *FloodlightActivityGroupsGetCall {
26353 c := &FloodlightActivityGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26354 c.profileId = profileId
26355 c.id = id
26356 return c
26357 }
26358
26359
26360
26361
26362 func (c *FloodlightActivityGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsGetCall {
26363 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26364 return c
26365 }
26366
26367
26368
26369
26370 func (c *FloodlightActivityGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsGetCall {
26371 c.ifNoneMatch_ = entityTag
26372 return c
26373 }
26374
26375
26376 func (c *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
26377 c.ctx_ = ctx
26378 return c
26379 }
26380
26381
26382
26383 func (c *FloodlightActivityGroupsGetCall) Header() http.Header {
26384 if c.header_ == nil {
26385 c.header_ = make(http.Header)
26386 }
26387 return c.header_
26388 }
26389
26390 func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26391 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26392 if c.ifNoneMatch_ != "" {
26393 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26394 }
26395 var body io.Reader = nil
26396 c.urlParams_.Set("alt", alt)
26397 c.urlParams_.Set("prettyPrint", "false")
26398 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivityGroups/{+id}")
26399 urls += "?" + c.urlParams_.Encode()
26400 req, err := http.NewRequest("GET", urls, body)
26401 if err != nil {
26402 return nil, err
26403 }
26404 req.Header = reqHeaders
26405 googleapi.Expand(req.URL, map[string]string{
26406 "profileId": strconv.FormatInt(c.profileId, 10),
26407 "id": strconv.FormatInt(c.id, 10),
26408 })
26409 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26410 }
26411
26412
26413
26414
26415
26416
26417
26418 func (c *FloodlightActivityGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
26419 gensupport.SetOptions(c.urlParams_, opts...)
26420 res, err := c.doRequest("json")
26421 if res != nil && res.StatusCode == http.StatusNotModified {
26422 if res.Body != nil {
26423 res.Body.Close()
26424 }
26425 return nil, gensupport.WrapError(&googleapi.Error{
26426 Code: res.StatusCode,
26427 Header: res.Header,
26428 })
26429 }
26430 if err != nil {
26431 return nil, err
26432 }
26433 defer googleapi.CloseBody(res)
26434 if err := googleapi.CheckResponse(res); err != nil {
26435 return nil, gensupport.WrapError(err)
26436 }
26437 ret := &FloodlightActivityGroup{
26438 ServerResponse: googleapi.ServerResponse{
26439 Header: res.Header,
26440 HTTPStatusCode: res.StatusCode,
26441 },
26442 }
26443 target := &ret
26444 if err := gensupport.DecodeResponse(target, res); err != nil {
26445 return nil, err
26446 }
26447 return ret, nil
26448 }
26449
26450 type FloodlightActivityGroupsInsertCall struct {
26451 s *Service
26452 profileId int64
26453 floodlightactivitygroup *FloodlightActivityGroup
26454 urlParams_ gensupport.URLParams
26455 ctx_ context.Context
26456 header_ http.Header
26457 }
26458
26459
26460
26461
26462 func (r *FloodlightActivityGroupsService) Insert(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsInsertCall {
26463 c := &FloodlightActivityGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26464 c.profileId = profileId
26465 c.floodlightactivitygroup = floodlightactivitygroup
26466 return c
26467 }
26468
26469
26470
26471
26472 func (c *FloodlightActivityGroupsInsertCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsInsertCall {
26473 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26474 return c
26475 }
26476
26477
26478 func (c *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
26479 c.ctx_ = ctx
26480 return c
26481 }
26482
26483
26484
26485 func (c *FloodlightActivityGroupsInsertCall) Header() http.Header {
26486 if c.header_ == nil {
26487 c.header_ = make(http.Header)
26488 }
26489 return c.header_
26490 }
26491
26492 func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
26493 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26494 var body io.Reader = nil
26495 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
26496 if err != nil {
26497 return nil, err
26498 }
26499 c.urlParams_.Set("alt", alt)
26500 c.urlParams_.Set("prettyPrint", "false")
26501 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivityGroups")
26502 urls += "?" + c.urlParams_.Encode()
26503 req, err := http.NewRequest("POST", urls, body)
26504 if err != nil {
26505 return nil, err
26506 }
26507 req.Header = reqHeaders
26508 googleapi.Expand(req.URL, map[string]string{
26509 "profileId": strconv.FormatInt(c.profileId, 10),
26510 })
26511 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26512 }
26513
26514
26515
26516
26517
26518
26519
26520 func (c *FloodlightActivityGroupsInsertCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, 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, gensupport.WrapError(&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, gensupport.WrapError(err)
26538 }
26539 ret := &FloodlightActivityGroup{
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 type FloodlightActivityGroupsListCall struct {
26553 s *Service
26554 profileId int64
26555 urlParams_ gensupport.URLParams
26556 ifNoneMatch_ string
26557 ctx_ context.Context
26558 header_ http.Header
26559 }
26560
26561
26562
26563
26564
26565 func (r *FloodlightActivityGroupsService) List(profileId int64) *FloodlightActivityGroupsListCall {
26566 c := &FloodlightActivityGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26567 c.profileId = profileId
26568 return c
26569 }
26570
26571
26572
26573
26574 func (c *FloodlightActivityGroupsListCall) AdvertiserId(advertiserId int64) *FloodlightActivityGroupsListCall {
26575 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
26576 return c
26577 }
26578
26579
26580
26581
26582
26583 func (c *FloodlightActivityGroupsListCall) FloodlightConfigurationId(floodlightConfigurationId int64) *FloodlightActivityGroupsListCall {
26584 c.urlParams_.Set("floodlightConfigurationId", fmt.Sprint(floodlightConfigurationId))
26585 return c
26586 }
26587
26588
26589
26590
26591 func (c *FloodlightActivityGroupsListCall) Ids(ids ...int64) *FloodlightActivityGroupsListCall {
26592 var ids_ []string
26593 for _, v := range ids {
26594 ids_ = append(ids_, fmt.Sprint(v))
26595 }
26596 c.urlParams_.SetMulti("ids", ids_)
26597 return c
26598 }
26599
26600
26601
26602 func (c *FloodlightActivityGroupsListCall) MaxResults(maxResults int64) *FloodlightActivityGroupsListCall {
26603 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26604 return c
26605 }
26606
26607
26608
26609 func (c *FloodlightActivityGroupsListCall) PageToken(pageToken string) *FloodlightActivityGroupsListCall {
26610 c.urlParams_.Set("pageToken", pageToken)
26611 return c
26612 }
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623 func (c *FloodlightActivityGroupsListCall) SearchString(searchString string) *FloodlightActivityGroupsListCall {
26624 c.urlParams_.Set("searchString", searchString)
26625 return c
26626 }
26627
26628
26629
26630
26631
26632
26633
26634
26635 func (c *FloodlightActivityGroupsListCall) SortField(sortField string) *FloodlightActivityGroupsListCall {
26636 c.urlParams_.Set("sortField", sortField)
26637 return c
26638 }
26639
26640
26641
26642
26643
26644
26645
26646 func (c *FloodlightActivityGroupsListCall) SortOrder(sortOrder string) *FloodlightActivityGroupsListCall {
26647 c.urlParams_.Set("sortOrder", sortOrder)
26648 return c
26649 }
26650
26651
26652
26653
26654
26655
26656
26657
26658 func (c *FloodlightActivityGroupsListCall) Type(type_ string) *FloodlightActivityGroupsListCall {
26659 c.urlParams_.Set("type", type_)
26660 return c
26661 }
26662
26663
26664
26665
26666 func (c *FloodlightActivityGroupsListCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsListCall {
26667 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26668 return c
26669 }
26670
26671
26672
26673
26674 func (c *FloodlightActivityGroupsListCall) IfNoneMatch(entityTag string) *FloodlightActivityGroupsListCall {
26675 c.ifNoneMatch_ = entityTag
26676 return c
26677 }
26678
26679
26680 func (c *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
26681 c.ctx_ = ctx
26682 return c
26683 }
26684
26685
26686
26687 func (c *FloodlightActivityGroupsListCall) Header() http.Header {
26688 if c.header_ == nil {
26689 c.header_ = make(http.Header)
26690 }
26691 return c.header_
26692 }
26693
26694 func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
26695 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
26696 if c.ifNoneMatch_ != "" {
26697 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26698 }
26699 var body io.Reader = nil
26700 c.urlParams_.Set("alt", alt)
26701 c.urlParams_.Set("prettyPrint", "false")
26702 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivityGroups")
26703 urls += "?" + c.urlParams_.Encode()
26704 req, err := http.NewRequest("GET", urls, body)
26705 if err != nil {
26706 return nil, err
26707 }
26708 req.Header = reqHeaders
26709 googleapi.Expand(req.URL, map[string]string{
26710 "profileId": strconv.FormatInt(c.profileId, 10),
26711 })
26712 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26713 }
26714
26715
26716
26717
26718
26719
26720
26721 func (c *FloodlightActivityGroupsListCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroupsListResponse, error) {
26722 gensupport.SetOptions(c.urlParams_, opts...)
26723 res, err := c.doRequest("json")
26724 if res != nil && res.StatusCode == http.StatusNotModified {
26725 if res.Body != nil {
26726 res.Body.Close()
26727 }
26728 return nil, gensupport.WrapError(&googleapi.Error{
26729 Code: res.StatusCode,
26730 Header: res.Header,
26731 })
26732 }
26733 if err != nil {
26734 return nil, err
26735 }
26736 defer googleapi.CloseBody(res)
26737 if err := googleapi.CheckResponse(res); err != nil {
26738 return nil, gensupport.WrapError(err)
26739 }
26740 ret := &FloodlightActivityGroupsListResponse{
26741 ServerResponse: googleapi.ServerResponse{
26742 Header: res.Header,
26743 HTTPStatusCode: res.StatusCode,
26744 },
26745 }
26746 target := &ret
26747 if err := gensupport.DecodeResponse(target, res); err != nil {
26748 return nil, err
26749 }
26750 return ret, nil
26751 }
26752
26753
26754
26755
26756 func (c *FloodlightActivityGroupsListCall) Pages(ctx context.Context, f func(*FloodlightActivityGroupsListResponse) error) error {
26757 c.ctx_ = ctx
26758 defer c.PageToken(c.urlParams_.Get("pageToken"))
26759 for {
26760 x, err := c.Do()
26761 if err != nil {
26762 return err
26763 }
26764 if err := f(x); err != nil {
26765 return err
26766 }
26767 if x.NextPageToken == "" {
26768 return nil
26769 }
26770 c.PageToken(x.NextPageToken)
26771 }
26772 }
26773
26774 type FloodlightActivityGroupsPatchCall struct {
26775 s *Service
26776 profileId int64
26777 floodlightactivitygroup *FloodlightActivityGroup
26778 urlParams_ gensupport.URLParams
26779 ctx_ context.Context
26780 header_ http.Header
26781 }
26782
26783
26784
26785
26786
26787 func (r *FloodlightActivityGroupsService) Patch(profileId int64, id int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsPatchCall {
26788 c := &FloodlightActivityGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26789 c.profileId = profileId
26790 c.urlParams_.Set("id", fmt.Sprint(id))
26791 c.floodlightactivitygroup = floodlightactivitygroup
26792 return c
26793 }
26794
26795
26796
26797
26798 func (c *FloodlightActivityGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsPatchCall {
26799 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26800 return c
26801 }
26802
26803
26804 func (c *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
26805 c.ctx_ = ctx
26806 return c
26807 }
26808
26809
26810
26811 func (c *FloodlightActivityGroupsPatchCall) Header() http.Header {
26812 if c.header_ == nil {
26813 c.header_ = make(http.Header)
26814 }
26815 return c.header_
26816 }
26817
26818 func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
26819 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26820 var body io.Reader = nil
26821 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
26822 if err != nil {
26823 return nil, err
26824 }
26825 c.urlParams_.Set("alt", alt)
26826 c.urlParams_.Set("prettyPrint", "false")
26827 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivityGroups")
26828 urls += "?" + c.urlParams_.Encode()
26829 req, err := http.NewRequest("PATCH", urls, body)
26830 if err != nil {
26831 return nil, err
26832 }
26833 req.Header = reqHeaders
26834 googleapi.Expand(req.URL, map[string]string{
26835 "profileId": strconv.FormatInt(c.profileId, 10),
26836 })
26837 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26838 }
26839
26840
26841
26842
26843
26844
26845
26846 func (c *FloodlightActivityGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
26847 gensupport.SetOptions(c.urlParams_, opts...)
26848 res, err := c.doRequest("json")
26849 if res != nil && res.StatusCode == http.StatusNotModified {
26850 if res.Body != nil {
26851 res.Body.Close()
26852 }
26853 return nil, gensupport.WrapError(&googleapi.Error{
26854 Code: res.StatusCode,
26855 Header: res.Header,
26856 })
26857 }
26858 if err != nil {
26859 return nil, err
26860 }
26861 defer googleapi.CloseBody(res)
26862 if err := googleapi.CheckResponse(res); err != nil {
26863 return nil, gensupport.WrapError(err)
26864 }
26865 ret := &FloodlightActivityGroup{
26866 ServerResponse: googleapi.ServerResponse{
26867 Header: res.Header,
26868 HTTPStatusCode: res.StatusCode,
26869 },
26870 }
26871 target := &ret
26872 if err := gensupport.DecodeResponse(target, res); err != nil {
26873 return nil, err
26874 }
26875 return ret, nil
26876 }
26877
26878 type FloodlightActivityGroupsUpdateCall struct {
26879 s *Service
26880 profileId int64
26881 floodlightactivitygroup *FloodlightActivityGroup
26882 urlParams_ gensupport.URLParams
26883 ctx_ context.Context
26884 header_ http.Header
26885 }
26886
26887
26888
26889
26890 func (r *FloodlightActivityGroupsService) Update(profileId int64, floodlightactivitygroup *FloodlightActivityGroup) *FloodlightActivityGroupsUpdateCall {
26891 c := &FloodlightActivityGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26892 c.profileId = profileId
26893 c.floodlightactivitygroup = floodlightactivitygroup
26894 return c
26895 }
26896
26897
26898
26899
26900 func (c *FloodlightActivityGroupsUpdateCall) Fields(s ...googleapi.Field) *FloodlightActivityGroupsUpdateCall {
26901 c.urlParams_.Set("fields", googleapi.CombineFields(s))
26902 return c
26903 }
26904
26905
26906 func (c *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
26907 c.ctx_ = ctx
26908 return c
26909 }
26910
26911
26912
26913 func (c *FloodlightActivityGroupsUpdateCall) Header() http.Header {
26914 if c.header_ == nil {
26915 c.header_ = make(http.Header)
26916 }
26917 return c.header_
26918 }
26919
26920 func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
26921 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
26922 var body io.Reader = nil
26923 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
26924 if err != nil {
26925 return nil, err
26926 }
26927 c.urlParams_.Set("alt", alt)
26928 c.urlParams_.Set("prettyPrint", "false")
26929 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightActivityGroups")
26930 urls += "?" + c.urlParams_.Encode()
26931 req, err := http.NewRequest("PUT", urls, body)
26932 if err != nil {
26933 return nil, err
26934 }
26935 req.Header = reqHeaders
26936 googleapi.Expand(req.URL, map[string]string{
26937 "profileId": strconv.FormatInt(c.profileId, 10),
26938 })
26939 return gensupport.SendRequest(c.ctx_, c.s.client, req)
26940 }
26941
26942
26943
26944
26945
26946
26947
26948 func (c *FloodlightActivityGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightActivityGroup, error) {
26949 gensupport.SetOptions(c.urlParams_, opts...)
26950 res, err := c.doRequest("json")
26951 if res != nil && res.StatusCode == http.StatusNotModified {
26952 if res.Body != nil {
26953 res.Body.Close()
26954 }
26955 return nil, gensupport.WrapError(&googleapi.Error{
26956 Code: res.StatusCode,
26957 Header: res.Header,
26958 })
26959 }
26960 if err != nil {
26961 return nil, err
26962 }
26963 defer googleapi.CloseBody(res)
26964 if err := googleapi.CheckResponse(res); err != nil {
26965 return nil, gensupport.WrapError(err)
26966 }
26967 ret := &FloodlightActivityGroup{
26968 ServerResponse: googleapi.ServerResponse{
26969 Header: res.Header,
26970 HTTPStatusCode: res.StatusCode,
26971 },
26972 }
26973 target := &ret
26974 if err := gensupport.DecodeResponse(target, res); err != nil {
26975 return nil, err
26976 }
26977 return ret, nil
26978 }
26979
26980 type FloodlightConfigurationsGetCall struct {
26981 s *Service
26982 profileId int64
26983 id int64
26984 urlParams_ gensupport.URLParams
26985 ifNoneMatch_ string
26986 ctx_ context.Context
26987 header_ http.Header
26988 }
26989
26990
26991
26992
26993
26994 func (r *FloodlightConfigurationsService) Get(profileId int64, id int64) *FloodlightConfigurationsGetCall {
26995 c := &FloodlightConfigurationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26996 c.profileId = profileId
26997 c.id = id
26998 return c
26999 }
27000
27001
27002
27003
27004 func (c *FloodlightConfigurationsGetCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsGetCall {
27005 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27006 return c
27007 }
27008
27009
27010
27011
27012 func (c *FloodlightConfigurationsGetCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsGetCall {
27013 c.ifNoneMatch_ = entityTag
27014 return c
27015 }
27016
27017
27018 func (c *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
27019 c.ctx_ = ctx
27020 return c
27021 }
27022
27023
27024
27025 func (c *FloodlightConfigurationsGetCall) Header() http.Header {
27026 if c.header_ == nil {
27027 c.header_ = make(http.Header)
27028 }
27029 return c.header_
27030 }
27031
27032 func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
27033 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27034 if c.ifNoneMatch_ != "" {
27035 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27036 }
27037 var body io.Reader = nil
27038 c.urlParams_.Set("alt", alt)
27039 c.urlParams_.Set("prettyPrint", "false")
27040 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightConfigurations/{+id}")
27041 urls += "?" + c.urlParams_.Encode()
27042 req, err := http.NewRequest("GET", urls, body)
27043 if err != nil {
27044 return nil, err
27045 }
27046 req.Header = reqHeaders
27047 googleapi.Expand(req.URL, map[string]string{
27048 "profileId": strconv.FormatInt(c.profileId, 10),
27049 "id": strconv.FormatInt(c.id, 10),
27050 })
27051 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27052 }
27053
27054
27055
27056
27057
27058
27059
27060 func (c *FloodlightConfigurationsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
27061 gensupport.SetOptions(c.urlParams_, opts...)
27062 res, err := c.doRequest("json")
27063 if res != nil && res.StatusCode == http.StatusNotModified {
27064 if res.Body != nil {
27065 res.Body.Close()
27066 }
27067 return nil, gensupport.WrapError(&googleapi.Error{
27068 Code: res.StatusCode,
27069 Header: res.Header,
27070 })
27071 }
27072 if err != nil {
27073 return nil, err
27074 }
27075 defer googleapi.CloseBody(res)
27076 if err := googleapi.CheckResponse(res); err != nil {
27077 return nil, gensupport.WrapError(err)
27078 }
27079 ret := &FloodlightConfiguration{
27080 ServerResponse: googleapi.ServerResponse{
27081 Header: res.Header,
27082 HTTPStatusCode: res.StatusCode,
27083 },
27084 }
27085 target := &ret
27086 if err := gensupport.DecodeResponse(target, res); err != nil {
27087 return nil, err
27088 }
27089 return ret, nil
27090 }
27091
27092 type FloodlightConfigurationsListCall struct {
27093 s *Service
27094 profileId int64
27095 urlParams_ gensupport.URLParams
27096 ifNoneMatch_ string
27097 ctx_ context.Context
27098 header_ http.Header
27099 }
27100
27101
27102
27103
27104 func (r *FloodlightConfigurationsService) List(profileId int64) *FloodlightConfigurationsListCall {
27105 c := &FloodlightConfigurationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27106 c.profileId = profileId
27107 return c
27108 }
27109
27110
27111
27112
27113 func (c *FloodlightConfigurationsListCall) Ids(ids ...int64) *FloodlightConfigurationsListCall {
27114 var ids_ []string
27115 for _, v := range ids {
27116 ids_ = append(ids_, fmt.Sprint(v))
27117 }
27118 c.urlParams_.SetMulti("ids", ids_)
27119 return c
27120 }
27121
27122
27123
27124
27125 func (c *FloodlightConfigurationsListCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsListCall {
27126 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27127 return c
27128 }
27129
27130
27131
27132
27133 func (c *FloodlightConfigurationsListCall) IfNoneMatch(entityTag string) *FloodlightConfigurationsListCall {
27134 c.ifNoneMatch_ = entityTag
27135 return c
27136 }
27137
27138
27139 func (c *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
27140 c.ctx_ = ctx
27141 return c
27142 }
27143
27144
27145
27146 func (c *FloodlightConfigurationsListCall) Header() http.Header {
27147 if c.header_ == nil {
27148 c.header_ = make(http.Header)
27149 }
27150 return c.header_
27151 }
27152
27153 func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
27154 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27155 if c.ifNoneMatch_ != "" {
27156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27157 }
27158 var body io.Reader = nil
27159 c.urlParams_.Set("alt", alt)
27160 c.urlParams_.Set("prettyPrint", "false")
27161 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightConfigurations")
27162 urls += "?" + c.urlParams_.Encode()
27163 req, err := http.NewRequest("GET", urls, body)
27164 if err != nil {
27165 return nil, err
27166 }
27167 req.Header = reqHeaders
27168 googleapi.Expand(req.URL, map[string]string{
27169 "profileId": strconv.FormatInt(c.profileId, 10),
27170 })
27171 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27172 }
27173
27174
27175
27176
27177
27178
27179
27180 func (c *FloodlightConfigurationsListCall) Do(opts ...googleapi.CallOption) (*FloodlightConfigurationsListResponse, error) {
27181 gensupport.SetOptions(c.urlParams_, opts...)
27182 res, err := c.doRequest("json")
27183 if res != nil && res.StatusCode == http.StatusNotModified {
27184 if res.Body != nil {
27185 res.Body.Close()
27186 }
27187 return nil, gensupport.WrapError(&googleapi.Error{
27188 Code: res.StatusCode,
27189 Header: res.Header,
27190 })
27191 }
27192 if err != nil {
27193 return nil, err
27194 }
27195 defer googleapi.CloseBody(res)
27196 if err := googleapi.CheckResponse(res); err != nil {
27197 return nil, gensupport.WrapError(err)
27198 }
27199 ret := &FloodlightConfigurationsListResponse{
27200 ServerResponse: googleapi.ServerResponse{
27201 Header: res.Header,
27202 HTTPStatusCode: res.StatusCode,
27203 },
27204 }
27205 target := &ret
27206 if err := gensupport.DecodeResponse(target, res); err != nil {
27207 return nil, err
27208 }
27209 return ret, nil
27210 }
27211
27212 type FloodlightConfigurationsPatchCall struct {
27213 s *Service
27214 profileId int64
27215 floodlightconfiguration *FloodlightConfiguration
27216 urlParams_ gensupport.URLParams
27217 ctx_ context.Context
27218 header_ http.Header
27219 }
27220
27221
27222
27223
27224
27225 func (r *FloodlightConfigurationsService) Patch(profileId int64, id int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsPatchCall {
27226 c := &FloodlightConfigurationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27227 c.profileId = profileId
27228 c.urlParams_.Set("id", fmt.Sprint(id))
27229 c.floodlightconfiguration = floodlightconfiguration
27230 return c
27231 }
27232
27233
27234
27235
27236 func (c *FloodlightConfigurationsPatchCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsPatchCall {
27237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27238 return c
27239 }
27240
27241
27242 func (c *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
27243 c.ctx_ = ctx
27244 return c
27245 }
27246
27247
27248
27249 func (c *FloodlightConfigurationsPatchCall) Header() http.Header {
27250 if c.header_ == nil {
27251 c.header_ = make(http.Header)
27252 }
27253 return c.header_
27254 }
27255
27256 func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
27257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27258 var body io.Reader = nil
27259 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
27260 if err != nil {
27261 return nil, err
27262 }
27263 c.urlParams_.Set("alt", alt)
27264 c.urlParams_.Set("prettyPrint", "false")
27265 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightConfigurations")
27266 urls += "?" + c.urlParams_.Encode()
27267 req, err := http.NewRequest("PATCH", urls, body)
27268 if err != nil {
27269 return nil, err
27270 }
27271 req.Header = reqHeaders
27272 googleapi.Expand(req.URL, map[string]string{
27273 "profileId": strconv.FormatInt(c.profileId, 10),
27274 })
27275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27276 }
27277
27278
27279
27280
27281
27282
27283
27284 func (c *FloodlightConfigurationsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
27285 gensupport.SetOptions(c.urlParams_, opts...)
27286 res, err := c.doRequest("json")
27287 if res != nil && res.StatusCode == http.StatusNotModified {
27288 if res.Body != nil {
27289 res.Body.Close()
27290 }
27291 return nil, gensupport.WrapError(&googleapi.Error{
27292 Code: res.StatusCode,
27293 Header: res.Header,
27294 })
27295 }
27296 if err != nil {
27297 return nil, err
27298 }
27299 defer googleapi.CloseBody(res)
27300 if err := googleapi.CheckResponse(res); err != nil {
27301 return nil, gensupport.WrapError(err)
27302 }
27303 ret := &FloodlightConfiguration{
27304 ServerResponse: googleapi.ServerResponse{
27305 Header: res.Header,
27306 HTTPStatusCode: res.StatusCode,
27307 },
27308 }
27309 target := &ret
27310 if err := gensupport.DecodeResponse(target, res); err != nil {
27311 return nil, err
27312 }
27313 return ret, nil
27314 }
27315
27316 type FloodlightConfigurationsUpdateCall struct {
27317 s *Service
27318 profileId int64
27319 floodlightconfiguration *FloodlightConfiguration
27320 urlParams_ gensupport.URLParams
27321 ctx_ context.Context
27322 header_ http.Header
27323 }
27324
27325
27326
27327
27328 func (r *FloodlightConfigurationsService) Update(profileId int64, floodlightconfiguration *FloodlightConfiguration) *FloodlightConfigurationsUpdateCall {
27329 c := &FloodlightConfigurationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27330 c.profileId = profileId
27331 c.floodlightconfiguration = floodlightconfiguration
27332 return c
27333 }
27334
27335
27336
27337
27338 func (c *FloodlightConfigurationsUpdateCall) Fields(s ...googleapi.Field) *FloodlightConfigurationsUpdateCall {
27339 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27340 return c
27341 }
27342
27343
27344 func (c *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
27345 c.ctx_ = ctx
27346 return c
27347 }
27348
27349
27350
27351 func (c *FloodlightConfigurationsUpdateCall) Header() http.Header {
27352 if c.header_ == nil {
27353 c.header_ = make(http.Header)
27354 }
27355 return c.header_
27356 }
27357
27358 func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
27359 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
27360 var body io.Reader = nil
27361 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
27362 if err != nil {
27363 return nil, err
27364 }
27365 c.urlParams_.Set("alt", alt)
27366 c.urlParams_.Set("prettyPrint", "false")
27367 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/floodlightConfigurations")
27368 urls += "?" + c.urlParams_.Encode()
27369 req, err := http.NewRequest("PUT", urls, body)
27370 if err != nil {
27371 return nil, err
27372 }
27373 req.Header = reqHeaders
27374 googleapi.Expand(req.URL, map[string]string{
27375 "profileId": strconv.FormatInt(c.profileId, 10),
27376 })
27377 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27378 }
27379
27380
27381
27382
27383
27384
27385
27386 func (c *FloodlightConfigurationsUpdateCall) Do(opts ...googleapi.CallOption) (*FloodlightConfiguration, error) {
27387 gensupport.SetOptions(c.urlParams_, opts...)
27388 res, err := c.doRequest("json")
27389 if res != nil && res.StatusCode == http.StatusNotModified {
27390 if res.Body != nil {
27391 res.Body.Close()
27392 }
27393 return nil, gensupport.WrapError(&googleapi.Error{
27394 Code: res.StatusCode,
27395 Header: res.Header,
27396 })
27397 }
27398 if err != nil {
27399 return nil, err
27400 }
27401 defer googleapi.CloseBody(res)
27402 if err := googleapi.CheckResponse(res); err != nil {
27403 return nil, gensupport.WrapError(err)
27404 }
27405 ret := &FloodlightConfiguration{
27406 ServerResponse: googleapi.ServerResponse{
27407 Header: res.Header,
27408 HTTPStatusCode: res.StatusCode,
27409 },
27410 }
27411 target := &ret
27412 if err := gensupport.DecodeResponse(target, res); err != nil {
27413 return nil, err
27414 }
27415 return ret, nil
27416 }
27417
27418 type InventoryItemsGetCall struct {
27419 s *Service
27420 profileId int64
27421 projectId int64
27422 id int64
27423 urlParams_ gensupport.URLParams
27424 ifNoneMatch_ string
27425 ctx_ context.Context
27426 header_ http.Header
27427 }
27428
27429
27430
27431
27432
27433
27434 func (r *InventoryItemsService) Get(profileId int64, projectId int64, id int64) *InventoryItemsGetCall {
27435 c := &InventoryItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27436 c.profileId = profileId
27437 c.projectId = projectId
27438 c.id = id
27439 return c
27440 }
27441
27442
27443
27444
27445 func (c *InventoryItemsGetCall) Fields(s ...googleapi.Field) *InventoryItemsGetCall {
27446 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27447 return c
27448 }
27449
27450
27451
27452
27453 func (c *InventoryItemsGetCall) IfNoneMatch(entityTag string) *InventoryItemsGetCall {
27454 c.ifNoneMatch_ = entityTag
27455 return c
27456 }
27457
27458
27459 func (c *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
27460 c.ctx_ = ctx
27461 return c
27462 }
27463
27464
27465
27466 func (c *InventoryItemsGetCall) Header() http.Header {
27467 if c.header_ == nil {
27468 c.header_ = make(http.Header)
27469 }
27470 return c.header_
27471 }
27472
27473 func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
27474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27475 if c.ifNoneMatch_ != "" {
27476 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27477 }
27478 var body io.Reader = nil
27479 c.urlParams_.Set("alt", alt)
27480 c.urlParams_.Set("prettyPrint", "false")
27481 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects/{projectId}/inventoryItems/{+id}")
27482 urls += "?" + c.urlParams_.Encode()
27483 req, err := http.NewRequest("GET", urls, body)
27484 if err != nil {
27485 return nil, err
27486 }
27487 req.Header = reqHeaders
27488 googleapi.Expand(req.URL, map[string]string{
27489 "profileId": strconv.FormatInt(c.profileId, 10),
27490 "projectId": strconv.FormatInt(c.projectId, 10),
27491 "id": strconv.FormatInt(c.id, 10),
27492 })
27493 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27494 }
27495
27496
27497
27498
27499
27500
27501 func (c *InventoryItemsGetCall) Do(opts ...googleapi.CallOption) (*InventoryItem, error) {
27502 gensupport.SetOptions(c.urlParams_, opts...)
27503 res, err := c.doRequest("json")
27504 if res != nil && res.StatusCode == http.StatusNotModified {
27505 if res.Body != nil {
27506 res.Body.Close()
27507 }
27508 return nil, gensupport.WrapError(&googleapi.Error{
27509 Code: res.StatusCode,
27510 Header: res.Header,
27511 })
27512 }
27513 if err != nil {
27514 return nil, err
27515 }
27516 defer googleapi.CloseBody(res)
27517 if err := googleapi.CheckResponse(res); err != nil {
27518 return nil, gensupport.WrapError(err)
27519 }
27520 ret := &InventoryItem{
27521 ServerResponse: googleapi.ServerResponse{
27522 Header: res.Header,
27523 HTTPStatusCode: res.StatusCode,
27524 },
27525 }
27526 target := &ret
27527 if err := gensupport.DecodeResponse(target, res); err != nil {
27528 return nil, err
27529 }
27530 return ret, nil
27531 }
27532
27533 type InventoryItemsListCall struct {
27534 s *Service
27535 profileId int64
27536 projectId int64
27537 urlParams_ gensupport.URLParams
27538 ifNoneMatch_ string
27539 ctx_ context.Context
27540 header_ http.Header
27541 }
27542
27543
27544
27545
27546
27547
27548 func (r *InventoryItemsService) List(profileId int64, projectId int64) *InventoryItemsListCall {
27549 c := &InventoryItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27550 c.profileId = profileId
27551 c.projectId = projectId
27552 return c
27553 }
27554
27555
27556
27557 func (c *InventoryItemsListCall) Ids(ids ...int64) *InventoryItemsListCall {
27558 var ids_ []string
27559 for _, v := range ids {
27560 ids_ = append(ids_, fmt.Sprint(v))
27561 }
27562 c.urlParams_.SetMulti("ids", ids_)
27563 return c
27564 }
27565
27566
27567
27568 func (c *InventoryItemsListCall) InPlan(inPlan bool) *InventoryItemsListCall {
27569 c.urlParams_.Set("inPlan", fmt.Sprint(inPlan))
27570 return c
27571 }
27572
27573
27574
27575 func (c *InventoryItemsListCall) MaxResults(maxResults int64) *InventoryItemsListCall {
27576 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27577 return c
27578 }
27579
27580
27581
27582 func (c *InventoryItemsListCall) OrderId(orderId ...int64) *InventoryItemsListCall {
27583 var orderId_ []string
27584 for _, v := range orderId {
27585 orderId_ = append(orderId_, fmt.Sprint(v))
27586 }
27587 c.urlParams_.SetMulti("orderId", orderId_)
27588 return c
27589 }
27590
27591
27592
27593 func (c *InventoryItemsListCall) PageToken(pageToken string) *InventoryItemsListCall {
27594 c.urlParams_.Set("pageToken", pageToken)
27595 return c
27596 }
27597
27598
27599
27600 func (c *InventoryItemsListCall) SiteId(siteId ...int64) *InventoryItemsListCall {
27601 var siteId_ []string
27602 for _, v := range siteId {
27603 siteId_ = append(siteId_, fmt.Sprint(v))
27604 }
27605 c.urlParams_.SetMulti("siteId", siteId_)
27606 return c
27607 }
27608
27609
27610
27611
27612
27613
27614
27615
27616 func (c *InventoryItemsListCall) SortField(sortField string) *InventoryItemsListCall {
27617 c.urlParams_.Set("sortField", sortField)
27618 return c
27619 }
27620
27621
27622
27623
27624
27625
27626
27627 func (c *InventoryItemsListCall) SortOrder(sortOrder string) *InventoryItemsListCall {
27628 c.urlParams_.Set("sortOrder", sortOrder)
27629 return c
27630 }
27631
27632
27633
27634
27635
27636
27637
27638
27639 func (c *InventoryItemsListCall) Type(type_ string) *InventoryItemsListCall {
27640 c.urlParams_.Set("type", type_)
27641 return c
27642 }
27643
27644
27645
27646
27647 func (c *InventoryItemsListCall) Fields(s ...googleapi.Field) *InventoryItemsListCall {
27648 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27649 return c
27650 }
27651
27652
27653
27654
27655 func (c *InventoryItemsListCall) IfNoneMatch(entityTag string) *InventoryItemsListCall {
27656 c.ifNoneMatch_ = entityTag
27657 return c
27658 }
27659
27660
27661 func (c *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
27662 c.ctx_ = ctx
27663 return c
27664 }
27665
27666
27667
27668 func (c *InventoryItemsListCall) Header() http.Header {
27669 if c.header_ == nil {
27670 c.header_ = make(http.Header)
27671 }
27672 return c.header_
27673 }
27674
27675 func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
27676 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27677 if c.ifNoneMatch_ != "" {
27678 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27679 }
27680 var body io.Reader = nil
27681 c.urlParams_.Set("alt", alt)
27682 c.urlParams_.Set("prettyPrint", "false")
27683 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects/{projectId}/inventoryItems")
27684 urls += "?" + c.urlParams_.Encode()
27685 req, err := http.NewRequest("GET", urls, body)
27686 if err != nil {
27687 return nil, err
27688 }
27689 req.Header = reqHeaders
27690 googleapi.Expand(req.URL, map[string]string{
27691 "profileId": strconv.FormatInt(c.profileId, 10),
27692 "projectId": strconv.FormatInt(c.projectId, 10),
27693 })
27694 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27695 }
27696
27697
27698
27699
27700
27701
27702
27703 func (c *InventoryItemsListCall) Do(opts ...googleapi.CallOption) (*InventoryItemsListResponse, error) {
27704 gensupport.SetOptions(c.urlParams_, opts...)
27705 res, err := c.doRequest("json")
27706 if res != nil && res.StatusCode == http.StatusNotModified {
27707 if res.Body != nil {
27708 res.Body.Close()
27709 }
27710 return nil, gensupport.WrapError(&googleapi.Error{
27711 Code: res.StatusCode,
27712 Header: res.Header,
27713 })
27714 }
27715 if err != nil {
27716 return nil, err
27717 }
27718 defer googleapi.CloseBody(res)
27719 if err := googleapi.CheckResponse(res); err != nil {
27720 return nil, gensupport.WrapError(err)
27721 }
27722 ret := &InventoryItemsListResponse{
27723 ServerResponse: googleapi.ServerResponse{
27724 Header: res.Header,
27725 HTTPStatusCode: res.StatusCode,
27726 },
27727 }
27728 target := &ret
27729 if err := gensupport.DecodeResponse(target, res); err != nil {
27730 return nil, err
27731 }
27732 return ret, nil
27733 }
27734
27735
27736
27737
27738 func (c *InventoryItemsListCall) Pages(ctx context.Context, f func(*InventoryItemsListResponse) error) error {
27739 c.ctx_ = ctx
27740 defer c.PageToken(c.urlParams_.Get("pageToken"))
27741 for {
27742 x, err := c.Do()
27743 if err != nil {
27744 return err
27745 }
27746 if err := f(x); err != nil {
27747 return err
27748 }
27749 if x.NextPageToken == "" {
27750 return nil
27751 }
27752 c.PageToken(x.NextPageToken)
27753 }
27754 }
27755
27756 type LanguagesListCall struct {
27757 s *Service
27758 profileId int64
27759 urlParams_ gensupport.URLParams
27760 ifNoneMatch_ string
27761 ctx_ context.Context
27762 header_ http.Header
27763 }
27764
27765
27766
27767
27768 func (r *LanguagesService) List(profileId int64) *LanguagesListCall {
27769 c := &LanguagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27770 c.profileId = profileId
27771 return c
27772 }
27773
27774
27775
27776
27777 func (c *LanguagesListCall) Fields(s ...googleapi.Field) *LanguagesListCall {
27778 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27779 return c
27780 }
27781
27782
27783
27784
27785 func (c *LanguagesListCall) IfNoneMatch(entityTag string) *LanguagesListCall {
27786 c.ifNoneMatch_ = entityTag
27787 return c
27788 }
27789
27790
27791 func (c *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
27792 c.ctx_ = ctx
27793 return c
27794 }
27795
27796
27797
27798 func (c *LanguagesListCall) Header() http.Header {
27799 if c.header_ == nil {
27800 c.header_ = make(http.Header)
27801 }
27802 return c.header_
27803 }
27804
27805 func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
27806 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27807 if c.ifNoneMatch_ != "" {
27808 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27809 }
27810 var body io.Reader = nil
27811 c.urlParams_.Set("alt", alt)
27812 c.urlParams_.Set("prettyPrint", "false")
27813 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/languages")
27814 urls += "?" + c.urlParams_.Encode()
27815 req, err := http.NewRequest("GET", urls, body)
27816 if err != nil {
27817 return nil, err
27818 }
27819 req.Header = reqHeaders
27820 googleapi.Expand(req.URL, map[string]string{
27821 "profileId": strconv.FormatInt(c.profileId, 10),
27822 })
27823 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27824 }
27825
27826
27827
27828
27829
27830
27831
27832 func (c *LanguagesListCall) Do(opts ...googleapi.CallOption) (*LanguagesListResponse, error) {
27833 gensupport.SetOptions(c.urlParams_, opts...)
27834 res, err := c.doRequest("json")
27835 if res != nil && res.StatusCode == http.StatusNotModified {
27836 if res.Body != nil {
27837 res.Body.Close()
27838 }
27839 return nil, gensupport.WrapError(&googleapi.Error{
27840 Code: res.StatusCode,
27841 Header: res.Header,
27842 })
27843 }
27844 if err != nil {
27845 return nil, err
27846 }
27847 defer googleapi.CloseBody(res)
27848 if err := googleapi.CheckResponse(res); err != nil {
27849 return nil, gensupport.WrapError(err)
27850 }
27851 ret := &LanguagesListResponse{
27852 ServerResponse: googleapi.ServerResponse{
27853 Header: res.Header,
27854 HTTPStatusCode: res.StatusCode,
27855 },
27856 }
27857 target := &ret
27858 if err := gensupport.DecodeResponse(target, res); err != nil {
27859 return nil, err
27860 }
27861 return ret, nil
27862 }
27863
27864 type MetrosListCall struct {
27865 s *Service
27866 profileId int64
27867 urlParams_ gensupport.URLParams
27868 ifNoneMatch_ string
27869 ctx_ context.Context
27870 header_ http.Header
27871 }
27872
27873
27874
27875
27876 func (r *MetrosService) List(profileId int64) *MetrosListCall {
27877 c := &MetrosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27878 c.profileId = profileId
27879 return c
27880 }
27881
27882
27883
27884
27885 func (c *MetrosListCall) Fields(s ...googleapi.Field) *MetrosListCall {
27886 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27887 return c
27888 }
27889
27890
27891
27892
27893 func (c *MetrosListCall) IfNoneMatch(entityTag string) *MetrosListCall {
27894 c.ifNoneMatch_ = entityTag
27895 return c
27896 }
27897
27898
27899 func (c *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
27900 c.ctx_ = ctx
27901 return c
27902 }
27903
27904
27905
27906 func (c *MetrosListCall) Header() http.Header {
27907 if c.header_ == nil {
27908 c.header_ = make(http.Header)
27909 }
27910 return c.header_
27911 }
27912
27913 func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
27914 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
27915 if c.ifNoneMatch_ != "" {
27916 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27917 }
27918 var body io.Reader = nil
27919 c.urlParams_.Set("alt", alt)
27920 c.urlParams_.Set("prettyPrint", "false")
27921 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/metros")
27922 urls += "?" + c.urlParams_.Encode()
27923 req, err := http.NewRequest("GET", urls, body)
27924 if err != nil {
27925 return nil, err
27926 }
27927 req.Header = reqHeaders
27928 googleapi.Expand(req.URL, map[string]string{
27929 "profileId": strconv.FormatInt(c.profileId, 10),
27930 })
27931 return gensupport.SendRequest(c.ctx_, c.s.client, req)
27932 }
27933
27934
27935
27936
27937
27938
27939
27940 func (c *MetrosListCall) Do(opts ...googleapi.CallOption) (*MetrosListResponse, error) {
27941 gensupport.SetOptions(c.urlParams_, opts...)
27942 res, err := c.doRequest("json")
27943 if res != nil && res.StatusCode == http.StatusNotModified {
27944 if res.Body != nil {
27945 res.Body.Close()
27946 }
27947 return nil, gensupport.WrapError(&googleapi.Error{
27948 Code: res.StatusCode,
27949 Header: res.Header,
27950 })
27951 }
27952 if err != nil {
27953 return nil, err
27954 }
27955 defer googleapi.CloseBody(res)
27956 if err := googleapi.CheckResponse(res); err != nil {
27957 return nil, gensupport.WrapError(err)
27958 }
27959 ret := &MetrosListResponse{
27960 ServerResponse: googleapi.ServerResponse{
27961 Header: res.Header,
27962 HTTPStatusCode: res.StatusCode,
27963 },
27964 }
27965 target := &ret
27966 if err := gensupport.DecodeResponse(target, res); err != nil {
27967 return nil, err
27968 }
27969 return ret, nil
27970 }
27971
27972 type MobileAppsGetCall struct {
27973 s *Service
27974 profileId int64
27975 id string
27976 urlParams_ gensupport.URLParams
27977 ifNoneMatch_ string
27978 ctx_ context.Context
27979 header_ http.Header
27980 }
27981
27982
27983
27984
27985
27986 func (r *MobileAppsService) Get(profileId int64, id string) *MobileAppsGetCall {
27987 c := &MobileAppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27988 c.profileId = profileId
27989 c.id = id
27990 return c
27991 }
27992
27993
27994
27995
27996 func (c *MobileAppsGetCall) Fields(s ...googleapi.Field) *MobileAppsGetCall {
27997 c.urlParams_.Set("fields", googleapi.CombineFields(s))
27998 return c
27999 }
28000
28001
28002
28003
28004 func (c *MobileAppsGetCall) IfNoneMatch(entityTag string) *MobileAppsGetCall {
28005 c.ifNoneMatch_ = entityTag
28006 return c
28007 }
28008
28009
28010 func (c *MobileAppsGetCall) Context(ctx context.Context) *MobileAppsGetCall {
28011 c.ctx_ = ctx
28012 return c
28013 }
28014
28015
28016
28017 func (c *MobileAppsGetCall) Header() http.Header {
28018 if c.header_ == nil {
28019 c.header_ = make(http.Header)
28020 }
28021 return c.header_
28022 }
28023
28024 func (c *MobileAppsGetCall) doRequest(alt string) (*http.Response, error) {
28025 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28026 if c.ifNoneMatch_ != "" {
28027 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28028 }
28029 var body io.Reader = nil
28030 c.urlParams_.Set("alt", alt)
28031 c.urlParams_.Set("prettyPrint", "false")
28032 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/mobileApps/{+id}")
28033 urls += "?" + c.urlParams_.Encode()
28034 req, err := http.NewRequest("GET", urls, body)
28035 if err != nil {
28036 return nil, err
28037 }
28038 req.Header = reqHeaders
28039 googleapi.Expand(req.URL, map[string]string{
28040 "profileId": strconv.FormatInt(c.profileId, 10),
28041 "id": c.id,
28042 })
28043 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28044 }
28045
28046
28047
28048
28049
28050
28051 func (c *MobileAppsGetCall) Do(opts ...googleapi.CallOption) (*MobileApp, error) {
28052 gensupport.SetOptions(c.urlParams_, opts...)
28053 res, err := c.doRequest("json")
28054 if res != nil && res.StatusCode == http.StatusNotModified {
28055 if res.Body != nil {
28056 res.Body.Close()
28057 }
28058 return nil, gensupport.WrapError(&googleapi.Error{
28059 Code: res.StatusCode,
28060 Header: res.Header,
28061 })
28062 }
28063 if err != nil {
28064 return nil, err
28065 }
28066 defer googleapi.CloseBody(res)
28067 if err := googleapi.CheckResponse(res); err != nil {
28068 return nil, gensupport.WrapError(err)
28069 }
28070 ret := &MobileApp{
28071 ServerResponse: googleapi.ServerResponse{
28072 Header: res.Header,
28073 HTTPStatusCode: res.StatusCode,
28074 },
28075 }
28076 target := &ret
28077 if err := gensupport.DecodeResponse(target, res); err != nil {
28078 return nil, err
28079 }
28080 return ret, nil
28081 }
28082
28083 type MobileAppsListCall struct {
28084 s *Service
28085 profileId int64
28086 urlParams_ gensupport.URLParams
28087 ifNoneMatch_ string
28088 ctx_ context.Context
28089 header_ http.Header
28090 }
28091
28092
28093
28094
28095 func (r *MobileAppsService) List(profileId int64) *MobileAppsListCall {
28096 c := &MobileAppsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28097 c.profileId = profileId
28098 return c
28099 }
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117 func (c *MobileAppsListCall) Directories(directories ...string) *MobileAppsListCall {
28118 c.urlParams_.SetMulti("directories", append([]string{}, directories...))
28119 return c
28120 }
28121
28122
28123 func (c *MobileAppsListCall) Ids(ids ...string) *MobileAppsListCall {
28124 c.urlParams_.SetMulti("ids", append([]string{}, ids...))
28125 return c
28126 }
28127
28128
28129
28130 func (c *MobileAppsListCall) MaxResults(maxResults int64) *MobileAppsListCall {
28131 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28132 return c
28133 }
28134
28135
28136
28137 func (c *MobileAppsListCall) PageToken(pageToken string) *MobileAppsListCall {
28138 c.urlParams_.Set("pageToken", pageToken)
28139 return c
28140 }
28141
28142
28143
28144
28145
28146
28147
28148
28149 func (c *MobileAppsListCall) SearchString(searchString string) *MobileAppsListCall {
28150 c.urlParams_.Set("searchString", searchString)
28151 return c
28152 }
28153
28154
28155
28156
28157 func (c *MobileAppsListCall) Fields(s ...googleapi.Field) *MobileAppsListCall {
28158 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28159 return c
28160 }
28161
28162
28163
28164
28165 func (c *MobileAppsListCall) IfNoneMatch(entityTag string) *MobileAppsListCall {
28166 c.ifNoneMatch_ = entityTag
28167 return c
28168 }
28169
28170
28171 func (c *MobileAppsListCall) Context(ctx context.Context) *MobileAppsListCall {
28172 c.ctx_ = ctx
28173 return c
28174 }
28175
28176
28177
28178 func (c *MobileAppsListCall) Header() http.Header {
28179 if c.header_ == nil {
28180 c.header_ = make(http.Header)
28181 }
28182 return c.header_
28183 }
28184
28185 func (c *MobileAppsListCall) doRequest(alt string) (*http.Response, error) {
28186 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28187 if c.ifNoneMatch_ != "" {
28188 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28189 }
28190 var body io.Reader = nil
28191 c.urlParams_.Set("alt", alt)
28192 c.urlParams_.Set("prettyPrint", "false")
28193 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/mobileApps")
28194 urls += "?" + c.urlParams_.Encode()
28195 req, err := http.NewRequest("GET", urls, body)
28196 if err != nil {
28197 return nil, err
28198 }
28199 req.Header = reqHeaders
28200 googleapi.Expand(req.URL, map[string]string{
28201 "profileId": strconv.FormatInt(c.profileId, 10),
28202 })
28203 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28204 }
28205
28206
28207
28208
28209
28210
28211
28212 func (c *MobileAppsListCall) Do(opts ...googleapi.CallOption) (*MobileAppsListResponse, error) {
28213 gensupport.SetOptions(c.urlParams_, opts...)
28214 res, err := c.doRequest("json")
28215 if res != nil && res.StatusCode == http.StatusNotModified {
28216 if res.Body != nil {
28217 res.Body.Close()
28218 }
28219 return nil, gensupport.WrapError(&googleapi.Error{
28220 Code: res.StatusCode,
28221 Header: res.Header,
28222 })
28223 }
28224 if err != nil {
28225 return nil, err
28226 }
28227 defer googleapi.CloseBody(res)
28228 if err := googleapi.CheckResponse(res); err != nil {
28229 return nil, gensupport.WrapError(err)
28230 }
28231 ret := &MobileAppsListResponse{
28232 ServerResponse: googleapi.ServerResponse{
28233 Header: res.Header,
28234 HTTPStatusCode: res.StatusCode,
28235 },
28236 }
28237 target := &ret
28238 if err := gensupport.DecodeResponse(target, res); err != nil {
28239 return nil, err
28240 }
28241 return ret, nil
28242 }
28243
28244
28245
28246
28247 func (c *MobileAppsListCall) Pages(ctx context.Context, f func(*MobileAppsListResponse) error) error {
28248 c.ctx_ = ctx
28249 defer c.PageToken(c.urlParams_.Get("pageToken"))
28250 for {
28251 x, err := c.Do()
28252 if err != nil {
28253 return err
28254 }
28255 if err := f(x); err != nil {
28256 return err
28257 }
28258 if x.NextPageToken == "" {
28259 return nil
28260 }
28261 c.PageToken(x.NextPageToken)
28262 }
28263 }
28264
28265 type MobileCarriersGetCall struct {
28266 s *Service
28267 profileId int64
28268 id int64
28269 urlParams_ gensupport.URLParams
28270 ifNoneMatch_ string
28271 ctx_ context.Context
28272 header_ http.Header
28273 }
28274
28275
28276
28277
28278
28279 func (r *MobileCarriersService) Get(profileId int64, id int64) *MobileCarriersGetCall {
28280 c := &MobileCarriersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28281 c.profileId = profileId
28282 c.id = id
28283 return c
28284 }
28285
28286
28287
28288
28289 func (c *MobileCarriersGetCall) Fields(s ...googleapi.Field) *MobileCarriersGetCall {
28290 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28291 return c
28292 }
28293
28294
28295
28296
28297 func (c *MobileCarriersGetCall) IfNoneMatch(entityTag string) *MobileCarriersGetCall {
28298 c.ifNoneMatch_ = entityTag
28299 return c
28300 }
28301
28302
28303 func (c *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
28304 c.ctx_ = ctx
28305 return c
28306 }
28307
28308
28309
28310 func (c *MobileCarriersGetCall) Header() http.Header {
28311 if c.header_ == nil {
28312 c.header_ = make(http.Header)
28313 }
28314 return c.header_
28315 }
28316
28317 func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
28318 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28319 if c.ifNoneMatch_ != "" {
28320 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28321 }
28322 var body io.Reader = nil
28323 c.urlParams_.Set("alt", alt)
28324 c.urlParams_.Set("prettyPrint", "false")
28325 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/mobileCarriers/{+id}")
28326 urls += "?" + c.urlParams_.Encode()
28327 req, err := http.NewRequest("GET", urls, body)
28328 if err != nil {
28329 return nil, err
28330 }
28331 req.Header = reqHeaders
28332 googleapi.Expand(req.URL, map[string]string{
28333 "profileId": strconv.FormatInt(c.profileId, 10),
28334 "id": strconv.FormatInt(c.id, 10),
28335 })
28336 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28337 }
28338
28339
28340
28341
28342
28343
28344 func (c *MobileCarriersGetCall) Do(opts ...googleapi.CallOption) (*MobileCarrier, error) {
28345 gensupport.SetOptions(c.urlParams_, opts...)
28346 res, err := c.doRequest("json")
28347 if res != nil && res.StatusCode == http.StatusNotModified {
28348 if res.Body != nil {
28349 res.Body.Close()
28350 }
28351 return nil, gensupport.WrapError(&googleapi.Error{
28352 Code: res.StatusCode,
28353 Header: res.Header,
28354 })
28355 }
28356 if err != nil {
28357 return nil, err
28358 }
28359 defer googleapi.CloseBody(res)
28360 if err := googleapi.CheckResponse(res); err != nil {
28361 return nil, gensupport.WrapError(err)
28362 }
28363 ret := &MobileCarrier{
28364 ServerResponse: googleapi.ServerResponse{
28365 Header: res.Header,
28366 HTTPStatusCode: res.StatusCode,
28367 },
28368 }
28369 target := &ret
28370 if err := gensupport.DecodeResponse(target, res); err != nil {
28371 return nil, err
28372 }
28373 return ret, nil
28374 }
28375
28376 type MobileCarriersListCall struct {
28377 s *Service
28378 profileId int64
28379 urlParams_ gensupport.URLParams
28380 ifNoneMatch_ string
28381 ctx_ context.Context
28382 header_ http.Header
28383 }
28384
28385
28386
28387
28388 func (r *MobileCarriersService) List(profileId int64) *MobileCarriersListCall {
28389 c := &MobileCarriersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28390 c.profileId = profileId
28391 return c
28392 }
28393
28394
28395
28396
28397 func (c *MobileCarriersListCall) Fields(s ...googleapi.Field) *MobileCarriersListCall {
28398 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28399 return c
28400 }
28401
28402
28403
28404
28405 func (c *MobileCarriersListCall) IfNoneMatch(entityTag string) *MobileCarriersListCall {
28406 c.ifNoneMatch_ = entityTag
28407 return c
28408 }
28409
28410
28411 func (c *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
28412 c.ctx_ = ctx
28413 return c
28414 }
28415
28416
28417
28418 func (c *MobileCarriersListCall) Header() http.Header {
28419 if c.header_ == nil {
28420 c.header_ = make(http.Header)
28421 }
28422 return c.header_
28423 }
28424
28425 func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
28426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28427 if c.ifNoneMatch_ != "" {
28428 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28429 }
28430 var body io.Reader = nil
28431 c.urlParams_.Set("alt", alt)
28432 c.urlParams_.Set("prettyPrint", "false")
28433 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/mobileCarriers")
28434 urls += "?" + c.urlParams_.Encode()
28435 req, err := http.NewRequest("GET", urls, body)
28436 if err != nil {
28437 return nil, err
28438 }
28439 req.Header = reqHeaders
28440 googleapi.Expand(req.URL, map[string]string{
28441 "profileId": strconv.FormatInt(c.profileId, 10),
28442 })
28443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28444 }
28445
28446
28447
28448
28449
28450
28451
28452 func (c *MobileCarriersListCall) Do(opts ...googleapi.CallOption) (*MobileCarriersListResponse, error) {
28453 gensupport.SetOptions(c.urlParams_, opts...)
28454 res, err := c.doRequest("json")
28455 if res != nil && res.StatusCode == http.StatusNotModified {
28456 if res.Body != nil {
28457 res.Body.Close()
28458 }
28459 return nil, gensupport.WrapError(&googleapi.Error{
28460 Code: res.StatusCode,
28461 Header: res.Header,
28462 })
28463 }
28464 if err != nil {
28465 return nil, err
28466 }
28467 defer googleapi.CloseBody(res)
28468 if err := googleapi.CheckResponse(res); err != nil {
28469 return nil, gensupport.WrapError(err)
28470 }
28471 ret := &MobileCarriersListResponse{
28472 ServerResponse: googleapi.ServerResponse{
28473 Header: res.Header,
28474 HTTPStatusCode: res.StatusCode,
28475 },
28476 }
28477 target := &ret
28478 if err := gensupport.DecodeResponse(target, res); err != nil {
28479 return nil, err
28480 }
28481 return ret, nil
28482 }
28483
28484 type OperatingSystemVersionsGetCall struct {
28485 s *Service
28486 profileId int64
28487 id int64
28488 urlParams_ gensupport.URLParams
28489 ifNoneMatch_ string
28490 ctx_ context.Context
28491 header_ http.Header
28492 }
28493
28494
28495
28496
28497
28498 func (r *OperatingSystemVersionsService) Get(profileId int64, id int64) *OperatingSystemVersionsGetCall {
28499 c := &OperatingSystemVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28500 c.profileId = profileId
28501 c.id = id
28502 return c
28503 }
28504
28505
28506
28507
28508 func (c *OperatingSystemVersionsGetCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsGetCall {
28509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28510 return c
28511 }
28512
28513
28514
28515
28516 func (c *OperatingSystemVersionsGetCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsGetCall {
28517 c.ifNoneMatch_ = entityTag
28518 return c
28519 }
28520
28521
28522 func (c *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
28523 c.ctx_ = ctx
28524 return c
28525 }
28526
28527
28528
28529 func (c *OperatingSystemVersionsGetCall) Header() http.Header {
28530 if c.header_ == nil {
28531 c.header_ = make(http.Header)
28532 }
28533 return c.header_
28534 }
28535
28536 func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
28537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28538 if c.ifNoneMatch_ != "" {
28539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28540 }
28541 var body io.Reader = nil
28542 c.urlParams_.Set("alt", alt)
28543 c.urlParams_.Set("prettyPrint", "false")
28544 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/operatingSystemVersions/{+id}")
28545 urls += "?" + c.urlParams_.Encode()
28546 req, err := http.NewRequest("GET", urls, body)
28547 if err != nil {
28548 return nil, err
28549 }
28550 req.Header = reqHeaders
28551 googleapi.Expand(req.URL, map[string]string{
28552 "profileId": strconv.FormatInt(c.profileId, 10),
28553 "id": strconv.FormatInt(c.id, 10),
28554 })
28555 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28556 }
28557
28558
28559
28560
28561
28562
28563
28564 func (c *OperatingSystemVersionsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersion, error) {
28565 gensupport.SetOptions(c.urlParams_, opts...)
28566 res, err := c.doRequest("json")
28567 if res != nil && res.StatusCode == http.StatusNotModified {
28568 if res.Body != nil {
28569 res.Body.Close()
28570 }
28571 return nil, gensupport.WrapError(&googleapi.Error{
28572 Code: res.StatusCode,
28573 Header: res.Header,
28574 })
28575 }
28576 if err != nil {
28577 return nil, err
28578 }
28579 defer googleapi.CloseBody(res)
28580 if err := googleapi.CheckResponse(res); err != nil {
28581 return nil, gensupport.WrapError(err)
28582 }
28583 ret := &OperatingSystemVersion{
28584 ServerResponse: googleapi.ServerResponse{
28585 Header: res.Header,
28586 HTTPStatusCode: res.StatusCode,
28587 },
28588 }
28589 target := &ret
28590 if err := gensupport.DecodeResponse(target, res); err != nil {
28591 return nil, err
28592 }
28593 return ret, nil
28594 }
28595
28596 type OperatingSystemVersionsListCall struct {
28597 s *Service
28598 profileId int64
28599 urlParams_ gensupport.URLParams
28600 ifNoneMatch_ string
28601 ctx_ context.Context
28602 header_ http.Header
28603 }
28604
28605
28606
28607
28608 func (r *OperatingSystemVersionsService) List(profileId int64) *OperatingSystemVersionsListCall {
28609 c := &OperatingSystemVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28610 c.profileId = profileId
28611 return c
28612 }
28613
28614
28615
28616
28617 func (c *OperatingSystemVersionsListCall) Fields(s ...googleapi.Field) *OperatingSystemVersionsListCall {
28618 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28619 return c
28620 }
28621
28622
28623
28624
28625 func (c *OperatingSystemVersionsListCall) IfNoneMatch(entityTag string) *OperatingSystemVersionsListCall {
28626 c.ifNoneMatch_ = entityTag
28627 return c
28628 }
28629
28630
28631 func (c *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
28632 c.ctx_ = ctx
28633 return c
28634 }
28635
28636
28637
28638 func (c *OperatingSystemVersionsListCall) Header() http.Header {
28639 if c.header_ == nil {
28640 c.header_ = make(http.Header)
28641 }
28642 return c.header_
28643 }
28644
28645 func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
28646 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28647 if c.ifNoneMatch_ != "" {
28648 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28649 }
28650 var body io.Reader = nil
28651 c.urlParams_.Set("alt", alt)
28652 c.urlParams_.Set("prettyPrint", "false")
28653 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/operatingSystemVersions")
28654 urls += "?" + c.urlParams_.Encode()
28655 req, err := http.NewRequest("GET", urls, body)
28656 if err != nil {
28657 return nil, err
28658 }
28659 req.Header = reqHeaders
28660 googleapi.Expand(req.URL, map[string]string{
28661 "profileId": strconv.FormatInt(c.profileId, 10),
28662 })
28663 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28664 }
28665
28666
28667
28668
28669
28670
28671
28672 func (c *OperatingSystemVersionsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemVersionsListResponse, error) {
28673 gensupport.SetOptions(c.urlParams_, opts...)
28674 res, err := c.doRequest("json")
28675 if res != nil && res.StatusCode == http.StatusNotModified {
28676 if res.Body != nil {
28677 res.Body.Close()
28678 }
28679 return nil, gensupport.WrapError(&googleapi.Error{
28680 Code: res.StatusCode,
28681 Header: res.Header,
28682 })
28683 }
28684 if err != nil {
28685 return nil, err
28686 }
28687 defer googleapi.CloseBody(res)
28688 if err := googleapi.CheckResponse(res); err != nil {
28689 return nil, gensupport.WrapError(err)
28690 }
28691 ret := &OperatingSystemVersionsListResponse{
28692 ServerResponse: googleapi.ServerResponse{
28693 Header: res.Header,
28694 HTTPStatusCode: res.StatusCode,
28695 },
28696 }
28697 target := &ret
28698 if err := gensupport.DecodeResponse(target, res); err != nil {
28699 return nil, err
28700 }
28701 return ret, nil
28702 }
28703
28704 type OperatingSystemsGetCall struct {
28705 s *Service
28706 profileId int64
28707 dartId int64
28708 urlParams_ gensupport.URLParams
28709 ifNoneMatch_ string
28710 ctx_ context.Context
28711 header_ http.Header
28712 }
28713
28714
28715
28716
28717
28718 func (r *OperatingSystemsService) Get(profileId int64, dartId int64) *OperatingSystemsGetCall {
28719 c := &OperatingSystemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28720 c.profileId = profileId
28721 c.dartId = dartId
28722 return c
28723 }
28724
28725
28726
28727
28728 func (c *OperatingSystemsGetCall) Fields(s ...googleapi.Field) *OperatingSystemsGetCall {
28729 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28730 return c
28731 }
28732
28733
28734
28735
28736 func (c *OperatingSystemsGetCall) IfNoneMatch(entityTag string) *OperatingSystemsGetCall {
28737 c.ifNoneMatch_ = entityTag
28738 return c
28739 }
28740
28741
28742 func (c *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
28743 c.ctx_ = ctx
28744 return c
28745 }
28746
28747
28748
28749 func (c *OperatingSystemsGetCall) Header() http.Header {
28750 if c.header_ == nil {
28751 c.header_ = make(http.Header)
28752 }
28753 return c.header_
28754 }
28755
28756 func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
28757 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28758 if c.ifNoneMatch_ != "" {
28759 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28760 }
28761 var body io.Reader = nil
28762 c.urlParams_.Set("alt", alt)
28763 c.urlParams_.Set("prettyPrint", "false")
28764 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/operatingSystems/{+dartId}")
28765 urls += "?" + c.urlParams_.Encode()
28766 req, err := http.NewRequest("GET", urls, body)
28767 if err != nil {
28768 return nil, err
28769 }
28770 req.Header = reqHeaders
28771 googleapi.Expand(req.URL, map[string]string{
28772 "profileId": strconv.FormatInt(c.profileId, 10),
28773 "dartId": strconv.FormatInt(c.dartId, 10),
28774 })
28775 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28776 }
28777
28778
28779
28780
28781
28782
28783
28784 func (c *OperatingSystemsGetCall) Do(opts ...googleapi.CallOption) (*OperatingSystem, error) {
28785 gensupport.SetOptions(c.urlParams_, opts...)
28786 res, err := c.doRequest("json")
28787 if res != nil && res.StatusCode == http.StatusNotModified {
28788 if res.Body != nil {
28789 res.Body.Close()
28790 }
28791 return nil, gensupport.WrapError(&googleapi.Error{
28792 Code: res.StatusCode,
28793 Header: res.Header,
28794 })
28795 }
28796 if err != nil {
28797 return nil, err
28798 }
28799 defer googleapi.CloseBody(res)
28800 if err := googleapi.CheckResponse(res); err != nil {
28801 return nil, gensupport.WrapError(err)
28802 }
28803 ret := &OperatingSystem{
28804 ServerResponse: googleapi.ServerResponse{
28805 Header: res.Header,
28806 HTTPStatusCode: res.StatusCode,
28807 },
28808 }
28809 target := &ret
28810 if err := gensupport.DecodeResponse(target, res); err != nil {
28811 return nil, err
28812 }
28813 return ret, nil
28814 }
28815
28816 type OperatingSystemsListCall struct {
28817 s *Service
28818 profileId int64
28819 urlParams_ gensupport.URLParams
28820 ifNoneMatch_ string
28821 ctx_ context.Context
28822 header_ http.Header
28823 }
28824
28825
28826
28827
28828 func (r *OperatingSystemsService) List(profileId int64) *OperatingSystemsListCall {
28829 c := &OperatingSystemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28830 c.profileId = profileId
28831 return c
28832 }
28833
28834
28835
28836
28837 func (c *OperatingSystemsListCall) Fields(s ...googleapi.Field) *OperatingSystemsListCall {
28838 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28839 return c
28840 }
28841
28842
28843
28844
28845 func (c *OperatingSystemsListCall) IfNoneMatch(entityTag string) *OperatingSystemsListCall {
28846 c.ifNoneMatch_ = entityTag
28847 return c
28848 }
28849
28850
28851 func (c *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
28852 c.ctx_ = ctx
28853 return c
28854 }
28855
28856
28857
28858 func (c *OperatingSystemsListCall) Header() http.Header {
28859 if c.header_ == nil {
28860 c.header_ = make(http.Header)
28861 }
28862 return c.header_
28863 }
28864
28865 func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
28866 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28867 if c.ifNoneMatch_ != "" {
28868 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28869 }
28870 var body io.Reader = nil
28871 c.urlParams_.Set("alt", alt)
28872 c.urlParams_.Set("prettyPrint", "false")
28873 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/operatingSystems")
28874 urls += "?" + c.urlParams_.Encode()
28875 req, err := http.NewRequest("GET", urls, body)
28876 if err != nil {
28877 return nil, err
28878 }
28879 req.Header = reqHeaders
28880 googleapi.Expand(req.URL, map[string]string{
28881 "profileId": strconv.FormatInt(c.profileId, 10),
28882 })
28883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
28884 }
28885
28886
28887
28888
28889
28890
28891
28892 func (c *OperatingSystemsListCall) Do(opts ...googleapi.CallOption) (*OperatingSystemsListResponse, error) {
28893 gensupport.SetOptions(c.urlParams_, opts...)
28894 res, err := c.doRequest("json")
28895 if res != nil && res.StatusCode == http.StatusNotModified {
28896 if res.Body != nil {
28897 res.Body.Close()
28898 }
28899 return nil, gensupport.WrapError(&googleapi.Error{
28900 Code: res.StatusCode,
28901 Header: res.Header,
28902 })
28903 }
28904 if err != nil {
28905 return nil, err
28906 }
28907 defer googleapi.CloseBody(res)
28908 if err := googleapi.CheckResponse(res); err != nil {
28909 return nil, gensupport.WrapError(err)
28910 }
28911 ret := &OperatingSystemsListResponse{
28912 ServerResponse: googleapi.ServerResponse{
28913 Header: res.Header,
28914 HTTPStatusCode: res.StatusCode,
28915 },
28916 }
28917 target := &ret
28918 if err := gensupport.DecodeResponse(target, res); err != nil {
28919 return nil, err
28920 }
28921 return ret, nil
28922 }
28923
28924 type OrdersGetCall struct {
28925 s *Service
28926 profileId int64
28927 projectId int64
28928 id int64
28929 urlParams_ gensupport.URLParams
28930 ifNoneMatch_ string
28931 ctx_ context.Context
28932 header_ http.Header
28933 }
28934
28935
28936
28937
28938
28939
28940 func (r *OrdersService) Get(profileId int64, projectId int64, id int64) *OrdersGetCall {
28941 c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28942 c.profileId = profileId
28943 c.projectId = projectId
28944 c.id = id
28945 return c
28946 }
28947
28948
28949
28950
28951 func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
28952 c.urlParams_.Set("fields", googleapi.CombineFields(s))
28953 return c
28954 }
28955
28956
28957
28958
28959 func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
28960 c.ifNoneMatch_ = entityTag
28961 return c
28962 }
28963
28964
28965 func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
28966 c.ctx_ = ctx
28967 return c
28968 }
28969
28970
28971
28972 func (c *OrdersGetCall) Header() http.Header {
28973 if c.header_ == nil {
28974 c.header_ = make(http.Header)
28975 }
28976 return c.header_
28977 }
28978
28979 func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
28980 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
28981 if c.ifNoneMatch_ != "" {
28982 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28983 }
28984 var body io.Reader = nil
28985 c.urlParams_.Set("alt", alt)
28986 c.urlParams_.Set("prettyPrint", "false")
28987 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects/{projectId}/orders/{+id}")
28988 urls += "?" + c.urlParams_.Encode()
28989 req, err := http.NewRequest("GET", urls, body)
28990 if err != nil {
28991 return nil, err
28992 }
28993 req.Header = reqHeaders
28994 googleapi.Expand(req.URL, map[string]string{
28995 "profileId": strconv.FormatInt(c.profileId, 10),
28996 "projectId": strconv.FormatInt(c.projectId, 10),
28997 "id": strconv.FormatInt(c.id, 10),
28998 })
28999 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29000 }
29001
29002
29003
29004
29005
29006
29007 func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
29008 gensupport.SetOptions(c.urlParams_, opts...)
29009 res, err := c.doRequest("json")
29010 if res != nil && res.StatusCode == http.StatusNotModified {
29011 if res.Body != nil {
29012 res.Body.Close()
29013 }
29014 return nil, gensupport.WrapError(&googleapi.Error{
29015 Code: res.StatusCode,
29016 Header: res.Header,
29017 })
29018 }
29019 if err != nil {
29020 return nil, err
29021 }
29022 defer googleapi.CloseBody(res)
29023 if err := googleapi.CheckResponse(res); err != nil {
29024 return nil, gensupport.WrapError(err)
29025 }
29026 ret := &Order{
29027 ServerResponse: googleapi.ServerResponse{
29028 Header: res.Header,
29029 HTTPStatusCode: res.StatusCode,
29030 },
29031 }
29032 target := &ret
29033 if err := gensupport.DecodeResponse(target, res); err != nil {
29034 return nil, err
29035 }
29036 return ret, nil
29037 }
29038
29039 type OrdersListCall struct {
29040 s *Service
29041 profileId int64
29042 projectId int64
29043 urlParams_ gensupport.URLParams
29044 ifNoneMatch_ string
29045 ctx_ context.Context
29046 header_ http.Header
29047 }
29048
29049
29050
29051
29052
29053
29054 func (r *OrdersService) List(profileId int64, projectId int64) *OrdersListCall {
29055 c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29056 c.profileId = profileId
29057 c.projectId = projectId
29058 return c
29059 }
29060
29061
29062 func (c *OrdersListCall) Ids(ids ...int64) *OrdersListCall {
29063 var ids_ []string
29064 for _, v := range ids {
29065 ids_ = append(ids_, fmt.Sprint(v))
29066 }
29067 c.urlParams_.SetMulti("ids", ids_)
29068 return c
29069 }
29070
29071
29072
29073 func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
29074 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29075 return c
29076 }
29077
29078
29079
29080 func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
29081 c.urlParams_.Set("pageToken", pageToken)
29082 return c
29083 }
29084
29085
29086
29087
29088
29089
29090
29091
29092 func (c *OrdersListCall) SearchString(searchString string) *OrdersListCall {
29093 c.urlParams_.Set("searchString", searchString)
29094 return c
29095 }
29096
29097
29098
29099 func (c *OrdersListCall) SiteId(siteId ...int64) *OrdersListCall {
29100 var siteId_ []string
29101 for _, v := range siteId {
29102 siteId_ = append(siteId_, fmt.Sprint(v))
29103 }
29104 c.urlParams_.SetMulti("siteId", siteId_)
29105 return c
29106 }
29107
29108
29109
29110
29111
29112
29113
29114
29115 func (c *OrdersListCall) SortField(sortField string) *OrdersListCall {
29116 c.urlParams_.Set("sortField", sortField)
29117 return c
29118 }
29119
29120
29121
29122
29123
29124
29125
29126 func (c *OrdersListCall) SortOrder(sortOrder string) *OrdersListCall {
29127 c.urlParams_.Set("sortOrder", sortOrder)
29128 return c
29129 }
29130
29131
29132
29133
29134 func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
29135 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29136 return c
29137 }
29138
29139
29140
29141
29142 func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
29143 c.ifNoneMatch_ = entityTag
29144 return c
29145 }
29146
29147
29148 func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
29149 c.ctx_ = ctx
29150 return c
29151 }
29152
29153
29154
29155 func (c *OrdersListCall) Header() http.Header {
29156 if c.header_ == nil {
29157 c.header_ = make(http.Header)
29158 }
29159 return c.header_
29160 }
29161
29162 func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
29163 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29164 if c.ifNoneMatch_ != "" {
29165 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29166 }
29167 var body io.Reader = nil
29168 c.urlParams_.Set("alt", alt)
29169 c.urlParams_.Set("prettyPrint", "false")
29170 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects/{projectId}/orders")
29171 urls += "?" + c.urlParams_.Encode()
29172 req, err := http.NewRequest("GET", urls, body)
29173 if err != nil {
29174 return nil, err
29175 }
29176 req.Header = reqHeaders
29177 googleapi.Expand(req.URL, map[string]string{
29178 "profileId": strconv.FormatInt(c.profileId, 10),
29179 "projectId": strconv.FormatInt(c.projectId, 10),
29180 })
29181 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29182 }
29183
29184
29185
29186
29187
29188
29189
29190 func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
29191 gensupport.SetOptions(c.urlParams_, opts...)
29192 res, err := c.doRequest("json")
29193 if res != nil && res.StatusCode == http.StatusNotModified {
29194 if res.Body != nil {
29195 res.Body.Close()
29196 }
29197 return nil, gensupport.WrapError(&googleapi.Error{
29198 Code: res.StatusCode,
29199 Header: res.Header,
29200 })
29201 }
29202 if err != nil {
29203 return nil, err
29204 }
29205 defer googleapi.CloseBody(res)
29206 if err := googleapi.CheckResponse(res); err != nil {
29207 return nil, gensupport.WrapError(err)
29208 }
29209 ret := &OrdersListResponse{
29210 ServerResponse: googleapi.ServerResponse{
29211 Header: res.Header,
29212 HTTPStatusCode: res.StatusCode,
29213 },
29214 }
29215 target := &ret
29216 if err := gensupport.DecodeResponse(target, res); err != nil {
29217 return nil, err
29218 }
29219 return ret, nil
29220 }
29221
29222
29223
29224
29225 func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
29226 c.ctx_ = ctx
29227 defer c.PageToken(c.urlParams_.Get("pageToken"))
29228 for {
29229 x, err := c.Do()
29230 if err != nil {
29231 return err
29232 }
29233 if err := f(x); err != nil {
29234 return err
29235 }
29236 if x.NextPageToken == "" {
29237 return nil
29238 }
29239 c.PageToken(x.NextPageToken)
29240 }
29241 }
29242
29243 type PlacementGroupsGetCall struct {
29244 s *Service
29245 profileId int64
29246 id int64
29247 urlParams_ gensupport.URLParams
29248 ifNoneMatch_ string
29249 ctx_ context.Context
29250 header_ http.Header
29251 }
29252
29253
29254
29255
29256
29257 func (r *PlacementGroupsService) Get(profileId int64, id int64) *PlacementGroupsGetCall {
29258 c := &PlacementGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29259 c.profileId = profileId
29260 c.id = id
29261 return c
29262 }
29263
29264
29265
29266
29267 func (c *PlacementGroupsGetCall) Fields(s ...googleapi.Field) *PlacementGroupsGetCall {
29268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29269 return c
29270 }
29271
29272
29273
29274
29275 func (c *PlacementGroupsGetCall) IfNoneMatch(entityTag string) *PlacementGroupsGetCall {
29276 c.ifNoneMatch_ = entityTag
29277 return c
29278 }
29279
29280
29281 func (c *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
29282 c.ctx_ = ctx
29283 return c
29284 }
29285
29286
29287
29288 func (c *PlacementGroupsGetCall) Header() http.Header {
29289 if c.header_ == nil {
29290 c.header_ = make(http.Header)
29291 }
29292 return c.header_
29293 }
29294
29295 func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
29296 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29297 if c.ifNoneMatch_ != "" {
29298 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29299 }
29300 var body io.Reader = nil
29301 c.urlParams_.Set("alt", alt)
29302 c.urlParams_.Set("prettyPrint", "false")
29303 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementGroups/{+id}")
29304 urls += "?" + c.urlParams_.Encode()
29305 req, err := http.NewRequest("GET", urls, body)
29306 if err != nil {
29307 return nil, err
29308 }
29309 req.Header = reqHeaders
29310 googleapi.Expand(req.URL, map[string]string{
29311 "profileId": strconv.FormatInt(c.profileId, 10),
29312 "id": strconv.FormatInt(c.id, 10),
29313 })
29314 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29315 }
29316
29317
29318
29319
29320
29321
29322 func (c *PlacementGroupsGetCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
29323 gensupport.SetOptions(c.urlParams_, opts...)
29324 res, err := c.doRequest("json")
29325 if res != nil && res.StatusCode == http.StatusNotModified {
29326 if res.Body != nil {
29327 res.Body.Close()
29328 }
29329 return nil, gensupport.WrapError(&googleapi.Error{
29330 Code: res.StatusCode,
29331 Header: res.Header,
29332 })
29333 }
29334 if err != nil {
29335 return nil, err
29336 }
29337 defer googleapi.CloseBody(res)
29338 if err := googleapi.CheckResponse(res); err != nil {
29339 return nil, gensupport.WrapError(err)
29340 }
29341 ret := &PlacementGroup{
29342 ServerResponse: googleapi.ServerResponse{
29343 Header: res.Header,
29344 HTTPStatusCode: res.StatusCode,
29345 },
29346 }
29347 target := &ret
29348 if err := gensupport.DecodeResponse(target, res); err != nil {
29349 return nil, err
29350 }
29351 return ret, nil
29352 }
29353
29354 type PlacementGroupsInsertCall struct {
29355 s *Service
29356 profileId int64
29357 placementgroup *PlacementGroup
29358 urlParams_ gensupport.URLParams
29359 ctx_ context.Context
29360 header_ http.Header
29361 }
29362
29363
29364
29365
29366 func (r *PlacementGroupsService) Insert(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsInsertCall {
29367 c := &PlacementGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29368 c.profileId = profileId
29369 c.placementgroup = placementgroup
29370 return c
29371 }
29372
29373
29374
29375
29376 func (c *PlacementGroupsInsertCall) Fields(s ...googleapi.Field) *PlacementGroupsInsertCall {
29377 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29378 return c
29379 }
29380
29381
29382 func (c *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
29383 c.ctx_ = ctx
29384 return c
29385 }
29386
29387
29388
29389 func (c *PlacementGroupsInsertCall) Header() http.Header {
29390 if c.header_ == nil {
29391 c.header_ = make(http.Header)
29392 }
29393 return c.header_
29394 }
29395
29396 func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
29397 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29398 var body io.Reader = nil
29399 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
29400 if err != nil {
29401 return nil, err
29402 }
29403 c.urlParams_.Set("alt", alt)
29404 c.urlParams_.Set("prettyPrint", "false")
29405 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementGroups")
29406 urls += "?" + c.urlParams_.Encode()
29407 req, err := http.NewRequest("POST", urls, body)
29408 if err != nil {
29409 return nil, err
29410 }
29411 req.Header = reqHeaders
29412 googleapi.Expand(req.URL, map[string]string{
29413 "profileId": strconv.FormatInt(c.profileId, 10),
29414 })
29415 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29416 }
29417
29418
29419
29420
29421
29422
29423 func (c *PlacementGroupsInsertCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
29424 gensupport.SetOptions(c.urlParams_, opts...)
29425 res, err := c.doRequest("json")
29426 if res != nil && res.StatusCode == http.StatusNotModified {
29427 if res.Body != nil {
29428 res.Body.Close()
29429 }
29430 return nil, gensupport.WrapError(&googleapi.Error{
29431 Code: res.StatusCode,
29432 Header: res.Header,
29433 })
29434 }
29435 if err != nil {
29436 return nil, err
29437 }
29438 defer googleapi.CloseBody(res)
29439 if err := googleapi.CheckResponse(res); err != nil {
29440 return nil, gensupport.WrapError(err)
29441 }
29442 ret := &PlacementGroup{
29443 ServerResponse: googleapi.ServerResponse{
29444 Header: res.Header,
29445 HTTPStatusCode: res.StatusCode,
29446 },
29447 }
29448 target := &ret
29449 if err := gensupport.DecodeResponse(target, res); err != nil {
29450 return nil, err
29451 }
29452 return ret, nil
29453 }
29454
29455 type PlacementGroupsListCall struct {
29456 s *Service
29457 profileId int64
29458 urlParams_ gensupport.URLParams
29459 ifNoneMatch_ string
29460 ctx_ context.Context
29461 header_ http.Header
29462 }
29463
29464
29465
29466
29467
29468 func (r *PlacementGroupsService) List(profileId int64) *PlacementGroupsListCall {
29469 c := &PlacementGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29470 c.profileId = profileId
29471 return c
29472 }
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484 func (c *PlacementGroupsListCall) ActiveStatus(activeStatus ...string) *PlacementGroupsListCall {
29485 c.urlParams_.SetMulti("activeStatus", append([]string{}, activeStatus...))
29486 return c
29487 }
29488
29489
29490
29491 func (c *PlacementGroupsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementGroupsListCall {
29492 var advertiserIds_ []string
29493 for _, v := range advertiserIds {
29494 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
29495 }
29496 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
29497 return c
29498 }
29499
29500
29501
29502 func (c *PlacementGroupsListCall) CampaignIds(campaignIds ...int64) *PlacementGroupsListCall {
29503 var campaignIds_ []string
29504 for _, v := range campaignIds {
29505 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
29506 }
29507 c.urlParams_.SetMulti("campaignIds", campaignIds_)
29508 return c
29509 }
29510
29511
29512
29513 func (c *PlacementGroupsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementGroupsListCall {
29514 var contentCategoryIds_ []string
29515 for _, v := range contentCategoryIds {
29516 contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
29517 }
29518 c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
29519 return c
29520 }
29521
29522
29523
29524 func (c *PlacementGroupsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementGroupsListCall {
29525 var directorySiteIds_ []string
29526 for _, v := range directorySiteIds {
29527 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
29528 }
29529 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
29530 return c
29531 }
29532
29533
29534
29535 func (c *PlacementGroupsListCall) Ids(ids ...int64) *PlacementGroupsListCall {
29536 var ids_ []string
29537 for _, v := range ids {
29538 ids_ = append(ids_, fmt.Sprint(v))
29539 }
29540 c.urlParams_.SetMulti("ids", ids_)
29541 return c
29542 }
29543
29544
29545
29546
29547 func (c *PlacementGroupsListCall) MaxEndDate(maxEndDate string) *PlacementGroupsListCall {
29548 c.urlParams_.Set("maxEndDate", maxEndDate)
29549 return c
29550 }
29551
29552
29553
29554 func (c *PlacementGroupsListCall) MaxResults(maxResults int64) *PlacementGroupsListCall {
29555 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29556 return c
29557 }
29558
29559
29560
29561
29562 func (c *PlacementGroupsListCall) MaxStartDate(maxStartDate string) *PlacementGroupsListCall {
29563 c.urlParams_.Set("maxStartDate", maxStartDate)
29564 return c
29565 }
29566
29567
29568
29569
29570 func (c *PlacementGroupsListCall) MinEndDate(minEndDate string) *PlacementGroupsListCall {
29571 c.urlParams_.Set("minEndDate", minEndDate)
29572 return c
29573 }
29574
29575
29576
29577
29578 func (c *PlacementGroupsListCall) MinStartDate(minStartDate string) *PlacementGroupsListCall {
29579 c.urlParams_.Set("minStartDate", minStartDate)
29580 return c
29581 }
29582
29583
29584
29585 func (c *PlacementGroupsListCall) PageToken(pageToken string) *PlacementGroupsListCall {
29586 c.urlParams_.Set("pageToken", pageToken)
29587 return c
29588 }
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609 func (c *PlacementGroupsListCall) PlacementGroupType(placementGroupType string) *PlacementGroupsListCall {
29610 c.urlParams_.Set("placementGroupType", placementGroupType)
29611 return c
29612 }
29613
29614
29615
29616
29617 func (c *PlacementGroupsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementGroupsListCall {
29618 var placementStrategyIds_ []string
29619 for _, v := range placementStrategyIds {
29620 placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
29621 }
29622 c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
29623 return c
29624 }
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637 func (c *PlacementGroupsListCall) PricingTypes(pricingTypes ...string) *PlacementGroupsListCall {
29638 c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
29639 return c
29640 }
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650 func (c *PlacementGroupsListCall) SearchString(searchString string) *PlacementGroupsListCall {
29651 c.urlParams_.Set("searchString", searchString)
29652 return c
29653 }
29654
29655
29656
29657 func (c *PlacementGroupsListCall) SiteIds(siteIds ...int64) *PlacementGroupsListCall {
29658 var siteIds_ []string
29659 for _, v := range siteIds {
29660 siteIds_ = append(siteIds_, fmt.Sprint(v))
29661 }
29662 c.urlParams_.SetMulti("siteIds", siteIds_)
29663 return c
29664 }
29665
29666
29667
29668
29669
29670
29671
29672
29673 func (c *PlacementGroupsListCall) SortField(sortField string) *PlacementGroupsListCall {
29674 c.urlParams_.Set("sortField", sortField)
29675 return c
29676 }
29677
29678
29679
29680
29681
29682
29683
29684 func (c *PlacementGroupsListCall) SortOrder(sortOrder string) *PlacementGroupsListCall {
29685 c.urlParams_.Set("sortOrder", sortOrder)
29686 return c
29687 }
29688
29689
29690
29691
29692 func (c *PlacementGroupsListCall) Fields(s ...googleapi.Field) *PlacementGroupsListCall {
29693 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29694 return c
29695 }
29696
29697
29698
29699
29700 func (c *PlacementGroupsListCall) IfNoneMatch(entityTag string) *PlacementGroupsListCall {
29701 c.ifNoneMatch_ = entityTag
29702 return c
29703 }
29704
29705
29706 func (c *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
29707 c.ctx_ = ctx
29708 return c
29709 }
29710
29711
29712
29713 func (c *PlacementGroupsListCall) Header() http.Header {
29714 if c.header_ == nil {
29715 c.header_ = make(http.Header)
29716 }
29717 return c.header_
29718 }
29719
29720 func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
29721 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
29722 if c.ifNoneMatch_ != "" {
29723 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29724 }
29725 var body io.Reader = nil
29726 c.urlParams_.Set("alt", alt)
29727 c.urlParams_.Set("prettyPrint", "false")
29728 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementGroups")
29729 urls += "?" + c.urlParams_.Encode()
29730 req, err := http.NewRequest("GET", urls, body)
29731 if err != nil {
29732 return nil, err
29733 }
29734 req.Header = reqHeaders
29735 googleapi.Expand(req.URL, map[string]string{
29736 "profileId": strconv.FormatInt(c.profileId, 10),
29737 })
29738 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29739 }
29740
29741
29742
29743
29744
29745
29746
29747 func (c *PlacementGroupsListCall) Do(opts ...googleapi.CallOption) (*PlacementGroupsListResponse, error) {
29748 gensupport.SetOptions(c.urlParams_, opts...)
29749 res, err := c.doRequest("json")
29750 if res != nil && res.StatusCode == http.StatusNotModified {
29751 if res.Body != nil {
29752 res.Body.Close()
29753 }
29754 return nil, gensupport.WrapError(&googleapi.Error{
29755 Code: res.StatusCode,
29756 Header: res.Header,
29757 })
29758 }
29759 if err != nil {
29760 return nil, err
29761 }
29762 defer googleapi.CloseBody(res)
29763 if err := googleapi.CheckResponse(res); err != nil {
29764 return nil, gensupport.WrapError(err)
29765 }
29766 ret := &PlacementGroupsListResponse{
29767 ServerResponse: googleapi.ServerResponse{
29768 Header: res.Header,
29769 HTTPStatusCode: res.StatusCode,
29770 },
29771 }
29772 target := &ret
29773 if err := gensupport.DecodeResponse(target, res); err != nil {
29774 return nil, err
29775 }
29776 return ret, nil
29777 }
29778
29779
29780
29781
29782 func (c *PlacementGroupsListCall) Pages(ctx context.Context, f func(*PlacementGroupsListResponse) error) error {
29783 c.ctx_ = ctx
29784 defer c.PageToken(c.urlParams_.Get("pageToken"))
29785 for {
29786 x, err := c.Do()
29787 if err != nil {
29788 return err
29789 }
29790 if err := f(x); err != nil {
29791 return err
29792 }
29793 if x.NextPageToken == "" {
29794 return nil
29795 }
29796 c.PageToken(x.NextPageToken)
29797 }
29798 }
29799
29800 type PlacementGroupsPatchCall struct {
29801 s *Service
29802 profileId int64
29803 placementgroup *PlacementGroup
29804 urlParams_ gensupport.URLParams
29805 ctx_ context.Context
29806 header_ http.Header
29807 }
29808
29809
29810
29811
29812
29813
29814 func (r *PlacementGroupsService) Patch(profileId int64, id int64, placementgroup *PlacementGroup) *PlacementGroupsPatchCall {
29815 c := &PlacementGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29816 c.profileId = profileId
29817 c.urlParams_.Set("id", fmt.Sprint(id))
29818 c.placementgroup = placementgroup
29819 return c
29820 }
29821
29822
29823
29824
29825 func (c *PlacementGroupsPatchCall) Fields(s ...googleapi.Field) *PlacementGroupsPatchCall {
29826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29827 return c
29828 }
29829
29830
29831 func (c *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
29832 c.ctx_ = ctx
29833 return c
29834 }
29835
29836
29837
29838 func (c *PlacementGroupsPatchCall) Header() http.Header {
29839 if c.header_ == nil {
29840 c.header_ = make(http.Header)
29841 }
29842 return c.header_
29843 }
29844
29845 func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
29846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29847 var body io.Reader = nil
29848 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
29849 if err != nil {
29850 return nil, err
29851 }
29852 c.urlParams_.Set("alt", alt)
29853 c.urlParams_.Set("prettyPrint", "false")
29854 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementGroups")
29855 urls += "?" + c.urlParams_.Encode()
29856 req, err := http.NewRequest("PATCH", urls, body)
29857 if err != nil {
29858 return nil, err
29859 }
29860 req.Header = reqHeaders
29861 googleapi.Expand(req.URL, map[string]string{
29862 "profileId": strconv.FormatInt(c.profileId, 10),
29863 })
29864 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29865 }
29866
29867
29868
29869
29870
29871
29872 func (c *PlacementGroupsPatchCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
29873 gensupport.SetOptions(c.urlParams_, opts...)
29874 res, err := c.doRequest("json")
29875 if res != nil && res.StatusCode == http.StatusNotModified {
29876 if res.Body != nil {
29877 res.Body.Close()
29878 }
29879 return nil, gensupport.WrapError(&googleapi.Error{
29880 Code: res.StatusCode,
29881 Header: res.Header,
29882 })
29883 }
29884 if err != nil {
29885 return nil, err
29886 }
29887 defer googleapi.CloseBody(res)
29888 if err := googleapi.CheckResponse(res); err != nil {
29889 return nil, gensupport.WrapError(err)
29890 }
29891 ret := &PlacementGroup{
29892 ServerResponse: googleapi.ServerResponse{
29893 Header: res.Header,
29894 HTTPStatusCode: res.StatusCode,
29895 },
29896 }
29897 target := &ret
29898 if err := gensupport.DecodeResponse(target, res); err != nil {
29899 return nil, err
29900 }
29901 return ret, nil
29902 }
29903
29904 type PlacementGroupsUpdateCall struct {
29905 s *Service
29906 profileId int64
29907 placementgroup *PlacementGroup
29908 urlParams_ gensupport.URLParams
29909 ctx_ context.Context
29910 header_ http.Header
29911 }
29912
29913
29914
29915
29916 func (r *PlacementGroupsService) Update(profileId int64, placementgroup *PlacementGroup) *PlacementGroupsUpdateCall {
29917 c := &PlacementGroupsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29918 c.profileId = profileId
29919 c.placementgroup = placementgroup
29920 return c
29921 }
29922
29923
29924
29925
29926 func (c *PlacementGroupsUpdateCall) Fields(s ...googleapi.Field) *PlacementGroupsUpdateCall {
29927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
29928 return c
29929 }
29930
29931
29932 func (c *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
29933 c.ctx_ = ctx
29934 return c
29935 }
29936
29937
29938
29939 func (c *PlacementGroupsUpdateCall) Header() http.Header {
29940 if c.header_ == nil {
29941 c.header_ = make(http.Header)
29942 }
29943 return c.header_
29944 }
29945
29946 func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
29947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
29948 var body io.Reader = nil
29949 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
29950 if err != nil {
29951 return nil, err
29952 }
29953 c.urlParams_.Set("alt", alt)
29954 c.urlParams_.Set("prettyPrint", "false")
29955 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementGroups")
29956 urls += "?" + c.urlParams_.Encode()
29957 req, err := http.NewRequest("PUT", urls, body)
29958 if err != nil {
29959 return nil, err
29960 }
29961 req.Header = reqHeaders
29962 googleapi.Expand(req.URL, map[string]string{
29963 "profileId": strconv.FormatInt(c.profileId, 10),
29964 })
29965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
29966 }
29967
29968
29969
29970
29971
29972
29973 func (c *PlacementGroupsUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementGroup, error) {
29974 gensupport.SetOptions(c.urlParams_, opts...)
29975 res, err := c.doRequest("json")
29976 if res != nil && res.StatusCode == http.StatusNotModified {
29977 if res.Body != nil {
29978 res.Body.Close()
29979 }
29980 return nil, gensupport.WrapError(&googleapi.Error{
29981 Code: res.StatusCode,
29982 Header: res.Header,
29983 })
29984 }
29985 if err != nil {
29986 return nil, err
29987 }
29988 defer googleapi.CloseBody(res)
29989 if err := googleapi.CheckResponse(res); err != nil {
29990 return nil, gensupport.WrapError(err)
29991 }
29992 ret := &PlacementGroup{
29993 ServerResponse: googleapi.ServerResponse{
29994 Header: res.Header,
29995 HTTPStatusCode: res.StatusCode,
29996 },
29997 }
29998 target := &ret
29999 if err := gensupport.DecodeResponse(target, res); err != nil {
30000 return nil, err
30001 }
30002 return ret, nil
30003 }
30004
30005 type PlacementStrategiesDeleteCall struct {
30006 s *Service
30007 profileId int64
30008 id int64
30009 urlParams_ gensupport.URLParams
30010 ctx_ context.Context
30011 header_ http.Header
30012 }
30013
30014
30015
30016
30017
30018 func (r *PlacementStrategiesService) Delete(profileId int64, id int64) *PlacementStrategiesDeleteCall {
30019 c := &PlacementStrategiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30020 c.profileId = profileId
30021 c.id = id
30022 return c
30023 }
30024
30025
30026
30027
30028 func (c *PlacementStrategiesDeleteCall) Fields(s ...googleapi.Field) *PlacementStrategiesDeleteCall {
30029 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30030 return c
30031 }
30032
30033
30034 func (c *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
30035 c.ctx_ = ctx
30036 return c
30037 }
30038
30039
30040
30041 func (c *PlacementStrategiesDeleteCall) Header() http.Header {
30042 if c.header_ == nil {
30043 c.header_ = make(http.Header)
30044 }
30045 return c.header_
30046 }
30047
30048 func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
30049 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30050 var body io.Reader = nil
30051 c.urlParams_.Set("alt", alt)
30052 c.urlParams_.Set("prettyPrint", "false")
30053 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies/{+id}")
30054 urls += "?" + c.urlParams_.Encode()
30055 req, err := http.NewRequest("DELETE", urls, body)
30056 if err != nil {
30057 return nil, err
30058 }
30059 req.Header = reqHeaders
30060 googleapi.Expand(req.URL, map[string]string{
30061 "profileId": strconv.FormatInt(c.profileId, 10),
30062 "id": strconv.FormatInt(c.id, 10),
30063 })
30064 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30065 }
30066
30067
30068 func (c *PlacementStrategiesDeleteCall) Do(opts ...googleapi.CallOption) error {
30069 gensupport.SetOptions(c.urlParams_, opts...)
30070 res, err := c.doRequest("json")
30071 if err != nil {
30072 return err
30073 }
30074 defer googleapi.CloseBody(res)
30075 if err := googleapi.CheckResponse(res); err != nil {
30076 return gensupport.WrapError(err)
30077 }
30078 return nil
30079 }
30080
30081 type PlacementStrategiesGetCall struct {
30082 s *Service
30083 profileId int64
30084 id int64
30085 urlParams_ gensupport.URLParams
30086 ifNoneMatch_ string
30087 ctx_ context.Context
30088 header_ http.Header
30089 }
30090
30091
30092
30093
30094
30095 func (r *PlacementStrategiesService) Get(profileId int64, id int64) *PlacementStrategiesGetCall {
30096 c := &PlacementStrategiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30097 c.profileId = profileId
30098 c.id = id
30099 return c
30100 }
30101
30102
30103
30104
30105 func (c *PlacementStrategiesGetCall) Fields(s ...googleapi.Field) *PlacementStrategiesGetCall {
30106 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30107 return c
30108 }
30109
30110
30111
30112
30113 func (c *PlacementStrategiesGetCall) IfNoneMatch(entityTag string) *PlacementStrategiesGetCall {
30114 c.ifNoneMatch_ = entityTag
30115 return c
30116 }
30117
30118
30119 func (c *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
30120 c.ctx_ = ctx
30121 return c
30122 }
30123
30124
30125
30126 func (c *PlacementStrategiesGetCall) Header() http.Header {
30127 if c.header_ == nil {
30128 c.header_ = make(http.Header)
30129 }
30130 return c.header_
30131 }
30132
30133 func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
30134 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30135 if c.ifNoneMatch_ != "" {
30136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30137 }
30138 var body io.Reader = nil
30139 c.urlParams_.Set("alt", alt)
30140 c.urlParams_.Set("prettyPrint", "false")
30141 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies/{+id}")
30142 urls += "?" + c.urlParams_.Encode()
30143 req, err := http.NewRequest("GET", urls, body)
30144 if err != nil {
30145 return nil, err
30146 }
30147 req.Header = reqHeaders
30148 googleapi.Expand(req.URL, map[string]string{
30149 "profileId": strconv.FormatInt(c.profileId, 10),
30150 "id": strconv.FormatInt(c.id, 10),
30151 })
30152 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30153 }
30154
30155
30156
30157
30158
30159
30160
30161 func (c *PlacementStrategiesGetCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
30162 gensupport.SetOptions(c.urlParams_, opts...)
30163 res, err := c.doRequest("json")
30164 if res != nil && res.StatusCode == http.StatusNotModified {
30165 if res.Body != nil {
30166 res.Body.Close()
30167 }
30168 return nil, gensupport.WrapError(&googleapi.Error{
30169 Code: res.StatusCode,
30170 Header: res.Header,
30171 })
30172 }
30173 if err != nil {
30174 return nil, err
30175 }
30176 defer googleapi.CloseBody(res)
30177 if err := googleapi.CheckResponse(res); err != nil {
30178 return nil, gensupport.WrapError(err)
30179 }
30180 ret := &PlacementStrategy{
30181 ServerResponse: googleapi.ServerResponse{
30182 Header: res.Header,
30183 HTTPStatusCode: res.StatusCode,
30184 },
30185 }
30186 target := &ret
30187 if err := gensupport.DecodeResponse(target, res); err != nil {
30188 return nil, err
30189 }
30190 return ret, nil
30191 }
30192
30193 type PlacementStrategiesInsertCall struct {
30194 s *Service
30195 profileId int64
30196 placementstrategy *PlacementStrategy
30197 urlParams_ gensupport.URLParams
30198 ctx_ context.Context
30199 header_ http.Header
30200 }
30201
30202
30203
30204
30205 func (r *PlacementStrategiesService) Insert(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesInsertCall {
30206 c := &PlacementStrategiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30207 c.profileId = profileId
30208 c.placementstrategy = placementstrategy
30209 return c
30210 }
30211
30212
30213
30214
30215 func (c *PlacementStrategiesInsertCall) Fields(s ...googleapi.Field) *PlacementStrategiesInsertCall {
30216 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30217 return c
30218 }
30219
30220
30221 func (c *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
30222 c.ctx_ = ctx
30223 return c
30224 }
30225
30226
30227
30228 func (c *PlacementStrategiesInsertCall) Header() http.Header {
30229 if c.header_ == nil {
30230 c.header_ = make(http.Header)
30231 }
30232 return c.header_
30233 }
30234
30235 func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
30236 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30237 var body io.Reader = nil
30238 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
30239 if err != nil {
30240 return nil, err
30241 }
30242 c.urlParams_.Set("alt", alt)
30243 c.urlParams_.Set("prettyPrint", "false")
30244 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies")
30245 urls += "?" + c.urlParams_.Encode()
30246 req, err := http.NewRequest("POST", urls, body)
30247 if err != nil {
30248 return nil, err
30249 }
30250 req.Header = reqHeaders
30251 googleapi.Expand(req.URL, map[string]string{
30252 "profileId": strconv.FormatInt(c.profileId, 10),
30253 })
30254 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30255 }
30256
30257
30258
30259
30260
30261
30262
30263 func (c *PlacementStrategiesInsertCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
30264 gensupport.SetOptions(c.urlParams_, opts...)
30265 res, err := c.doRequest("json")
30266 if res != nil && res.StatusCode == http.StatusNotModified {
30267 if res.Body != nil {
30268 res.Body.Close()
30269 }
30270 return nil, gensupport.WrapError(&googleapi.Error{
30271 Code: res.StatusCode,
30272 Header: res.Header,
30273 })
30274 }
30275 if err != nil {
30276 return nil, err
30277 }
30278 defer googleapi.CloseBody(res)
30279 if err := googleapi.CheckResponse(res); err != nil {
30280 return nil, gensupport.WrapError(err)
30281 }
30282 ret := &PlacementStrategy{
30283 ServerResponse: googleapi.ServerResponse{
30284 Header: res.Header,
30285 HTTPStatusCode: res.StatusCode,
30286 },
30287 }
30288 target := &ret
30289 if err := gensupport.DecodeResponse(target, res); err != nil {
30290 return nil, err
30291 }
30292 return ret, nil
30293 }
30294
30295 type PlacementStrategiesListCall struct {
30296 s *Service
30297 profileId int64
30298 urlParams_ gensupport.URLParams
30299 ifNoneMatch_ string
30300 ctx_ context.Context
30301 header_ http.Header
30302 }
30303
30304
30305
30306
30307
30308 func (r *PlacementStrategiesService) List(profileId int64) *PlacementStrategiesListCall {
30309 c := &PlacementStrategiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30310 c.profileId = profileId
30311 return c
30312 }
30313
30314
30315
30316 func (c *PlacementStrategiesListCall) Ids(ids ...int64) *PlacementStrategiesListCall {
30317 var ids_ []string
30318 for _, v := range ids {
30319 ids_ = append(ids_, fmt.Sprint(v))
30320 }
30321 c.urlParams_.SetMulti("ids", ids_)
30322 return c
30323 }
30324
30325
30326
30327 func (c *PlacementStrategiesListCall) MaxResults(maxResults int64) *PlacementStrategiesListCall {
30328 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30329 return c
30330 }
30331
30332
30333
30334 func (c *PlacementStrategiesListCall) PageToken(pageToken string) *PlacementStrategiesListCall {
30335 c.urlParams_.Set("pageToken", pageToken)
30336 return c
30337 }
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347 func (c *PlacementStrategiesListCall) SearchString(searchString string) *PlacementStrategiesListCall {
30348 c.urlParams_.Set("searchString", searchString)
30349 return c
30350 }
30351
30352
30353
30354
30355
30356
30357
30358
30359 func (c *PlacementStrategiesListCall) SortField(sortField string) *PlacementStrategiesListCall {
30360 c.urlParams_.Set("sortField", sortField)
30361 return c
30362 }
30363
30364
30365
30366
30367
30368
30369
30370 func (c *PlacementStrategiesListCall) SortOrder(sortOrder string) *PlacementStrategiesListCall {
30371 c.urlParams_.Set("sortOrder", sortOrder)
30372 return c
30373 }
30374
30375
30376
30377
30378 func (c *PlacementStrategiesListCall) Fields(s ...googleapi.Field) *PlacementStrategiesListCall {
30379 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30380 return c
30381 }
30382
30383
30384
30385
30386 func (c *PlacementStrategiesListCall) IfNoneMatch(entityTag string) *PlacementStrategiesListCall {
30387 c.ifNoneMatch_ = entityTag
30388 return c
30389 }
30390
30391
30392 func (c *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
30393 c.ctx_ = ctx
30394 return c
30395 }
30396
30397
30398
30399 func (c *PlacementStrategiesListCall) Header() http.Header {
30400 if c.header_ == nil {
30401 c.header_ = make(http.Header)
30402 }
30403 return c.header_
30404 }
30405
30406 func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
30407 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30408 if c.ifNoneMatch_ != "" {
30409 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30410 }
30411 var body io.Reader = nil
30412 c.urlParams_.Set("alt", alt)
30413 c.urlParams_.Set("prettyPrint", "false")
30414 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies")
30415 urls += "?" + c.urlParams_.Encode()
30416 req, err := http.NewRequest("GET", urls, body)
30417 if err != nil {
30418 return nil, err
30419 }
30420 req.Header = reqHeaders
30421 googleapi.Expand(req.URL, map[string]string{
30422 "profileId": strconv.FormatInt(c.profileId, 10),
30423 })
30424 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30425 }
30426
30427
30428
30429
30430
30431
30432
30433 func (c *PlacementStrategiesListCall) Do(opts ...googleapi.CallOption) (*PlacementStrategiesListResponse, error) {
30434 gensupport.SetOptions(c.urlParams_, opts...)
30435 res, err := c.doRequest("json")
30436 if res != nil && res.StatusCode == http.StatusNotModified {
30437 if res.Body != nil {
30438 res.Body.Close()
30439 }
30440 return nil, gensupport.WrapError(&googleapi.Error{
30441 Code: res.StatusCode,
30442 Header: res.Header,
30443 })
30444 }
30445 if err != nil {
30446 return nil, err
30447 }
30448 defer googleapi.CloseBody(res)
30449 if err := googleapi.CheckResponse(res); err != nil {
30450 return nil, gensupport.WrapError(err)
30451 }
30452 ret := &PlacementStrategiesListResponse{
30453 ServerResponse: googleapi.ServerResponse{
30454 Header: res.Header,
30455 HTTPStatusCode: res.StatusCode,
30456 },
30457 }
30458 target := &ret
30459 if err := gensupport.DecodeResponse(target, res); err != nil {
30460 return nil, err
30461 }
30462 return ret, nil
30463 }
30464
30465
30466
30467
30468 func (c *PlacementStrategiesListCall) Pages(ctx context.Context, f func(*PlacementStrategiesListResponse) error) error {
30469 c.ctx_ = ctx
30470 defer c.PageToken(c.urlParams_.Get("pageToken"))
30471 for {
30472 x, err := c.Do()
30473 if err != nil {
30474 return err
30475 }
30476 if err := f(x); err != nil {
30477 return err
30478 }
30479 if x.NextPageToken == "" {
30480 return nil
30481 }
30482 c.PageToken(x.NextPageToken)
30483 }
30484 }
30485
30486 type PlacementStrategiesPatchCall struct {
30487 s *Service
30488 profileId int64
30489 placementstrategy *PlacementStrategy
30490 urlParams_ gensupport.URLParams
30491 ctx_ context.Context
30492 header_ http.Header
30493 }
30494
30495
30496
30497
30498
30499
30500 func (r *PlacementStrategiesService) Patch(profileId int64, id int64, placementstrategy *PlacementStrategy) *PlacementStrategiesPatchCall {
30501 c := &PlacementStrategiesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30502 c.profileId = profileId
30503 c.urlParams_.Set("id", fmt.Sprint(id))
30504 c.placementstrategy = placementstrategy
30505 return c
30506 }
30507
30508
30509
30510
30511 func (c *PlacementStrategiesPatchCall) Fields(s ...googleapi.Field) *PlacementStrategiesPatchCall {
30512 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30513 return c
30514 }
30515
30516
30517 func (c *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
30518 c.ctx_ = ctx
30519 return c
30520 }
30521
30522
30523
30524 func (c *PlacementStrategiesPatchCall) Header() http.Header {
30525 if c.header_ == nil {
30526 c.header_ = make(http.Header)
30527 }
30528 return c.header_
30529 }
30530
30531 func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
30532 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30533 var body io.Reader = nil
30534 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
30535 if err != nil {
30536 return nil, err
30537 }
30538 c.urlParams_.Set("alt", alt)
30539 c.urlParams_.Set("prettyPrint", "false")
30540 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies")
30541 urls += "?" + c.urlParams_.Encode()
30542 req, err := http.NewRequest("PATCH", urls, body)
30543 if err != nil {
30544 return nil, err
30545 }
30546 req.Header = reqHeaders
30547 googleapi.Expand(req.URL, map[string]string{
30548 "profileId": strconv.FormatInt(c.profileId, 10),
30549 })
30550 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30551 }
30552
30553
30554
30555
30556
30557
30558
30559 func (c *PlacementStrategiesPatchCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
30560 gensupport.SetOptions(c.urlParams_, opts...)
30561 res, err := c.doRequest("json")
30562 if res != nil && res.StatusCode == http.StatusNotModified {
30563 if res.Body != nil {
30564 res.Body.Close()
30565 }
30566 return nil, gensupport.WrapError(&googleapi.Error{
30567 Code: res.StatusCode,
30568 Header: res.Header,
30569 })
30570 }
30571 if err != nil {
30572 return nil, err
30573 }
30574 defer googleapi.CloseBody(res)
30575 if err := googleapi.CheckResponse(res); err != nil {
30576 return nil, gensupport.WrapError(err)
30577 }
30578 ret := &PlacementStrategy{
30579 ServerResponse: googleapi.ServerResponse{
30580 Header: res.Header,
30581 HTTPStatusCode: res.StatusCode,
30582 },
30583 }
30584 target := &ret
30585 if err := gensupport.DecodeResponse(target, res); err != nil {
30586 return nil, err
30587 }
30588 return ret, nil
30589 }
30590
30591 type PlacementStrategiesUpdateCall struct {
30592 s *Service
30593 profileId int64
30594 placementstrategy *PlacementStrategy
30595 urlParams_ gensupport.URLParams
30596 ctx_ context.Context
30597 header_ http.Header
30598 }
30599
30600
30601
30602
30603 func (r *PlacementStrategiesService) Update(profileId int64, placementstrategy *PlacementStrategy) *PlacementStrategiesUpdateCall {
30604 c := &PlacementStrategiesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30605 c.profileId = profileId
30606 c.placementstrategy = placementstrategy
30607 return c
30608 }
30609
30610
30611
30612
30613 func (c *PlacementStrategiesUpdateCall) Fields(s ...googleapi.Field) *PlacementStrategiesUpdateCall {
30614 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30615 return c
30616 }
30617
30618
30619 func (c *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
30620 c.ctx_ = ctx
30621 return c
30622 }
30623
30624
30625
30626 func (c *PlacementStrategiesUpdateCall) Header() http.Header {
30627 if c.header_ == nil {
30628 c.header_ = make(http.Header)
30629 }
30630 return c.header_
30631 }
30632
30633 func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
30634 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30635 var body io.Reader = nil
30636 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
30637 if err != nil {
30638 return nil, err
30639 }
30640 c.urlParams_.Set("alt", alt)
30641 c.urlParams_.Set("prettyPrint", "false")
30642 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placementStrategies")
30643 urls += "?" + c.urlParams_.Encode()
30644 req, err := http.NewRequest("PUT", urls, body)
30645 if err != nil {
30646 return nil, err
30647 }
30648 req.Header = reqHeaders
30649 googleapi.Expand(req.URL, map[string]string{
30650 "profileId": strconv.FormatInt(c.profileId, 10),
30651 })
30652 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30653 }
30654
30655
30656
30657
30658
30659
30660
30661 func (c *PlacementStrategiesUpdateCall) Do(opts ...googleapi.CallOption) (*PlacementStrategy, error) {
30662 gensupport.SetOptions(c.urlParams_, opts...)
30663 res, err := c.doRequest("json")
30664 if res != nil && res.StatusCode == http.StatusNotModified {
30665 if res.Body != nil {
30666 res.Body.Close()
30667 }
30668 return nil, gensupport.WrapError(&googleapi.Error{
30669 Code: res.StatusCode,
30670 Header: res.Header,
30671 })
30672 }
30673 if err != nil {
30674 return nil, err
30675 }
30676 defer googleapi.CloseBody(res)
30677 if err := googleapi.CheckResponse(res); err != nil {
30678 return nil, gensupport.WrapError(err)
30679 }
30680 ret := &PlacementStrategy{
30681 ServerResponse: googleapi.ServerResponse{
30682 Header: res.Header,
30683 HTTPStatusCode: res.StatusCode,
30684 },
30685 }
30686 target := &ret
30687 if err := gensupport.DecodeResponse(target, res); err != nil {
30688 return nil, err
30689 }
30690 return ret, nil
30691 }
30692
30693 type PlacementsGeneratetagsCall struct {
30694 s *Service
30695 profileId int64
30696 urlParams_ gensupport.URLParams
30697 ctx_ context.Context
30698 header_ http.Header
30699 }
30700
30701
30702
30703
30704 func (r *PlacementsService) Generatetags(profileId int64) *PlacementsGeneratetagsCall {
30705 c := &PlacementsGeneratetagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30706 c.profileId = profileId
30707 return c
30708 }
30709
30710
30711
30712 func (c *PlacementsGeneratetagsCall) CampaignId(campaignId int64) *PlacementsGeneratetagsCall {
30713 c.urlParams_.Set("campaignId", fmt.Sprint(campaignId))
30714 return c
30715 }
30716
30717
30718
30719 func (c *PlacementsGeneratetagsCall) PlacementIds(placementIds ...int64) *PlacementsGeneratetagsCall {
30720 var placementIds_ []string
30721 for _, v := range placementIds {
30722 placementIds_ = append(placementIds_, fmt.Sprint(v))
30723 }
30724 c.urlParams_.SetMulti("placementIds", placementIds_)
30725 return c
30726 }
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754 func (c *PlacementsGeneratetagsCall) TagFormats(tagFormats ...string) *PlacementsGeneratetagsCall {
30755 c.urlParams_.SetMulti("tagFormats", append([]string{}, tagFormats...))
30756 return c
30757 }
30758
30759
30760
30761
30762 func (c *PlacementsGeneratetagsCall) Fields(s ...googleapi.Field) *PlacementsGeneratetagsCall {
30763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30764 return c
30765 }
30766
30767
30768 func (c *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
30769 c.ctx_ = ctx
30770 return c
30771 }
30772
30773
30774
30775 func (c *PlacementsGeneratetagsCall) Header() http.Header {
30776 if c.header_ == nil {
30777 c.header_ = make(http.Header)
30778 }
30779 return c.header_
30780 }
30781
30782 func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
30783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30784 var body io.Reader = nil
30785 c.urlParams_.Set("alt", alt)
30786 c.urlParams_.Set("prettyPrint", "false")
30787 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements/generatetags")
30788 urls += "?" + c.urlParams_.Encode()
30789 req, err := http.NewRequest("POST", urls, body)
30790 if err != nil {
30791 return nil, err
30792 }
30793 req.Header = reqHeaders
30794 googleapi.Expand(req.URL, map[string]string{
30795 "profileId": strconv.FormatInt(c.profileId, 10),
30796 })
30797 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30798 }
30799
30800
30801
30802
30803
30804
30805
30806 func (c *PlacementsGeneratetagsCall) Do(opts ...googleapi.CallOption) (*PlacementsGenerateTagsResponse, error) {
30807 gensupport.SetOptions(c.urlParams_, opts...)
30808 res, err := c.doRequest("json")
30809 if res != nil && res.StatusCode == http.StatusNotModified {
30810 if res.Body != nil {
30811 res.Body.Close()
30812 }
30813 return nil, gensupport.WrapError(&googleapi.Error{
30814 Code: res.StatusCode,
30815 Header: res.Header,
30816 })
30817 }
30818 if err != nil {
30819 return nil, err
30820 }
30821 defer googleapi.CloseBody(res)
30822 if err := googleapi.CheckResponse(res); err != nil {
30823 return nil, gensupport.WrapError(err)
30824 }
30825 ret := &PlacementsGenerateTagsResponse{
30826 ServerResponse: googleapi.ServerResponse{
30827 Header: res.Header,
30828 HTTPStatusCode: res.StatusCode,
30829 },
30830 }
30831 target := &ret
30832 if err := gensupport.DecodeResponse(target, res); err != nil {
30833 return nil, err
30834 }
30835 return ret, nil
30836 }
30837
30838 type PlacementsGetCall struct {
30839 s *Service
30840 profileId int64
30841 id int64
30842 urlParams_ gensupport.URLParams
30843 ifNoneMatch_ string
30844 ctx_ context.Context
30845 header_ http.Header
30846 }
30847
30848
30849
30850
30851
30852 func (r *PlacementsService) Get(profileId int64, id int64) *PlacementsGetCall {
30853 c := &PlacementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30854 c.profileId = profileId
30855 c.id = id
30856 return c
30857 }
30858
30859
30860
30861
30862 func (c *PlacementsGetCall) Fields(s ...googleapi.Field) *PlacementsGetCall {
30863 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30864 return c
30865 }
30866
30867
30868
30869
30870 func (c *PlacementsGetCall) IfNoneMatch(entityTag string) *PlacementsGetCall {
30871 c.ifNoneMatch_ = entityTag
30872 return c
30873 }
30874
30875
30876 func (c *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
30877 c.ctx_ = ctx
30878 return c
30879 }
30880
30881
30882
30883 func (c *PlacementsGetCall) Header() http.Header {
30884 if c.header_ == nil {
30885 c.header_ = make(http.Header)
30886 }
30887 return c.header_
30888 }
30889
30890 func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
30891 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
30892 if c.ifNoneMatch_ != "" {
30893 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30894 }
30895 var body io.Reader = nil
30896 c.urlParams_.Set("alt", alt)
30897 c.urlParams_.Set("prettyPrint", "false")
30898 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements/{+id}")
30899 urls += "?" + c.urlParams_.Encode()
30900 req, err := http.NewRequest("GET", urls, body)
30901 if err != nil {
30902 return nil, err
30903 }
30904 req.Header = reqHeaders
30905 googleapi.Expand(req.URL, map[string]string{
30906 "profileId": strconv.FormatInt(c.profileId, 10),
30907 "id": strconv.FormatInt(c.id, 10),
30908 })
30909 return gensupport.SendRequest(c.ctx_, c.s.client, req)
30910 }
30911
30912
30913
30914
30915
30916
30917 func (c *PlacementsGetCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
30918 gensupport.SetOptions(c.urlParams_, opts...)
30919 res, err := c.doRequest("json")
30920 if res != nil && res.StatusCode == http.StatusNotModified {
30921 if res.Body != nil {
30922 res.Body.Close()
30923 }
30924 return nil, gensupport.WrapError(&googleapi.Error{
30925 Code: res.StatusCode,
30926 Header: res.Header,
30927 })
30928 }
30929 if err != nil {
30930 return nil, err
30931 }
30932 defer googleapi.CloseBody(res)
30933 if err := googleapi.CheckResponse(res); err != nil {
30934 return nil, gensupport.WrapError(err)
30935 }
30936 ret := &Placement{
30937 ServerResponse: googleapi.ServerResponse{
30938 Header: res.Header,
30939 HTTPStatusCode: res.StatusCode,
30940 },
30941 }
30942 target := &ret
30943 if err := gensupport.DecodeResponse(target, res); err != nil {
30944 return nil, err
30945 }
30946 return ret, nil
30947 }
30948
30949 type PlacementsInsertCall struct {
30950 s *Service
30951 profileId int64
30952 placement *Placement
30953 urlParams_ gensupport.URLParams
30954 ctx_ context.Context
30955 header_ http.Header
30956 }
30957
30958
30959
30960
30961 func (r *PlacementsService) Insert(profileId int64, placement *Placement) *PlacementsInsertCall {
30962 c := &PlacementsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30963 c.profileId = profileId
30964 c.placement = placement
30965 return c
30966 }
30967
30968
30969
30970
30971 func (c *PlacementsInsertCall) Fields(s ...googleapi.Field) *PlacementsInsertCall {
30972 c.urlParams_.Set("fields", googleapi.CombineFields(s))
30973 return c
30974 }
30975
30976
30977 func (c *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
30978 c.ctx_ = ctx
30979 return c
30980 }
30981
30982
30983
30984 func (c *PlacementsInsertCall) Header() http.Header {
30985 if c.header_ == nil {
30986 c.header_ = make(http.Header)
30987 }
30988 return c.header_
30989 }
30990
30991 func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
30992 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
30993 var body io.Reader = nil
30994 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
30995 if err != nil {
30996 return nil, err
30997 }
30998 c.urlParams_.Set("alt", alt)
30999 c.urlParams_.Set("prettyPrint", "false")
31000 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements")
31001 urls += "?" + c.urlParams_.Encode()
31002 req, err := http.NewRequest("POST", urls, body)
31003 if err != nil {
31004 return nil, err
31005 }
31006 req.Header = reqHeaders
31007 googleapi.Expand(req.URL, map[string]string{
31008 "profileId": strconv.FormatInt(c.profileId, 10),
31009 })
31010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31011 }
31012
31013
31014
31015
31016
31017
31018 func (c *PlacementsInsertCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
31019 gensupport.SetOptions(c.urlParams_, opts...)
31020 res, err := c.doRequest("json")
31021 if res != nil && res.StatusCode == http.StatusNotModified {
31022 if res.Body != nil {
31023 res.Body.Close()
31024 }
31025 return nil, gensupport.WrapError(&googleapi.Error{
31026 Code: res.StatusCode,
31027 Header: res.Header,
31028 })
31029 }
31030 if err != nil {
31031 return nil, err
31032 }
31033 defer googleapi.CloseBody(res)
31034 if err := googleapi.CheckResponse(res); err != nil {
31035 return nil, gensupport.WrapError(err)
31036 }
31037 ret := &Placement{
31038 ServerResponse: googleapi.ServerResponse{
31039 Header: res.Header,
31040 HTTPStatusCode: res.StatusCode,
31041 },
31042 }
31043 target := &ret
31044 if err := gensupport.DecodeResponse(target, res); err != nil {
31045 return nil, err
31046 }
31047 return ret, nil
31048 }
31049
31050 type PlacementsListCall struct {
31051 s *Service
31052 profileId int64
31053 urlParams_ gensupport.URLParams
31054 ifNoneMatch_ string
31055 ctx_ context.Context
31056 header_ http.Header
31057 }
31058
31059
31060
31061
31062
31063 func (r *PlacementsService) List(profileId int64) *PlacementsListCall {
31064 c := &PlacementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31065 c.profileId = profileId
31066 return c
31067 }
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079 func (c *PlacementsListCall) ActiveStatus(activeStatus ...string) *PlacementsListCall {
31080 c.urlParams_.SetMulti("activeStatus", append([]string{}, activeStatus...))
31081 return c
31082 }
31083
31084
31085
31086 func (c *PlacementsListCall) AdvertiserIds(advertiserIds ...int64) *PlacementsListCall {
31087 var advertiserIds_ []string
31088 for _, v := range advertiserIds {
31089 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
31090 }
31091 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
31092 return c
31093 }
31094
31095
31096
31097 func (c *PlacementsListCall) CampaignIds(campaignIds ...int64) *PlacementsListCall {
31098 var campaignIds_ []string
31099 for _, v := range campaignIds {
31100 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
31101 }
31102 c.urlParams_.SetMulti("campaignIds", campaignIds_)
31103 return c
31104 }
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121 func (c *PlacementsListCall) Compatibilities(compatibilities ...string) *PlacementsListCall {
31122 c.urlParams_.SetMulti("compatibilities", append([]string{}, compatibilities...))
31123 return c
31124 }
31125
31126
31127
31128 func (c *PlacementsListCall) ContentCategoryIds(contentCategoryIds ...int64) *PlacementsListCall {
31129 var contentCategoryIds_ []string
31130 for _, v := range contentCategoryIds {
31131 contentCategoryIds_ = append(contentCategoryIds_, fmt.Sprint(v))
31132 }
31133 c.urlParams_.SetMulti("contentCategoryIds", contentCategoryIds_)
31134 return c
31135 }
31136
31137
31138
31139 func (c *PlacementsListCall) DirectorySiteIds(directorySiteIds ...int64) *PlacementsListCall {
31140 var directorySiteIds_ []string
31141 for _, v := range directorySiteIds {
31142 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
31143 }
31144 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
31145 return c
31146 }
31147
31148
31149
31150 func (c *PlacementsListCall) GroupIds(groupIds ...int64) *PlacementsListCall {
31151 var groupIds_ []string
31152 for _, v := range groupIds {
31153 groupIds_ = append(groupIds_, fmt.Sprint(v))
31154 }
31155 c.urlParams_.SetMulti("groupIds", groupIds_)
31156 return c
31157 }
31158
31159
31160
31161 func (c *PlacementsListCall) Ids(ids ...int64) *PlacementsListCall {
31162 var ids_ []string
31163 for _, v := range ids {
31164 ids_ = append(ids_, fmt.Sprint(v))
31165 }
31166 c.urlParams_.SetMulti("ids", ids_)
31167 return c
31168 }
31169
31170
31171
31172
31173 func (c *PlacementsListCall) MaxEndDate(maxEndDate string) *PlacementsListCall {
31174 c.urlParams_.Set("maxEndDate", maxEndDate)
31175 return c
31176 }
31177
31178
31179
31180 func (c *PlacementsListCall) MaxResults(maxResults int64) *PlacementsListCall {
31181 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31182 return c
31183 }
31184
31185
31186
31187
31188 func (c *PlacementsListCall) MaxStartDate(maxStartDate string) *PlacementsListCall {
31189 c.urlParams_.Set("maxStartDate", maxStartDate)
31190 return c
31191 }
31192
31193
31194
31195
31196 func (c *PlacementsListCall) MinEndDate(minEndDate string) *PlacementsListCall {
31197 c.urlParams_.Set("minEndDate", minEndDate)
31198 return c
31199 }
31200
31201
31202
31203
31204 func (c *PlacementsListCall) MinStartDate(minStartDate string) *PlacementsListCall {
31205 c.urlParams_.Set("minStartDate", minStartDate)
31206 return c
31207 }
31208
31209
31210
31211 func (c *PlacementsListCall) PageToken(pageToken string) *PlacementsListCall {
31212 c.urlParams_.Set("pageToken", pageToken)
31213 return c
31214 }
31215
31216
31217
31218
31219
31220
31221
31222
31223 func (c *PlacementsListCall) PaymentSource(paymentSource string) *PlacementsListCall {
31224 c.urlParams_.Set("paymentSource", paymentSource)
31225 return c
31226 }
31227
31228
31229
31230 func (c *PlacementsListCall) PlacementStrategyIds(placementStrategyIds ...int64) *PlacementsListCall {
31231 var placementStrategyIds_ []string
31232 for _, v := range placementStrategyIds {
31233 placementStrategyIds_ = append(placementStrategyIds_, fmt.Sprint(v))
31234 }
31235 c.urlParams_.SetMulti("placementStrategyIds", placementStrategyIds_)
31236 return c
31237 }
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250 func (c *PlacementsListCall) PricingTypes(pricingTypes ...string) *PlacementsListCall {
31251 c.urlParams_.SetMulti("pricingTypes", append([]string{}, pricingTypes...))
31252 return c
31253 }
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263 func (c *PlacementsListCall) SearchString(searchString string) *PlacementsListCall {
31264 c.urlParams_.Set("searchString", searchString)
31265 return c
31266 }
31267
31268
31269
31270 func (c *PlacementsListCall) SiteIds(siteIds ...int64) *PlacementsListCall {
31271 var siteIds_ []string
31272 for _, v := range siteIds {
31273 siteIds_ = append(siteIds_, fmt.Sprint(v))
31274 }
31275 c.urlParams_.SetMulti("siteIds", siteIds_)
31276 return c
31277 }
31278
31279
31280
31281 func (c *PlacementsListCall) SizeIds(sizeIds ...int64) *PlacementsListCall {
31282 var sizeIds_ []string
31283 for _, v := range sizeIds {
31284 sizeIds_ = append(sizeIds_, fmt.Sprint(v))
31285 }
31286 c.urlParams_.SetMulti("sizeIds", sizeIds_)
31287 return c
31288 }
31289
31290
31291
31292
31293
31294
31295
31296
31297 func (c *PlacementsListCall) SortField(sortField string) *PlacementsListCall {
31298 c.urlParams_.Set("sortField", sortField)
31299 return c
31300 }
31301
31302
31303
31304
31305
31306
31307
31308 func (c *PlacementsListCall) SortOrder(sortOrder string) *PlacementsListCall {
31309 c.urlParams_.Set("sortOrder", sortOrder)
31310 return c
31311 }
31312
31313
31314
31315
31316 func (c *PlacementsListCall) Fields(s ...googleapi.Field) *PlacementsListCall {
31317 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31318 return c
31319 }
31320
31321
31322
31323
31324 func (c *PlacementsListCall) IfNoneMatch(entityTag string) *PlacementsListCall {
31325 c.ifNoneMatch_ = entityTag
31326 return c
31327 }
31328
31329
31330 func (c *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
31331 c.ctx_ = ctx
31332 return c
31333 }
31334
31335
31336
31337 func (c *PlacementsListCall) Header() http.Header {
31338 if c.header_ == nil {
31339 c.header_ = make(http.Header)
31340 }
31341 return c.header_
31342 }
31343
31344 func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
31345 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31346 if c.ifNoneMatch_ != "" {
31347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31348 }
31349 var body io.Reader = nil
31350 c.urlParams_.Set("alt", alt)
31351 c.urlParams_.Set("prettyPrint", "false")
31352 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements")
31353 urls += "?" + c.urlParams_.Encode()
31354 req, err := http.NewRequest("GET", urls, body)
31355 if err != nil {
31356 return nil, err
31357 }
31358 req.Header = reqHeaders
31359 googleapi.Expand(req.URL, map[string]string{
31360 "profileId": strconv.FormatInt(c.profileId, 10),
31361 })
31362 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31363 }
31364
31365
31366
31367
31368
31369
31370
31371 func (c *PlacementsListCall) Do(opts ...googleapi.CallOption) (*PlacementsListResponse, error) {
31372 gensupport.SetOptions(c.urlParams_, opts...)
31373 res, err := c.doRequest("json")
31374 if res != nil && res.StatusCode == http.StatusNotModified {
31375 if res.Body != nil {
31376 res.Body.Close()
31377 }
31378 return nil, gensupport.WrapError(&googleapi.Error{
31379 Code: res.StatusCode,
31380 Header: res.Header,
31381 })
31382 }
31383 if err != nil {
31384 return nil, err
31385 }
31386 defer googleapi.CloseBody(res)
31387 if err := googleapi.CheckResponse(res); err != nil {
31388 return nil, gensupport.WrapError(err)
31389 }
31390 ret := &PlacementsListResponse{
31391 ServerResponse: googleapi.ServerResponse{
31392 Header: res.Header,
31393 HTTPStatusCode: res.StatusCode,
31394 },
31395 }
31396 target := &ret
31397 if err := gensupport.DecodeResponse(target, res); err != nil {
31398 return nil, err
31399 }
31400 return ret, nil
31401 }
31402
31403
31404
31405
31406 func (c *PlacementsListCall) Pages(ctx context.Context, f func(*PlacementsListResponse) error) error {
31407 c.ctx_ = ctx
31408 defer c.PageToken(c.urlParams_.Get("pageToken"))
31409 for {
31410 x, err := c.Do()
31411 if err != nil {
31412 return err
31413 }
31414 if err := f(x); err != nil {
31415 return err
31416 }
31417 if x.NextPageToken == "" {
31418 return nil
31419 }
31420 c.PageToken(x.NextPageToken)
31421 }
31422 }
31423
31424 type PlacementsPatchCall struct {
31425 s *Service
31426 profileId int64
31427 placement *Placement
31428 urlParams_ gensupport.URLParams
31429 ctx_ context.Context
31430 header_ http.Header
31431 }
31432
31433
31434
31435
31436
31437 func (r *PlacementsService) Patch(profileId int64, id int64, placement *Placement) *PlacementsPatchCall {
31438 c := &PlacementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31439 c.profileId = profileId
31440 c.urlParams_.Set("id", fmt.Sprint(id))
31441 c.placement = placement
31442 return c
31443 }
31444
31445
31446
31447
31448 func (c *PlacementsPatchCall) Fields(s ...googleapi.Field) *PlacementsPatchCall {
31449 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31450 return c
31451 }
31452
31453
31454 func (c *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
31455 c.ctx_ = ctx
31456 return c
31457 }
31458
31459
31460
31461 func (c *PlacementsPatchCall) Header() http.Header {
31462 if c.header_ == nil {
31463 c.header_ = make(http.Header)
31464 }
31465 return c.header_
31466 }
31467
31468 func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
31469 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31470 var body io.Reader = nil
31471 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
31472 if err != nil {
31473 return nil, err
31474 }
31475 c.urlParams_.Set("alt", alt)
31476 c.urlParams_.Set("prettyPrint", "false")
31477 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements")
31478 urls += "?" + c.urlParams_.Encode()
31479 req, err := http.NewRequest("PATCH", urls, body)
31480 if err != nil {
31481 return nil, err
31482 }
31483 req.Header = reqHeaders
31484 googleapi.Expand(req.URL, map[string]string{
31485 "profileId": strconv.FormatInt(c.profileId, 10),
31486 })
31487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31488 }
31489
31490
31491
31492
31493
31494
31495 func (c *PlacementsPatchCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
31496 gensupport.SetOptions(c.urlParams_, opts...)
31497 res, err := c.doRequest("json")
31498 if res != nil && res.StatusCode == http.StatusNotModified {
31499 if res.Body != nil {
31500 res.Body.Close()
31501 }
31502 return nil, gensupport.WrapError(&googleapi.Error{
31503 Code: res.StatusCode,
31504 Header: res.Header,
31505 })
31506 }
31507 if err != nil {
31508 return nil, err
31509 }
31510 defer googleapi.CloseBody(res)
31511 if err := googleapi.CheckResponse(res); err != nil {
31512 return nil, gensupport.WrapError(err)
31513 }
31514 ret := &Placement{
31515 ServerResponse: googleapi.ServerResponse{
31516 Header: res.Header,
31517 HTTPStatusCode: res.StatusCode,
31518 },
31519 }
31520 target := &ret
31521 if err := gensupport.DecodeResponse(target, res); err != nil {
31522 return nil, err
31523 }
31524 return ret, nil
31525 }
31526
31527 type PlacementsUpdateCall struct {
31528 s *Service
31529 profileId int64
31530 placement *Placement
31531 urlParams_ gensupport.URLParams
31532 ctx_ context.Context
31533 header_ http.Header
31534 }
31535
31536
31537
31538
31539 func (r *PlacementsService) Update(profileId int64, placement *Placement) *PlacementsUpdateCall {
31540 c := &PlacementsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31541 c.profileId = profileId
31542 c.placement = placement
31543 return c
31544 }
31545
31546
31547
31548
31549 func (c *PlacementsUpdateCall) Fields(s ...googleapi.Field) *PlacementsUpdateCall {
31550 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31551 return c
31552 }
31553
31554
31555 func (c *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
31556 c.ctx_ = ctx
31557 return c
31558 }
31559
31560
31561
31562 func (c *PlacementsUpdateCall) Header() http.Header {
31563 if c.header_ == nil {
31564 c.header_ = make(http.Header)
31565 }
31566 return c.header_
31567 }
31568
31569 func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
31570 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
31571 var body io.Reader = nil
31572 body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
31573 if err != nil {
31574 return nil, err
31575 }
31576 c.urlParams_.Set("alt", alt)
31577 c.urlParams_.Set("prettyPrint", "false")
31578 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/placements")
31579 urls += "?" + c.urlParams_.Encode()
31580 req, err := http.NewRequest("PUT", urls, body)
31581 if err != nil {
31582 return nil, err
31583 }
31584 req.Header = reqHeaders
31585 googleapi.Expand(req.URL, map[string]string{
31586 "profileId": strconv.FormatInt(c.profileId, 10),
31587 })
31588 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31589 }
31590
31591
31592
31593
31594
31595
31596 func (c *PlacementsUpdateCall) Do(opts ...googleapi.CallOption) (*Placement, error) {
31597 gensupport.SetOptions(c.urlParams_, opts...)
31598 res, err := c.doRequest("json")
31599 if res != nil && res.StatusCode == http.StatusNotModified {
31600 if res.Body != nil {
31601 res.Body.Close()
31602 }
31603 return nil, gensupport.WrapError(&googleapi.Error{
31604 Code: res.StatusCode,
31605 Header: res.Header,
31606 })
31607 }
31608 if err != nil {
31609 return nil, err
31610 }
31611 defer googleapi.CloseBody(res)
31612 if err := googleapi.CheckResponse(res); err != nil {
31613 return nil, gensupport.WrapError(err)
31614 }
31615 ret := &Placement{
31616 ServerResponse: googleapi.ServerResponse{
31617 Header: res.Header,
31618 HTTPStatusCode: res.StatusCode,
31619 },
31620 }
31621 target := &ret
31622 if err := gensupport.DecodeResponse(target, res); err != nil {
31623 return nil, err
31624 }
31625 return ret, nil
31626 }
31627
31628 type PlatformTypesGetCall struct {
31629 s *Service
31630 profileId int64
31631 id int64
31632 urlParams_ gensupport.URLParams
31633 ifNoneMatch_ string
31634 ctx_ context.Context
31635 header_ http.Header
31636 }
31637
31638
31639
31640
31641
31642 func (r *PlatformTypesService) Get(profileId int64, id int64) *PlatformTypesGetCall {
31643 c := &PlatformTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31644 c.profileId = profileId
31645 c.id = id
31646 return c
31647 }
31648
31649
31650
31651
31652 func (c *PlatformTypesGetCall) Fields(s ...googleapi.Field) *PlatformTypesGetCall {
31653 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31654 return c
31655 }
31656
31657
31658
31659
31660 func (c *PlatformTypesGetCall) IfNoneMatch(entityTag string) *PlatformTypesGetCall {
31661 c.ifNoneMatch_ = entityTag
31662 return c
31663 }
31664
31665
31666 func (c *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
31667 c.ctx_ = ctx
31668 return c
31669 }
31670
31671
31672
31673 func (c *PlatformTypesGetCall) Header() http.Header {
31674 if c.header_ == nil {
31675 c.header_ = make(http.Header)
31676 }
31677 return c.header_
31678 }
31679
31680 func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
31681 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31682 if c.ifNoneMatch_ != "" {
31683 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31684 }
31685 var body io.Reader = nil
31686 c.urlParams_.Set("alt", alt)
31687 c.urlParams_.Set("prettyPrint", "false")
31688 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/platformTypes/{+id}")
31689 urls += "?" + c.urlParams_.Encode()
31690 req, err := http.NewRequest("GET", urls, body)
31691 if err != nil {
31692 return nil, err
31693 }
31694 req.Header = reqHeaders
31695 googleapi.Expand(req.URL, map[string]string{
31696 "profileId": strconv.FormatInt(c.profileId, 10),
31697 "id": strconv.FormatInt(c.id, 10),
31698 })
31699 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31700 }
31701
31702
31703
31704
31705
31706
31707 func (c *PlatformTypesGetCall) Do(opts ...googleapi.CallOption) (*PlatformType, error) {
31708 gensupport.SetOptions(c.urlParams_, opts...)
31709 res, err := c.doRequest("json")
31710 if res != nil && res.StatusCode == http.StatusNotModified {
31711 if res.Body != nil {
31712 res.Body.Close()
31713 }
31714 return nil, gensupport.WrapError(&googleapi.Error{
31715 Code: res.StatusCode,
31716 Header: res.Header,
31717 })
31718 }
31719 if err != nil {
31720 return nil, err
31721 }
31722 defer googleapi.CloseBody(res)
31723 if err := googleapi.CheckResponse(res); err != nil {
31724 return nil, gensupport.WrapError(err)
31725 }
31726 ret := &PlatformType{
31727 ServerResponse: googleapi.ServerResponse{
31728 Header: res.Header,
31729 HTTPStatusCode: res.StatusCode,
31730 },
31731 }
31732 target := &ret
31733 if err := gensupport.DecodeResponse(target, res); err != nil {
31734 return nil, err
31735 }
31736 return ret, nil
31737 }
31738
31739 type PlatformTypesListCall struct {
31740 s *Service
31741 profileId int64
31742 urlParams_ gensupport.URLParams
31743 ifNoneMatch_ string
31744 ctx_ context.Context
31745 header_ http.Header
31746 }
31747
31748
31749
31750
31751 func (r *PlatformTypesService) List(profileId int64) *PlatformTypesListCall {
31752 c := &PlatformTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31753 c.profileId = profileId
31754 return c
31755 }
31756
31757
31758
31759
31760 func (c *PlatformTypesListCall) Fields(s ...googleapi.Field) *PlatformTypesListCall {
31761 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31762 return c
31763 }
31764
31765
31766
31767
31768 func (c *PlatformTypesListCall) IfNoneMatch(entityTag string) *PlatformTypesListCall {
31769 c.ifNoneMatch_ = entityTag
31770 return c
31771 }
31772
31773
31774 func (c *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
31775 c.ctx_ = ctx
31776 return c
31777 }
31778
31779
31780
31781 func (c *PlatformTypesListCall) Header() http.Header {
31782 if c.header_ == nil {
31783 c.header_ = make(http.Header)
31784 }
31785 return c.header_
31786 }
31787
31788 func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
31789 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31790 if c.ifNoneMatch_ != "" {
31791 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31792 }
31793 var body io.Reader = nil
31794 c.urlParams_.Set("alt", alt)
31795 c.urlParams_.Set("prettyPrint", "false")
31796 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/platformTypes")
31797 urls += "?" + c.urlParams_.Encode()
31798 req, err := http.NewRequest("GET", urls, body)
31799 if err != nil {
31800 return nil, err
31801 }
31802 req.Header = reqHeaders
31803 googleapi.Expand(req.URL, map[string]string{
31804 "profileId": strconv.FormatInt(c.profileId, 10),
31805 })
31806 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31807 }
31808
31809
31810
31811
31812
31813
31814
31815 func (c *PlatformTypesListCall) Do(opts ...googleapi.CallOption) (*PlatformTypesListResponse, error) {
31816 gensupport.SetOptions(c.urlParams_, opts...)
31817 res, err := c.doRequest("json")
31818 if res != nil && res.StatusCode == http.StatusNotModified {
31819 if res.Body != nil {
31820 res.Body.Close()
31821 }
31822 return nil, gensupport.WrapError(&googleapi.Error{
31823 Code: res.StatusCode,
31824 Header: res.Header,
31825 })
31826 }
31827 if err != nil {
31828 return nil, err
31829 }
31830 defer googleapi.CloseBody(res)
31831 if err := googleapi.CheckResponse(res); err != nil {
31832 return nil, gensupport.WrapError(err)
31833 }
31834 ret := &PlatformTypesListResponse{
31835 ServerResponse: googleapi.ServerResponse{
31836 Header: res.Header,
31837 HTTPStatusCode: res.StatusCode,
31838 },
31839 }
31840 target := &ret
31841 if err := gensupport.DecodeResponse(target, res); err != nil {
31842 return nil, err
31843 }
31844 return ret, nil
31845 }
31846
31847 type PostalCodesGetCall struct {
31848 s *Service
31849 profileId int64
31850 code string
31851 urlParams_ gensupport.URLParams
31852 ifNoneMatch_ string
31853 ctx_ context.Context
31854 header_ http.Header
31855 }
31856
31857
31858
31859
31860
31861 func (r *PostalCodesService) Get(profileId int64, code string) *PostalCodesGetCall {
31862 c := &PostalCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31863 c.profileId = profileId
31864 c.code = code
31865 return c
31866 }
31867
31868
31869
31870
31871 func (c *PostalCodesGetCall) Fields(s ...googleapi.Field) *PostalCodesGetCall {
31872 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31873 return c
31874 }
31875
31876
31877
31878
31879 func (c *PostalCodesGetCall) IfNoneMatch(entityTag string) *PostalCodesGetCall {
31880 c.ifNoneMatch_ = entityTag
31881 return c
31882 }
31883
31884
31885 func (c *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
31886 c.ctx_ = ctx
31887 return c
31888 }
31889
31890
31891
31892 func (c *PostalCodesGetCall) Header() http.Header {
31893 if c.header_ == nil {
31894 c.header_ = make(http.Header)
31895 }
31896 return c.header_
31897 }
31898
31899 func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
31900 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
31901 if c.ifNoneMatch_ != "" {
31902 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31903 }
31904 var body io.Reader = nil
31905 c.urlParams_.Set("alt", alt)
31906 c.urlParams_.Set("prettyPrint", "false")
31907 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/postalCodes/{+code}")
31908 urls += "?" + c.urlParams_.Encode()
31909 req, err := http.NewRequest("GET", urls, body)
31910 if err != nil {
31911 return nil, err
31912 }
31913 req.Header = reqHeaders
31914 googleapi.Expand(req.URL, map[string]string{
31915 "profileId": strconv.FormatInt(c.profileId, 10),
31916 "code": c.code,
31917 })
31918 return gensupport.SendRequest(c.ctx_, c.s.client, req)
31919 }
31920
31921
31922
31923
31924
31925
31926 func (c *PostalCodesGetCall) Do(opts ...googleapi.CallOption) (*PostalCode, error) {
31927 gensupport.SetOptions(c.urlParams_, opts...)
31928 res, err := c.doRequest("json")
31929 if res != nil && res.StatusCode == http.StatusNotModified {
31930 if res.Body != nil {
31931 res.Body.Close()
31932 }
31933 return nil, gensupport.WrapError(&googleapi.Error{
31934 Code: res.StatusCode,
31935 Header: res.Header,
31936 })
31937 }
31938 if err != nil {
31939 return nil, err
31940 }
31941 defer googleapi.CloseBody(res)
31942 if err := googleapi.CheckResponse(res); err != nil {
31943 return nil, gensupport.WrapError(err)
31944 }
31945 ret := &PostalCode{
31946 ServerResponse: googleapi.ServerResponse{
31947 Header: res.Header,
31948 HTTPStatusCode: res.StatusCode,
31949 },
31950 }
31951 target := &ret
31952 if err := gensupport.DecodeResponse(target, res); err != nil {
31953 return nil, err
31954 }
31955 return ret, nil
31956 }
31957
31958 type PostalCodesListCall struct {
31959 s *Service
31960 profileId int64
31961 urlParams_ gensupport.URLParams
31962 ifNoneMatch_ string
31963 ctx_ context.Context
31964 header_ http.Header
31965 }
31966
31967
31968
31969
31970 func (r *PostalCodesService) List(profileId int64) *PostalCodesListCall {
31971 c := &PostalCodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31972 c.profileId = profileId
31973 return c
31974 }
31975
31976
31977
31978
31979 func (c *PostalCodesListCall) Fields(s ...googleapi.Field) *PostalCodesListCall {
31980 c.urlParams_.Set("fields", googleapi.CombineFields(s))
31981 return c
31982 }
31983
31984
31985
31986
31987 func (c *PostalCodesListCall) IfNoneMatch(entityTag string) *PostalCodesListCall {
31988 c.ifNoneMatch_ = entityTag
31989 return c
31990 }
31991
31992
31993 func (c *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
31994 c.ctx_ = ctx
31995 return c
31996 }
31997
31998
31999
32000 func (c *PostalCodesListCall) Header() http.Header {
32001 if c.header_ == nil {
32002 c.header_ = make(http.Header)
32003 }
32004 return c.header_
32005 }
32006
32007 func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
32008 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32009 if c.ifNoneMatch_ != "" {
32010 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32011 }
32012 var body io.Reader = nil
32013 c.urlParams_.Set("alt", alt)
32014 c.urlParams_.Set("prettyPrint", "false")
32015 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/postalCodes")
32016 urls += "?" + c.urlParams_.Encode()
32017 req, err := http.NewRequest("GET", urls, body)
32018 if err != nil {
32019 return nil, err
32020 }
32021 req.Header = reqHeaders
32022 googleapi.Expand(req.URL, map[string]string{
32023 "profileId": strconv.FormatInt(c.profileId, 10),
32024 })
32025 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32026 }
32027
32028
32029
32030
32031
32032
32033
32034 func (c *PostalCodesListCall) Do(opts ...googleapi.CallOption) (*PostalCodesListResponse, error) {
32035 gensupport.SetOptions(c.urlParams_, opts...)
32036 res, err := c.doRequest("json")
32037 if res != nil && res.StatusCode == http.StatusNotModified {
32038 if res.Body != nil {
32039 res.Body.Close()
32040 }
32041 return nil, gensupport.WrapError(&googleapi.Error{
32042 Code: res.StatusCode,
32043 Header: res.Header,
32044 })
32045 }
32046 if err != nil {
32047 return nil, err
32048 }
32049 defer googleapi.CloseBody(res)
32050 if err := googleapi.CheckResponse(res); err != nil {
32051 return nil, gensupport.WrapError(err)
32052 }
32053 ret := &PostalCodesListResponse{
32054 ServerResponse: googleapi.ServerResponse{
32055 Header: res.Header,
32056 HTTPStatusCode: res.StatusCode,
32057 },
32058 }
32059 target := &ret
32060 if err := gensupport.DecodeResponse(target, res); err != nil {
32061 return nil, err
32062 }
32063 return ret, nil
32064 }
32065
32066 type ProjectsGetCall struct {
32067 s *Service
32068 profileId int64
32069 id int64
32070 urlParams_ gensupport.URLParams
32071 ifNoneMatch_ string
32072 ctx_ context.Context
32073 header_ http.Header
32074 }
32075
32076
32077
32078
32079
32080 func (r *ProjectsService) Get(profileId int64, id int64) *ProjectsGetCall {
32081 c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32082 c.profileId = profileId
32083 c.id = id
32084 return c
32085 }
32086
32087
32088
32089
32090 func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
32091 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32092 return c
32093 }
32094
32095
32096
32097
32098 func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
32099 c.ifNoneMatch_ = entityTag
32100 return c
32101 }
32102
32103
32104 func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
32105 c.ctx_ = ctx
32106 return c
32107 }
32108
32109
32110
32111 func (c *ProjectsGetCall) Header() http.Header {
32112 if c.header_ == nil {
32113 c.header_ = make(http.Header)
32114 }
32115 return c.header_
32116 }
32117
32118 func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
32119 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32120 if c.ifNoneMatch_ != "" {
32121 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32122 }
32123 var body io.Reader = nil
32124 c.urlParams_.Set("alt", alt)
32125 c.urlParams_.Set("prettyPrint", "false")
32126 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects/{+id}")
32127 urls += "?" + c.urlParams_.Encode()
32128 req, err := http.NewRequest("GET", urls, body)
32129 if err != nil {
32130 return nil, err
32131 }
32132 req.Header = reqHeaders
32133 googleapi.Expand(req.URL, map[string]string{
32134 "profileId": strconv.FormatInt(c.profileId, 10),
32135 "id": strconv.FormatInt(c.id, 10),
32136 })
32137 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32138 }
32139
32140
32141
32142
32143
32144
32145 func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
32146 gensupport.SetOptions(c.urlParams_, opts...)
32147 res, err := c.doRequest("json")
32148 if res != nil && res.StatusCode == http.StatusNotModified {
32149 if res.Body != nil {
32150 res.Body.Close()
32151 }
32152 return nil, gensupport.WrapError(&googleapi.Error{
32153 Code: res.StatusCode,
32154 Header: res.Header,
32155 })
32156 }
32157 if err != nil {
32158 return nil, err
32159 }
32160 defer googleapi.CloseBody(res)
32161 if err := googleapi.CheckResponse(res); err != nil {
32162 return nil, gensupport.WrapError(err)
32163 }
32164 ret := &Project{
32165 ServerResponse: googleapi.ServerResponse{
32166 Header: res.Header,
32167 HTTPStatusCode: res.StatusCode,
32168 },
32169 }
32170 target := &ret
32171 if err := gensupport.DecodeResponse(target, res); err != nil {
32172 return nil, err
32173 }
32174 return ret, nil
32175 }
32176
32177 type ProjectsListCall struct {
32178 s *Service
32179 profileId int64
32180 urlParams_ gensupport.URLParams
32181 ifNoneMatch_ string
32182 ctx_ context.Context
32183 header_ http.Header
32184 }
32185
32186
32187
32188
32189
32190 func (r *ProjectsService) List(profileId int64) *ProjectsListCall {
32191 c := &ProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32192 c.profileId = profileId
32193 return c
32194 }
32195
32196
32197
32198 func (c *ProjectsListCall) AdvertiserIds(advertiserIds ...int64) *ProjectsListCall {
32199 var advertiserIds_ []string
32200 for _, v := range advertiserIds {
32201 advertiserIds_ = append(advertiserIds_, fmt.Sprint(v))
32202 }
32203 c.urlParams_.SetMulti("advertiserIds", advertiserIds_)
32204 return c
32205 }
32206
32207
32208 func (c *ProjectsListCall) Ids(ids ...int64) *ProjectsListCall {
32209 var ids_ []string
32210 for _, v := range ids {
32211 ids_ = append(ids_, fmt.Sprint(v))
32212 }
32213 c.urlParams_.SetMulti("ids", ids_)
32214 return c
32215 }
32216
32217
32218
32219 func (c *ProjectsListCall) MaxResults(maxResults int64) *ProjectsListCall {
32220 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32221 return c
32222 }
32223
32224
32225
32226 func (c *ProjectsListCall) PageToken(pageToken string) *ProjectsListCall {
32227 c.urlParams_.Set("pageToken", pageToken)
32228 return c
32229 }
32230
32231
32232
32233
32234
32235
32236
32237
32238 func (c *ProjectsListCall) SearchString(searchString string) *ProjectsListCall {
32239 c.urlParams_.Set("searchString", searchString)
32240 return c
32241 }
32242
32243
32244
32245
32246
32247
32248
32249
32250 func (c *ProjectsListCall) SortField(sortField string) *ProjectsListCall {
32251 c.urlParams_.Set("sortField", sortField)
32252 return c
32253 }
32254
32255
32256
32257
32258
32259
32260
32261 func (c *ProjectsListCall) SortOrder(sortOrder string) *ProjectsListCall {
32262 c.urlParams_.Set("sortOrder", sortOrder)
32263 return c
32264 }
32265
32266
32267
32268
32269 func (c *ProjectsListCall) Fields(s ...googleapi.Field) *ProjectsListCall {
32270 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32271 return c
32272 }
32273
32274
32275
32276
32277 func (c *ProjectsListCall) IfNoneMatch(entityTag string) *ProjectsListCall {
32278 c.ifNoneMatch_ = entityTag
32279 return c
32280 }
32281
32282
32283 func (c *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
32284 c.ctx_ = ctx
32285 return c
32286 }
32287
32288
32289
32290 func (c *ProjectsListCall) Header() http.Header {
32291 if c.header_ == nil {
32292 c.header_ = make(http.Header)
32293 }
32294 return c.header_
32295 }
32296
32297 func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
32298 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32299 if c.ifNoneMatch_ != "" {
32300 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32301 }
32302 var body io.Reader = nil
32303 c.urlParams_.Set("alt", alt)
32304 c.urlParams_.Set("prettyPrint", "false")
32305 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/projects")
32306 urls += "?" + c.urlParams_.Encode()
32307 req, err := http.NewRequest("GET", urls, body)
32308 if err != nil {
32309 return nil, err
32310 }
32311 req.Header = reqHeaders
32312 googleapi.Expand(req.URL, map[string]string{
32313 "profileId": strconv.FormatInt(c.profileId, 10),
32314 })
32315 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32316 }
32317
32318
32319
32320
32321
32322
32323
32324 func (c *ProjectsListCall) Do(opts ...googleapi.CallOption) (*ProjectsListResponse, error) {
32325 gensupport.SetOptions(c.urlParams_, opts...)
32326 res, err := c.doRequest("json")
32327 if res != nil && res.StatusCode == http.StatusNotModified {
32328 if res.Body != nil {
32329 res.Body.Close()
32330 }
32331 return nil, gensupport.WrapError(&googleapi.Error{
32332 Code: res.StatusCode,
32333 Header: res.Header,
32334 })
32335 }
32336 if err != nil {
32337 return nil, err
32338 }
32339 defer googleapi.CloseBody(res)
32340 if err := googleapi.CheckResponse(res); err != nil {
32341 return nil, gensupport.WrapError(err)
32342 }
32343 ret := &ProjectsListResponse{
32344 ServerResponse: googleapi.ServerResponse{
32345 Header: res.Header,
32346 HTTPStatusCode: res.StatusCode,
32347 },
32348 }
32349 target := &ret
32350 if err := gensupport.DecodeResponse(target, res); err != nil {
32351 return nil, err
32352 }
32353 return ret, nil
32354 }
32355
32356
32357
32358
32359 func (c *ProjectsListCall) Pages(ctx context.Context, f func(*ProjectsListResponse) error) error {
32360 c.ctx_ = ctx
32361 defer c.PageToken(c.urlParams_.Get("pageToken"))
32362 for {
32363 x, err := c.Do()
32364 if err != nil {
32365 return err
32366 }
32367 if err := f(x); err != nil {
32368 return err
32369 }
32370 if x.NextPageToken == "" {
32371 return nil
32372 }
32373 c.PageToken(x.NextPageToken)
32374 }
32375 }
32376
32377 type RegionsListCall struct {
32378 s *Service
32379 profileId int64
32380 urlParams_ gensupport.URLParams
32381 ifNoneMatch_ string
32382 ctx_ context.Context
32383 header_ http.Header
32384 }
32385
32386
32387
32388
32389 func (r *RegionsService) List(profileId int64) *RegionsListCall {
32390 c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32391 c.profileId = profileId
32392 return c
32393 }
32394
32395
32396
32397
32398 func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
32399 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32400 return c
32401 }
32402
32403
32404
32405
32406 func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
32407 c.ifNoneMatch_ = entityTag
32408 return c
32409 }
32410
32411
32412 func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
32413 c.ctx_ = ctx
32414 return c
32415 }
32416
32417
32418
32419 func (c *RegionsListCall) Header() http.Header {
32420 if c.header_ == nil {
32421 c.header_ = make(http.Header)
32422 }
32423 return c.header_
32424 }
32425
32426 func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
32427 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32428 if c.ifNoneMatch_ != "" {
32429 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32430 }
32431 var body io.Reader = nil
32432 c.urlParams_.Set("alt", alt)
32433 c.urlParams_.Set("prettyPrint", "false")
32434 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/regions")
32435 urls += "?" + c.urlParams_.Encode()
32436 req, err := http.NewRequest("GET", urls, body)
32437 if err != nil {
32438 return nil, err
32439 }
32440 req.Header = reqHeaders
32441 googleapi.Expand(req.URL, map[string]string{
32442 "profileId": strconv.FormatInt(c.profileId, 10),
32443 })
32444 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32445 }
32446
32447
32448
32449
32450
32451
32452
32453 func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionsListResponse, error) {
32454 gensupport.SetOptions(c.urlParams_, opts...)
32455 res, err := c.doRequest("json")
32456 if res != nil && res.StatusCode == http.StatusNotModified {
32457 if res.Body != nil {
32458 res.Body.Close()
32459 }
32460 return nil, gensupport.WrapError(&googleapi.Error{
32461 Code: res.StatusCode,
32462 Header: res.Header,
32463 })
32464 }
32465 if err != nil {
32466 return nil, err
32467 }
32468 defer googleapi.CloseBody(res)
32469 if err := googleapi.CheckResponse(res); err != nil {
32470 return nil, gensupport.WrapError(err)
32471 }
32472 ret := &RegionsListResponse{
32473 ServerResponse: googleapi.ServerResponse{
32474 Header: res.Header,
32475 HTTPStatusCode: res.StatusCode,
32476 },
32477 }
32478 target := &ret
32479 if err := gensupport.DecodeResponse(target, res); err != nil {
32480 return nil, err
32481 }
32482 return ret, nil
32483 }
32484
32485 type RemarketingListSharesGetCall struct {
32486 s *Service
32487 profileId int64
32488 remarketingListId int64
32489 urlParams_ gensupport.URLParams
32490 ifNoneMatch_ string
32491 ctx_ context.Context
32492 header_ http.Header
32493 }
32494
32495
32496
32497
32498
32499 func (r *RemarketingListSharesService) Get(profileId int64, remarketingListId int64) *RemarketingListSharesGetCall {
32500 c := &RemarketingListSharesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32501 c.profileId = profileId
32502 c.remarketingListId = remarketingListId
32503 return c
32504 }
32505
32506
32507
32508
32509 func (c *RemarketingListSharesGetCall) Fields(s ...googleapi.Field) *RemarketingListSharesGetCall {
32510 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32511 return c
32512 }
32513
32514
32515
32516
32517 func (c *RemarketingListSharesGetCall) IfNoneMatch(entityTag string) *RemarketingListSharesGetCall {
32518 c.ifNoneMatch_ = entityTag
32519 return c
32520 }
32521
32522
32523 func (c *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
32524 c.ctx_ = ctx
32525 return c
32526 }
32527
32528
32529
32530 func (c *RemarketingListSharesGetCall) Header() http.Header {
32531 if c.header_ == nil {
32532 c.header_ = make(http.Header)
32533 }
32534 return c.header_
32535 }
32536
32537 func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
32538 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32539 if c.ifNoneMatch_ != "" {
32540 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32541 }
32542 var body io.Reader = nil
32543 c.urlParams_.Set("alt", alt)
32544 c.urlParams_.Set("prettyPrint", "false")
32545 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingListShares/{+remarketingListId}")
32546 urls += "?" + c.urlParams_.Encode()
32547 req, err := http.NewRequest("GET", urls, body)
32548 if err != nil {
32549 return nil, err
32550 }
32551 req.Header = reqHeaders
32552 googleapi.Expand(req.URL, map[string]string{
32553 "profileId": strconv.FormatInt(c.profileId, 10),
32554 "remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
32555 })
32556 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32557 }
32558
32559
32560
32561
32562
32563
32564
32565 func (c *RemarketingListSharesGetCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
32566 gensupport.SetOptions(c.urlParams_, opts...)
32567 res, err := c.doRequest("json")
32568 if res != nil && res.StatusCode == http.StatusNotModified {
32569 if res.Body != nil {
32570 res.Body.Close()
32571 }
32572 return nil, gensupport.WrapError(&googleapi.Error{
32573 Code: res.StatusCode,
32574 Header: res.Header,
32575 })
32576 }
32577 if err != nil {
32578 return nil, err
32579 }
32580 defer googleapi.CloseBody(res)
32581 if err := googleapi.CheckResponse(res); err != nil {
32582 return nil, gensupport.WrapError(err)
32583 }
32584 ret := &RemarketingListShare{
32585 ServerResponse: googleapi.ServerResponse{
32586 Header: res.Header,
32587 HTTPStatusCode: res.StatusCode,
32588 },
32589 }
32590 target := &ret
32591 if err := gensupport.DecodeResponse(target, res); err != nil {
32592 return nil, err
32593 }
32594 return ret, nil
32595 }
32596
32597 type RemarketingListSharesPatchCall struct {
32598 s *Service
32599 profileId int64
32600 remarketinglistshare *RemarketingListShare
32601 urlParams_ gensupport.URLParams
32602 ctx_ context.Context
32603 header_ http.Header
32604 }
32605
32606
32607
32608
32609
32610
32611 func (r *RemarketingListSharesService) Patch(profileId int64, id int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesPatchCall {
32612 c := &RemarketingListSharesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32613 c.profileId = profileId
32614 c.urlParams_.Set("id", fmt.Sprint(id))
32615 c.remarketinglistshare = remarketinglistshare
32616 return c
32617 }
32618
32619
32620
32621
32622 func (c *RemarketingListSharesPatchCall) Fields(s ...googleapi.Field) *RemarketingListSharesPatchCall {
32623 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32624 return c
32625 }
32626
32627
32628 func (c *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
32629 c.ctx_ = ctx
32630 return c
32631 }
32632
32633
32634
32635 func (c *RemarketingListSharesPatchCall) Header() http.Header {
32636 if c.header_ == nil {
32637 c.header_ = make(http.Header)
32638 }
32639 return c.header_
32640 }
32641
32642 func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
32643 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32644 var body io.Reader = nil
32645 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
32646 if err != nil {
32647 return nil, err
32648 }
32649 c.urlParams_.Set("alt", alt)
32650 c.urlParams_.Set("prettyPrint", "false")
32651 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingListShares")
32652 urls += "?" + c.urlParams_.Encode()
32653 req, err := http.NewRequest("PATCH", urls, body)
32654 if err != nil {
32655 return nil, err
32656 }
32657 req.Header = reqHeaders
32658 googleapi.Expand(req.URL, map[string]string{
32659 "profileId": strconv.FormatInt(c.profileId, 10),
32660 })
32661 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32662 }
32663
32664
32665
32666
32667
32668
32669
32670 func (c *RemarketingListSharesPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
32671 gensupport.SetOptions(c.urlParams_, opts...)
32672 res, err := c.doRequest("json")
32673 if res != nil && res.StatusCode == http.StatusNotModified {
32674 if res.Body != nil {
32675 res.Body.Close()
32676 }
32677 return nil, gensupport.WrapError(&googleapi.Error{
32678 Code: res.StatusCode,
32679 Header: res.Header,
32680 })
32681 }
32682 if err != nil {
32683 return nil, err
32684 }
32685 defer googleapi.CloseBody(res)
32686 if err := googleapi.CheckResponse(res); err != nil {
32687 return nil, gensupport.WrapError(err)
32688 }
32689 ret := &RemarketingListShare{
32690 ServerResponse: googleapi.ServerResponse{
32691 Header: res.Header,
32692 HTTPStatusCode: res.StatusCode,
32693 },
32694 }
32695 target := &ret
32696 if err := gensupport.DecodeResponse(target, res); err != nil {
32697 return nil, err
32698 }
32699 return ret, nil
32700 }
32701
32702 type RemarketingListSharesUpdateCall struct {
32703 s *Service
32704 profileId int64
32705 remarketinglistshare *RemarketingListShare
32706 urlParams_ gensupport.URLParams
32707 ctx_ context.Context
32708 header_ http.Header
32709 }
32710
32711
32712
32713
32714 func (r *RemarketingListSharesService) Update(profileId int64, remarketinglistshare *RemarketingListShare) *RemarketingListSharesUpdateCall {
32715 c := &RemarketingListSharesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32716 c.profileId = profileId
32717 c.remarketinglistshare = remarketinglistshare
32718 return c
32719 }
32720
32721
32722
32723
32724 func (c *RemarketingListSharesUpdateCall) Fields(s ...googleapi.Field) *RemarketingListSharesUpdateCall {
32725 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32726 return c
32727 }
32728
32729
32730 func (c *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
32731 c.ctx_ = ctx
32732 return c
32733 }
32734
32735
32736
32737 func (c *RemarketingListSharesUpdateCall) Header() http.Header {
32738 if c.header_ == nil {
32739 c.header_ = make(http.Header)
32740 }
32741 return c.header_
32742 }
32743
32744 func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
32745 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32746 var body io.Reader = nil
32747 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
32748 if err != nil {
32749 return nil, err
32750 }
32751 c.urlParams_.Set("alt", alt)
32752 c.urlParams_.Set("prettyPrint", "false")
32753 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingListShares")
32754 urls += "?" + c.urlParams_.Encode()
32755 req, err := http.NewRequest("PUT", urls, body)
32756 if err != nil {
32757 return nil, err
32758 }
32759 req.Header = reqHeaders
32760 googleapi.Expand(req.URL, map[string]string{
32761 "profileId": strconv.FormatInt(c.profileId, 10),
32762 })
32763 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32764 }
32765
32766
32767
32768
32769
32770
32771
32772 func (c *RemarketingListSharesUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingListShare, error) {
32773 gensupport.SetOptions(c.urlParams_, opts...)
32774 res, err := c.doRequest("json")
32775 if res != nil && res.StatusCode == http.StatusNotModified {
32776 if res.Body != nil {
32777 res.Body.Close()
32778 }
32779 return nil, gensupport.WrapError(&googleapi.Error{
32780 Code: res.StatusCode,
32781 Header: res.Header,
32782 })
32783 }
32784 if err != nil {
32785 return nil, err
32786 }
32787 defer googleapi.CloseBody(res)
32788 if err := googleapi.CheckResponse(res); err != nil {
32789 return nil, gensupport.WrapError(err)
32790 }
32791 ret := &RemarketingListShare{
32792 ServerResponse: googleapi.ServerResponse{
32793 Header: res.Header,
32794 HTTPStatusCode: res.StatusCode,
32795 },
32796 }
32797 target := &ret
32798 if err := gensupport.DecodeResponse(target, res); err != nil {
32799 return nil, err
32800 }
32801 return ret, nil
32802 }
32803
32804 type RemarketingListsGetCall struct {
32805 s *Service
32806 profileId int64
32807 id int64
32808 urlParams_ gensupport.URLParams
32809 ifNoneMatch_ string
32810 ctx_ context.Context
32811 header_ http.Header
32812 }
32813
32814
32815
32816
32817
32818 func (r *RemarketingListsService) Get(profileId int64, id int64) *RemarketingListsGetCall {
32819 c := &RemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32820 c.profileId = profileId
32821 c.id = id
32822 return c
32823 }
32824
32825
32826
32827
32828 func (c *RemarketingListsGetCall) Fields(s ...googleapi.Field) *RemarketingListsGetCall {
32829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32830 return c
32831 }
32832
32833
32834
32835
32836 func (c *RemarketingListsGetCall) IfNoneMatch(entityTag string) *RemarketingListsGetCall {
32837 c.ifNoneMatch_ = entityTag
32838 return c
32839 }
32840
32841
32842 func (c *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
32843 c.ctx_ = ctx
32844 return c
32845 }
32846
32847
32848
32849 func (c *RemarketingListsGetCall) Header() http.Header {
32850 if c.header_ == nil {
32851 c.header_ = make(http.Header)
32852 }
32853 return c.header_
32854 }
32855
32856 func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
32857 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
32858 if c.ifNoneMatch_ != "" {
32859 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32860 }
32861 var body io.Reader = nil
32862 c.urlParams_.Set("alt", alt)
32863 c.urlParams_.Set("prettyPrint", "false")
32864 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingLists/{+id}")
32865 urls += "?" + c.urlParams_.Encode()
32866 req, err := http.NewRequest("GET", urls, body)
32867 if err != nil {
32868 return nil, err
32869 }
32870 req.Header = reqHeaders
32871 googleapi.Expand(req.URL, map[string]string{
32872 "profileId": strconv.FormatInt(c.profileId, 10),
32873 "id": strconv.FormatInt(c.id, 10),
32874 })
32875 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32876 }
32877
32878
32879
32880
32881
32882
32883
32884 func (c *RemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
32885 gensupport.SetOptions(c.urlParams_, opts...)
32886 res, err := c.doRequest("json")
32887 if res != nil && res.StatusCode == http.StatusNotModified {
32888 if res.Body != nil {
32889 res.Body.Close()
32890 }
32891 return nil, gensupport.WrapError(&googleapi.Error{
32892 Code: res.StatusCode,
32893 Header: res.Header,
32894 })
32895 }
32896 if err != nil {
32897 return nil, err
32898 }
32899 defer googleapi.CloseBody(res)
32900 if err := googleapi.CheckResponse(res); err != nil {
32901 return nil, gensupport.WrapError(err)
32902 }
32903 ret := &RemarketingList{
32904 ServerResponse: googleapi.ServerResponse{
32905 Header: res.Header,
32906 HTTPStatusCode: res.StatusCode,
32907 },
32908 }
32909 target := &ret
32910 if err := gensupport.DecodeResponse(target, res); err != nil {
32911 return nil, err
32912 }
32913 return ret, nil
32914 }
32915
32916 type RemarketingListsInsertCall struct {
32917 s *Service
32918 profileId int64
32919 remarketinglist *RemarketingList
32920 urlParams_ gensupport.URLParams
32921 ctx_ context.Context
32922 header_ http.Header
32923 }
32924
32925
32926
32927
32928 func (r *RemarketingListsService) Insert(profileId int64, remarketinglist *RemarketingList) *RemarketingListsInsertCall {
32929 c := &RemarketingListsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32930 c.profileId = profileId
32931 c.remarketinglist = remarketinglist
32932 return c
32933 }
32934
32935
32936
32937
32938 func (c *RemarketingListsInsertCall) Fields(s ...googleapi.Field) *RemarketingListsInsertCall {
32939 c.urlParams_.Set("fields", googleapi.CombineFields(s))
32940 return c
32941 }
32942
32943
32944 func (c *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
32945 c.ctx_ = ctx
32946 return c
32947 }
32948
32949
32950
32951 func (c *RemarketingListsInsertCall) Header() http.Header {
32952 if c.header_ == nil {
32953 c.header_ = make(http.Header)
32954 }
32955 return c.header_
32956 }
32957
32958 func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
32959 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
32960 var body io.Reader = nil
32961 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
32962 if err != nil {
32963 return nil, err
32964 }
32965 c.urlParams_.Set("alt", alt)
32966 c.urlParams_.Set("prettyPrint", "false")
32967 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingLists")
32968 urls += "?" + c.urlParams_.Encode()
32969 req, err := http.NewRequest("POST", urls, body)
32970 if err != nil {
32971 return nil, err
32972 }
32973 req.Header = reqHeaders
32974 googleapi.Expand(req.URL, map[string]string{
32975 "profileId": strconv.FormatInt(c.profileId, 10),
32976 })
32977 return gensupport.SendRequest(c.ctx_, c.s.client, req)
32978 }
32979
32980
32981
32982
32983
32984
32985
32986 func (c *RemarketingListsInsertCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
32987 gensupport.SetOptions(c.urlParams_, opts...)
32988 res, err := c.doRequest("json")
32989 if res != nil && res.StatusCode == http.StatusNotModified {
32990 if res.Body != nil {
32991 res.Body.Close()
32992 }
32993 return nil, gensupport.WrapError(&googleapi.Error{
32994 Code: res.StatusCode,
32995 Header: res.Header,
32996 })
32997 }
32998 if err != nil {
32999 return nil, err
33000 }
33001 defer googleapi.CloseBody(res)
33002 if err := googleapi.CheckResponse(res); err != nil {
33003 return nil, gensupport.WrapError(err)
33004 }
33005 ret := &RemarketingList{
33006 ServerResponse: googleapi.ServerResponse{
33007 Header: res.Header,
33008 HTTPStatusCode: res.StatusCode,
33009 },
33010 }
33011 target := &ret
33012 if err := gensupport.DecodeResponse(target, res); err != nil {
33013 return nil, err
33014 }
33015 return ret, nil
33016 }
33017
33018 type RemarketingListsListCall struct {
33019 s *Service
33020 profileId int64
33021 urlParams_ gensupport.URLParams
33022 ifNoneMatch_ string
33023 ctx_ context.Context
33024 header_ http.Header
33025 }
33026
33027
33028
33029
33030
33031
33032 func (r *RemarketingListsService) List(profileId int64, advertiserId int64) *RemarketingListsListCall {
33033 c := &RemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33034 c.profileId = profileId
33035 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
33036 return c
33037 }
33038
33039
33040
33041 func (c *RemarketingListsListCall) Active(active bool) *RemarketingListsListCall {
33042 c.urlParams_.Set("active", fmt.Sprint(active))
33043 return c
33044 }
33045
33046
33047
33048 func (c *RemarketingListsListCall) FloodlightActivityId(floodlightActivityId int64) *RemarketingListsListCall {
33049 c.urlParams_.Set("floodlightActivityId", fmt.Sprint(floodlightActivityId))
33050 return c
33051 }
33052
33053
33054
33055 func (c *RemarketingListsListCall) MaxResults(maxResults int64) *RemarketingListsListCall {
33056 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33057 return c
33058 }
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068 func (c *RemarketingListsListCall) Name(name string) *RemarketingListsListCall {
33069 c.urlParams_.Set("name", name)
33070 return c
33071 }
33072
33073
33074
33075 func (c *RemarketingListsListCall) PageToken(pageToken string) *RemarketingListsListCall {
33076 c.urlParams_.Set("pageToken", pageToken)
33077 return c
33078 }
33079
33080
33081
33082
33083
33084
33085
33086
33087 func (c *RemarketingListsListCall) SortField(sortField string) *RemarketingListsListCall {
33088 c.urlParams_.Set("sortField", sortField)
33089 return c
33090 }
33091
33092
33093
33094
33095
33096
33097
33098 func (c *RemarketingListsListCall) SortOrder(sortOrder string) *RemarketingListsListCall {
33099 c.urlParams_.Set("sortOrder", sortOrder)
33100 return c
33101 }
33102
33103
33104
33105
33106 func (c *RemarketingListsListCall) Fields(s ...googleapi.Field) *RemarketingListsListCall {
33107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33108 return c
33109 }
33110
33111
33112
33113
33114 func (c *RemarketingListsListCall) IfNoneMatch(entityTag string) *RemarketingListsListCall {
33115 c.ifNoneMatch_ = entityTag
33116 return c
33117 }
33118
33119
33120 func (c *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
33121 c.ctx_ = ctx
33122 return c
33123 }
33124
33125
33126
33127 func (c *RemarketingListsListCall) Header() http.Header {
33128 if c.header_ == nil {
33129 c.header_ = make(http.Header)
33130 }
33131 return c.header_
33132 }
33133
33134 func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
33135 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33136 if c.ifNoneMatch_ != "" {
33137 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33138 }
33139 var body io.Reader = nil
33140 c.urlParams_.Set("alt", alt)
33141 c.urlParams_.Set("prettyPrint", "false")
33142 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingLists")
33143 urls += "?" + c.urlParams_.Encode()
33144 req, err := http.NewRequest("GET", urls, body)
33145 if err != nil {
33146 return nil, err
33147 }
33148 req.Header = reqHeaders
33149 googleapi.Expand(req.URL, map[string]string{
33150 "profileId": strconv.FormatInt(c.profileId, 10),
33151 })
33152 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33153 }
33154
33155
33156
33157
33158
33159
33160
33161 func (c *RemarketingListsListCall) Do(opts ...googleapi.CallOption) (*RemarketingListsListResponse, error) {
33162 gensupport.SetOptions(c.urlParams_, opts...)
33163 res, err := c.doRequest("json")
33164 if res != nil && res.StatusCode == http.StatusNotModified {
33165 if res.Body != nil {
33166 res.Body.Close()
33167 }
33168 return nil, gensupport.WrapError(&googleapi.Error{
33169 Code: res.StatusCode,
33170 Header: res.Header,
33171 })
33172 }
33173 if err != nil {
33174 return nil, err
33175 }
33176 defer googleapi.CloseBody(res)
33177 if err := googleapi.CheckResponse(res); err != nil {
33178 return nil, gensupport.WrapError(err)
33179 }
33180 ret := &RemarketingListsListResponse{
33181 ServerResponse: googleapi.ServerResponse{
33182 Header: res.Header,
33183 HTTPStatusCode: res.StatusCode,
33184 },
33185 }
33186 target := &ret
33187 if err := gensupport.DecodeResponse(target, res); err != nil {
33188 return nil, err
33189 }
33190 return ret, nil
33191 }
33192
33193
33194
33195
33196 func (c *RemarketingListsListCall) Pages(ctx context.Context, f func(*RemarketingListsListResponse) error) error {
33197 c.ctx_ = ctx
33198 defer c.PageToken(c.urlParams_.Get("pageToken"))
33199 for {
33200 x, err := c.Do()
33201 if err != nil {
33202 return err
33203 }
33204 if err := f(x); err != nil {
33205 return err
33206 }
33207 if x.NextPageToken == "" {
33208 return nil
33209 }
33210 c.PageToken(x.NextPageToken)
33211 }
33212 }
33213
33214 type RemarketingListsPatchCall struct {
33215 s *Service
33216 profileId int64
33217 remarketinglist *RemarketingList
33218 urlParams_ gensupport.URLParams
33219 ctx_ context.Context
33220 header_ http.Header
33221 }
33222
33223
33224
33225
33226
33227
33228 func (r *RemarketingListsService) Patch(profileId int64, id int64, remarketinglist *RemarketingList) *RemarketingListsPatchCall {
33229 c := &RemarketingListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33230 c.profileId = profileId
33231 c.urlParams_.Set("id", fmt.Sprint(id))
33232 c.remarketinglist = remarketinglist
33233 return c
33234 }
33235
33236
33237
33238
33239 func (c *RemarketingListsPatchCall) Fields(s ...googleapi.Field) *RemarketingListsPatchCall {
33240 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33241 return c
33242 }
33243
33244
33245 func (c *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
33246 c.ctx_ = ctx
33247 return c
33248 }
33249
33250
33251
33252 func (c *RemarketingListsPatchCall) Header() http.Header {
33253 if c.header_ == nil {
33254 c.header_ = make(http.Header)
33255 }
33256 return c.header_
33257 }
33258
33259 func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
33260 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33261 var body io.Reader = nil
33262 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
33263 if err != nil {
33264 return nil, err
33265 }
33266 c.urlParams_.Set("alt", alt)
33267 c.urlParams_.Set("prettyPrint", "false")
33268 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingLists")
33269 urls += "?" + c.urlParams_.Encode()
33270 req, err := http.NewRequest("PATCH", urls, body)
33271 if err != nil {
33272 return nil, err
33273 }
33274 req.Header = reqHeaders
33275 googleapi.Expand(req.URL, map[string]string{
33276 "profileId": strconv.FormatInt(c.profileId, 10),
33277 })
33278 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33279 }
33280
33281
33282
33283
33284
33285
33286
33287 func (c *RemarketingListsPatchCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
33288 gensupport.SetOptions(c.urlParams_, opts...)
33289 res, err := c.doRequest("json")
33290 if res != nil && res.StatusCode == http.StatusNotModified {
33291 if res.Body != nil {
33292 res.Body.Close()
33293 }
33294 return nil, gensupport.WrapError(&googleapi.Error{
33295 Code: res.StatusCode,
33296 Header: res.Header,
33297 })
33298 }
33299 if err != nil {
33300 return nil, err
33301 }
33302 defer googleapi.CloseBody(res)
33303 if err := googleapi.CheckResponse(res); err != nil {
33304 return nil, gensupport.WrapError(err)
33305 }
33306 ret := &RemarketingList{
33307 ServerResponse: googleapi.ServerResponse{
33308 Header: res.Header,
33309 HTTPStatusCode: res.StatusCode,
33310 },
33311 }
33312 target := &ret
33313 if err := gensupport.DecodeResponse(target, res); err != nil {
33314 return nil, err
33315 }
33316 return ret, nil
33317 }
33318
33319 type RemarketingListsUpdateCall struct {
33320 s *Service
33321 profileId int64
33322 remarketinglist *RemarketingList
33323 urlParams_ gensupport.URLParams
33324 ctx_ context.Context
33325 header_ http.Header
33326 }
33327
33328
33329
33330
33331 func (r *RemarketingListsService) Update(profileId int64, remarketinglist *RemarketingList) *RemarketingListsUpdateCall {
33332 c := &RemarketingListsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33333 c.profileId = profileId
33334 c.remarketinglist = remarketinglist
33335 return c
33336 }
33337
33338
33339
33340
33341 func (c *RemarketingListsUpdateCall) Fields(s ...googleapi.Field) *RemarketingListsUpdateCall {
33342 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33343 return c
33344 }
33345
33346
33347 func (c *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
33348 c.ctx_ = ctx
33349 return c
33350 }
33351
33352
33353
33354 func (c *RemarketingListsUpdateCall) Header() http.Header {
33355 if c.header_ == nil {
33356 c.header_ = make(http.Header)
33357 }
33358 return c.header_
33359 }
33360
33361 func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
33362 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33363 var body io.Reader = nil
33364 body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
33365 if err != nil {
33366 return nil, err
33367 }
33368 c.urlParams_.Set("alt", alt)
33369 c.urlParams_.Set("prettyPrint", "false")
33370 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/remarketingLists")
33371 urls += "?" + c.urlParams_.Encode()
33372 req, err := http.NewRequest("PUT", urls, body)
33373 if err != nil {
33374 return nil, err
33375 }
33376 req.Header = reqHeaders
33377 googleapi.Expand(req.URL, map[string]string{
33378 "profileId": strconv.FormatInt(c.profileId, 10),
33379 })
33380 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33381 }
33382
33383
33384
33385
33386
33387
33388
33389 func (c *RemarketingListsUpdateCall) Do(opts ...googleapi.CallOption) (*RemarketingList, error) {
33390 gensupport.SetOptions(c.urlParams_, opts...)
33391 res, err := c.doRequest("json")
33392 if res != nil && res.StatusCode == http.StatusNotModified {
33393 if res.Body != nil {
33394 res.Body.Close()
33395 }
33396 return nil, gensupport.WrapError(&googleapi.Error{
33397 Code: res.StatusCode,
33398 Header: res.Header,
33399 })
33400 }
33401 if err != nil {
33402 return nil, err
33403 }
33404 defer googleapi.CloseBody(res)
33405 if err := googleapi.CheckResponse(res); err != nil {
33406 return nil, gensupport.WrapError(err)
33407 }
33408 ret := &RemarketingList{
33409 ServerResponse: googleapi.ServerResponse{
33410 Header: res.Header,
33411 HTTPStatusCode: res.StatusCode,
33412 },
33413 }
33414 target := &ret
33415 if err := gensupport.DecodeResponse(target, res); err != nil {
33416 return nil, err
33417 }
33418 return ret, nil
33419 }
33420
33421 type ReportsDeleteCall struct {
33422 s *Service
33423 profileId int64
33424 reportId int64
33425 urlParams_ gensupport.URLParams
33426 ctx_ context.Context
33427 header_ http.Header
33428 }
33429
33430
33431
33432
33433
33434 func (r *ReportsService) Delete(profileId int64, reportId int64) *ReportsDeleteCall {
33435 c := &ReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33436 c.profileId = profileId
33437 c.reportId = reportId
33438 return c
33439 }
33440
33441
33442
33443
33444 func (c *ReportsDeleteCall) Fields(s ...googleapi.Field) *ReportsDeleteCall {
33445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33446 return c
33447 }
33448
33449
33450 func (c *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
33451 c.ctx_ = ctx
33452 return c
33453 }
33454
33455
33456
33457 func (c *ReportsDeleteCall) Header() http.Header {
33458 if c.header_ == nil {
33459 c.header_ = make(http.Header)
33460 }
33461 return c.header_
33462 }
33463
33464 func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
33465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33466 var body io.Reader = nil
33467 c.urlParams_.Set("alt", alt)
33468 c.urlParams_.Set("prettyPrint", "false")
33469 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
33470 urls += "?" + c.urlParams_.Encode()
33471 req, err := http.NewRequest("DELETE", urls, body)
33472 if err != nil {
33473 return nil, err
33474 }
33475 req.Header = reqHeaders
33476 googleapi.Expand(req.URL, map[string]string{
33477 "profileId": strconv.FormatInt(c.profileId, 10),
33478 "reportId": strconv.FormatInt(c.reportId, 10),
33479 })
33480 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33481 }
33482
33483
33484 func (c *ReportsDeleteCall) Do(opts ...googleapi.CallOption) error {
33485 gensupport.SetOptions(c.urlParams_, opts...)
33486 res, err := c.doRequest("json")
33487 if err != nil {
33488 return err
33489 }
33490 defer googleapi.CloseBody(res)
33491 if err := googleapi.CheckResponse(res); err != nil {
33492 return gensupport.WrapError(err)
33493 }
33494 return nil
33495 }
33496
33497 type ReportsGetCall struct {
33498 s *Service
33499 profileId int64
33500 reportId int64
33501 urlParams_ gensupport.URLParams
33502 ifNoneMatch_ string
33503 ctx_ context.Context
33504 header_ http.Header
33505 }
33506
33507
33508
33509
33510
33511 func (r *ReportsService) Get(profileId int64, reportId int64) *ReportsGetCall {
33512 c := &ReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33513 c.profileId = profileId
33514 c.reportId = reportId
33515 return c
33516 }
33517
33518
33519
33520
33521 func (c *ReportsGetCall) Fields(s ...googleapi.Field) *ReportsGetCall {
33522 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33523 return c
33524 }
33525
33526
33527
33528
33529 func (c *ReportsGetCall) IfNoneMatch(entityTag string) *ReportsGetCall {
33530 c.ifNoneMatch_ = entityTag
33531 return c
33532 }
33533
33534
33535 func (c *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
33536 c.ctx_ = ctx
33537 return c
33538 }
33539
33540
33541
33542 func (c *ReportsGetCall) Header() http.Header {
33543 if c.header_ == nil {
33544 c.header_ = make(http.Header)
33545 }
33546 return c.header_
33547 }
33548
33549 func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
33550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33551 if c.ifNoneMatch_ != "" {
33552 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33553 }
33554 var body io.Reader = nil
33555 c.urlParams_.Set("alt", alt)
33556 c.urlParams_.Set("prettyPrint", "false")
33557 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
33558 urls += "?" + c.urlParams_.Encode()
33559 req, err := http.NewRequest("GET", urls, body)
33560 if err != nil {
33561 return nil, err
33562 }
33563 req.Header = reqHeaders
33564 googleapi.Expand(req.URL, map[string]string{
33565 "profileId": strconv.FormatInt(c.profileId, 10),
33566 "reportId": strconv.FormatInt(c.reportId, 10),
33567 })
33568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33569 }
33570
33571
33572
33573
33574
33575
33576 func (c *ReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error) {
33577 gensupport.SetOptions(c.urlParams_, opts...)
33578 res, err := c.doRequest("json")
33579 if res != nil && res.StatusCode == http.StatusNotModified {
33580 if res.Body != nil {
33581 res.Body.Close()
33582 }
33583 return nil, gensupport.WrapError(&googleapi.Error{
33584 Code: res.StatusCode,
33585 Header: res.Header,
33586 })
33587 }
33588 if err != nil {
33589 return nil, err
33590 }
33591 defer googleapi.CloseBody(res)
33592 if err := googleapi.CheckResponse(res); err != nil {
33593 return nil, gensupport.WrapError(err)
33594 }
33595 ret := &Report{
33596 ServerResponse: googleapi.ServerResponse{
33597 Header: res.Header,
33598 HTTPStatusCode: res.StatusCode,
33599 },
33600 }
33601 target := &ret
33602 if err := gensupport.DecodeResponse(target, res); err != nil {
33603 return nil, err
33604 }
33605 return ret, nil
33606 }
33607
33608 type ReportsInsertCall struct {
33609 s *Service
33610 profileId int64
33611 report *Report
33612 urlParams_ gensupport.URLParams
33613 ctx_ context.Context
33614 header_ http.Header
33615 }
33616
33617
33618
33619
33620 func (r *ReportsService) Insert(profileId int64, report *Report) *ReportsInsertCall {
33621 c := &ReportsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33622 c.profileId = profileId
33623 c.report = report
33624 return c
33625 }
33626
33627
33628
33629
33630 func (c *ReportsInsertCall) Fields(s ...googleapi.Field) *ReportsInsertCall {
33631 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33632 return c
33633 }
33634
33635
33636 func (c *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
33637 c.ctx_ = ctx
33638 return c
33639 }
33640
33641
33642
33643 func (c *ReportsInsertCall) Header() http.Header {
33644 if c.header_ == nil {
33645 c.header_ = make(http.Header)
33646 }
33647 return c.header_
33648 }
33649
33650 func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
33651 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33652 var body io.Reader = nil
33653 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
33654 if err != nil {
33655 return nil, err
33656 }
33657 c.urlParams_.Set("alt", alt)
33658 c.urlParams_.Set("prettyPrint", "false")
33659 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
33660 urls += "?" + c.urlParams_.Encode()
33661 req, err := http.NewRequest("POST", urls, body)
33662 if err != nil {
33663 return nil, err
33664 }
33665 req.Header = reqHeaders
33666 googleapi.Expand(req.URL, map[string]string{
33667 "profileId": strconv.FormatInt(c.profileId, 10),
33668 })
33669 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33670 }
33671
33672
33673
33674
33675
33676
33677 func (c *ReportsInsertCall) Do(opts ...googleapi.CallOption) (*Report, error) {
33678 gensupport.SetOptions(c.urlParams_, opts...)
33679 res, err := c.doRequest("json")
33680 if res != nil && res.StatusCode == http.StatusNotModified {
33681 if res.Body != nil {
33682 res.Body.Close()
33683 }
33684 return nil, gensupport.WrapError(&googleapi.Error{
33685 Code: res.StatusCode,
33686 Header: res.Header,
33687 })
33688 }
33689 if err != nil {
33690 return nil, err
33691 }
33692 defer googleapi.CloseBody(res)
33693 if err := googleapi.CheckResponse(res); err != nil {
33694 return nil, gensupport.WrapError(err)
33695 }
33696 ret := &Report{
33697 ServerResponse: googleapi.ServerResponse{
33698 Header: res.Header,
33699 HTTPStatusCode: res.StatusCode,
33700 },
33701 }
33702 target := &ret
33703 if err := gensupport.DecodeResponse(target, res); err != nil {
33704 return nil, err
33705 }
33706 return ret, nil
33707 }
33708
33709 type ReportsListCall struct {
33710 s *Service
33711 profileId int64
33712 urlParams_ gensupport.URLParams
33713 ifNoneMatch_ string
33714 ctx_ context.Context
33715 header_ http.Header
33716 }
33717
33718
33719
33720
33721 func (r *ReportsService) List(profileId int64) *ReportsListCall {
33722 c := &ReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33723 c.profileId = profileId
33724 return c
33725 }
33726
33727
33728
33729 func (c *ReportsListCall) MaxResults(maxResults int64) *ReportsListCall {
33730 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33731 return c
33732 }
33733
33734
33735
33736 func (c *ReportsListCall) PageToken(pageToken string) *ReportsListCall {
33737 c.urlParams_.Set("pageToken", pageToken)
33738 return c
33739 }
33740
33741
33742
33743
33744
33745
33746
33747
33748 func (c *ReportsListCall) Scope(scope string) *ReportsListCall {
33749 c.urlParams_.Set("scope", scope)
33750 return c
33751 }
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761 func (c *ReportsListCall) SortField(sortField string) *ReportsListCall {
33762 c.urlParams_.Set("sortField", sortField)
33763 return c
33764 }
33765
33766
33767
33768
33769
33770
33771
33772 func (c *ReportsListCall) SortOrder(sortOrder string) *ReportsListCall {
33773 c.urlParams_.Set("sortOrder", sortOrder)
33774 return c
33775 }
33776
33777
33778
33779
33780 func (c *ReportsListCall) Fields(s ...googleapi.Field) *ReportsListCall {
33781 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33782 return c
33783 }
33784
33785
33786
33787
33788 func (c *ReportsListCall) IfNoneMatch(entityTag string) *ReportsListCall {
33789 c.ifNoneMatch_ = entityTag
33790 return c
33791 }
33792
33793
33794 func (c *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
33795 c.ctx_ = ctx
33796 return c
33797 }
33798
33799
33800
33801 func (c *ReportsListCall) Header() http.Header {
33802 if c.header_ == nil {
33803 c.header_ = make(http.Header)
33804 }
33805 return c.header_
33806 }
33807
33808 func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
33809 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
33810 if c.ifNoneMatch_ != "" {
33811 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33812 }
33813 var body io.Reader = nil
33814 c.urlParams_.Set("alt", alt)
33815 c.urlParams_.Set("prettyPrint", "false")
33816 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports")
33817 urls += "?" + c.urlParams_.Encode()
33818 req, err := http.NewRequest("GET", urls, body)
33819 if err != nil {
33820 return nil, err
33821 }
33822 req.Header = reqHeaders
33823 googleapi.Expand(req.URL, map[string]string{
33824 "profileId": strconv.FormatInt(c.profileId, 10),
33825 })
33826 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33827 }
33828
33829
33830
33831
33832
33833
33834 func (c *ReportsListCall) Do(opts ...googleapi.CallOption) (*ReportList, error) {
33835 gensupport.SetOptions(c.urlParams_, opts...)
33836 res, err := c.doRequest("json")
33837 if res != nil && res.StatusCode == http.StatusNotModified {
33838 if res.Body != nil {
33839 res.Body.Close()
33840 }
33841 return nil, gensupport.WrapError(&googleapi.Error{
33842 Code: res.StatusCode,
33843 Header: res.Header,
33844 })
33845 }
33846 if err != nil {
33847 return nil, err
33848 }
33849 defer googleapi.CloseBody(res)
33850 if err := googleapi.CheckResponse(res); err != nil {
33851 return nil, gensupport.WrapError(err)
33852 }
33853 ret := &ReportList{
33854 ServerResponse: googleapi.ServerResponse{
33855 Header: res.Header,
33856 HTTPStatusCode: res.StatusCode,
33857 },
33858 }
33859 target := &ret
33860 if err := gensupport.DecodeResponse(target, res); err != nil {
33861 return nil, err
33862 }
33863 return ret, nil
33864 }
33865
33866
33867
33868
33869 func (c *ReportsListCall) Pages(ctx context.Context, f func(*ReportList) error) error {
33870 c.ctx_ = ctx
33871 defer c.PageToken(c.urlParams_.Get("pageToken"))
33872 for {
33873 x, err := c.Do()
33874 if err != nil {
33875 return err
33876 }
33877 if err := f(x); err != nil {
33878 return err
33879 }
33880 if x.NextPageToken == "" {
33881 return nil
33882 }
33883 c.PageToken(x.NextPageToken)
33884 }
33885 }
33886
33887 type ReportsPatchCall struct {
33888 s *Service
33889 profileId int64
33890 reportId int64
33891 report *Report
33892 urlParams_ gensupport.URLParams
33893 ctx_ context.Context
33894 header_ http.Header
33895 }
33896
33897
33898
33899
33900
33901 func (r *ReportsService) Patch(profileId int64, reportId int64, report *Report) *ReportsPatchCall {
33902 c := &ReportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33903 c.profileId = profileId
33904 c.reportId = reportId
33905 c.report = report
33906 return c
33907 }
33908
33909
33910
33911
33912 func (c *ReportsPatchCall) Fields(s ...googleapi.Field) *ReportsPatchCall {
33913 c.urlParams_.Set("fields", googleapi.CombineFields(s))
33914 return c
33915 }
33916
33917
33918 func (c *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
33919 c.ctx_ = ctx
33920 return c
33921 }
33922
33923
33924
33925 func (c *ReportsPatchCall) Header() http.Header {
33926 if c.header_ == nil {
33927 c.header_ = make(http.Header)
33928 }
33929 return c.header_
33930 }
33931
33932 func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
33933 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
33934 var body io.Reader = nil
33935 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
33936 if err != nil {
33937 return nil, err
33938 }
33939 c.urlParams_.Set("alt", alt)
33940 c.urlParams_.Set("prettyPrint", "false")
33941 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
33942 urls += "?" + c.urlParams_.Encode()
33943 req, err := http.NewRequest("PATCH", urls, body)
33944 if err != nil {
33945 return nil, err
33946 }
33947 req.Header = reqHeaders
33948 googleapi.Expand(req.URL, map[string]string{
33949 "profileId": strconv.FormatInt(c.profileId, 10),
33950 "reportId": strconv.FormatInt(c.reportId, 10),
33951 })
33952 return gensupport.SendRequest(c.ctx_, c.s.client, req)
33953 }
33954
33955
33956
33957
33958
33959
33960 func (c *ReportsPatchCall) Do(opts ...googleapi.CallOption) (*Report, error) {
33961 gensupport.SetOptions(c.urlParams_, opts...)
33962 res, err := c.doRequest("json")
33963 if res != nil && res.StatusCode == http.StatusNotModified {
33964 if res.Body != nil {
33965 res.Body.Close()
33966 }
33967 return nil, gensupport.WrapError(&googleapi.Error{
33968 Code: res.StatusCode,
33969 Header: res.Header,
33970 })
33971 }
33972 if err != nil {
33973 return nil, err
33974 }
33975 defer googleapi.CloseBody(res)
33976 if err := googleapi.CheckResponse(res); err != nil {
33977 return nil, gensupport.WrapError(err)
33978 }
33979 ret := &Report{
33980 ServerResponse: googleapi.ServerResponse{
33981 Header: res.Header,
33982 HTTPStatusCode: res.StatusCode,
33983 },
33984 }
33985 target := &ret
33986 if err := gensupport.DecodeResponse(target, res); err != nil {
33987 return nil, err
33988 }
33989 return ret, nil
33990 }
33991
33992 type ReportsRunCall struct {
33993 s *Service
33994 profileId int64
33995 reportId int64
33996 urlParams_ gensupport.URLParams
33997 ctx_ context.Context
33998 header_ http.Header
33999 }
34000
34001
34002
34003
34004
34005 func (r *ReportsService) Run(profileId int64, reportId int64) *ReportsRunCall {
34006 c := &ReportsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34007 c.profileId = profileId
34008 c.reportId = reportId
34009 return c
34010 }
34011
34012
34013
34014 func (c *ReportsRunCall) Synchronous(synchronous bool) *ReportsRunCall {
34015 c.urlParams_.Set("synchronous", fmt.Sprint(synchronous))
34016 return c
34017 }
34018
34019
34020
34021
34022 func (c *ReportsRunCall) Fields(s ...googleapi.Field) *ReportsRunCall {
34023 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34024 return c
34025 }
34026
34027
34028 func (c *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
34029 c.ctx_ = ctx
34030 return c
34031 }
34032
34033
34034
34035 func (c *ReportsRunCall) Header() http.Header {
34036 if c.header_ == nil {
34037 c.header_ = make(http.Header)
34038 }
34039 return c.header_
34040 }
34041
34042 func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
34043 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34044 var body io.Reader = nil
34045 c.urlParams_.Set("alt", alt)
34046 c.urlParams_.Set("prettyPrint", "false")
34047 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/run")
34048 urls += "?" + c.urlParams_.Encode()
34049 req, err := http.NewRequest("POST", urls, body)
34050 if err != nil {
34051 return nil, err
34052 }
34053 req.Header = reqHeaders
34054 googleapi.Expand(req.URL, map[string]string{
34055 "profileId": strconv.FormatInt(c.profileId, 10),
34056 "reportId": strconv.FormatInt(c.reportId, 10),
34057 })
34058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34059 }
34060
34061
34062
34063
34064
34065
34066 func (c *ReportsRunCall) Do(opts ...googleapi.CallOption) (*File, error) {
34067 gensupport.SetOptions(c.urlParams_, opts...)
34068 res, err := c.doRequest("json")
34069 if res != nil && res.StatusCode == http.StatusNotModified {
34070 if res.Body != nil {
34071 res.Body.Close()
34072 }
34073 return nil, gensupport.WrapError(&googleapi.Error{
34074 Code: res.StatusCode,
34075 Header: res.Header,
34076 })
34077 }
34078 if err != nil {
34079 return nil, err
34080 }
34081 defer googleapi.CloseBody(res)
34082 if err := googleapi.CheckResponse(res); err != nil {
34083 return nil, gensupport.WrapError(err)
34084 }
34085 ret := &File{
34086 ServerResponse: googleapi.ServerResponse{
34087 Header: res.Header,
34088 HTTPStatusCode: res.StatusCode,
34089 },
34090 }
34091 target := &ret
34092 if err := gensupport.DecodeResponse(target, res); err != nil {
34093 return nil, err
34094 }
34095 return ret, nil
34096 }
34097
34098 type ReportsUpdateCall struct {
34099 s *Service
34100 profileId int64
34101 reportId int64
34102 report *Report
34103 urlParams_ gensupport.URLParams
34104 ctx_ context.Context
34105 header_ http.Header
34106 }
34107
34108
34109
34110
34111
34112 func (r *ReportsService) Update(profileId int64, reportId int64, report *Report) *ReportsUpdateCall {
34113 c := &ReportsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34114 c.profileId = profileId
34115 c.reportId = reportId
34116 c.report = report
34117 return c
34118 }
34119
34120
34121
34122
34123 func (c *ReportsUpdateCall) Fields(s ...googleapi.Field) *ReportsUpdateCall {
34124 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34125 return c
34126 }
34127
34128
34129 func (c *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
34130 c.ctx_ = ctx
34131 return c
34132 }
34133
34134
34135
34136 func (c *ReportsUpdateCall) Header() http.Header {
34137 if c.header_ == nil {
34138 c.header_ = make(http.Header)
34139 }
34140 return c.header_
34141 }
34142
34143 func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
34144 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34145 var body io.Reader = nil
34146 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
34147 if err != nil {
34148 return nil, err
34149 }
34150 c.urlParams_.Set("alt", alt)
34151 c.urlParams_.Set("prettyPrint", "false")
34152 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}")
34153 urls += "?" + c.urlParams_.Encode()
34154 req, err := http.NewRequest("PUT", urls, body)
34155 if err != nil {
34156 return nil, err
34157 }
34158 req.Header = reqHeaders
34159 googleapi.Expand(req.URL, map[string]string{
34160 "profileId": strconv.FormatInt(c.profileId, 10),
34161 "reportId": strconv.FormatInt(c.reportId, 10),
34162 })
34163 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34164 }
34165
34166
34167
34168
34169
34170
34171 func (c *ReportsUpdateCall) Do(opts ...googleapi.CallOption) (*Report, error) {
34172 gensupport.SetOptions(c.urlParams_, opts...)
34173 res, err := c.doRequest("json")
34174 if res != nil && res.StatusCode == http.StatusNotModified {
34175 if res.Body != nil {
34176 res.Body.Close()
34177 }
34178 return nil, gensupport.WrapError(&googleapi.Error{
34179 Code: res.StatusCode,
34180 Header: res.Header,
34181 })
34182 }
34183 if err != nil {
34184 return nil, err
34185 }
34186 defer googleapi.CloseBody(res)
34187 if err := googleapi.CheckResponse(res); err != nil {
34188 return nil, gensupport.WrapError(err)
34189 }
34190 ret := &Report{
34191 ServerResponse: googleapi.ServerResponse{
34192 Header: res.Header,
34193 HTTPStatusCode: res.StatusCode,
34194 },
34195 }
34196 target := &ret
34197 if err := gensupport.DecodeResponse(target, res); err != nil {
34198 return nil, err
34199 }
34200 return ret, nil
34201 }
34202
34203 type ReportsCompatibleFieldsQueryCall struct {
34204 s *Service
34205 profileId int64
34206 report *Report
34207 urlParams_ gensupport.URLParams
34208 ctx_ context.Context
34209 header_ http.Header
34210 }
34211
34212
34213
34214
34215
34216
34217 func (r *ReportsCompatibleFieldsService) Query(profileId int64, report *Report) *ReportsCompatibleFieldsQueryCall {
34218 c := &ReportsCompatibleFieldsQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34219 c.profileId = profileId
34220 c.report = report
34221 return c
34222 }
34223
34224
34225
34226
34227 func (c *ReportsCompatibleFieldsQueryCall) Fields(s ...googleapi.Field) *ReportsCompatibleFieldsQueryCall {
34228 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34229 return c
34230 }
34231
34232
34233 func (c *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
34234 c.ctx_ = ctx
34235 return c
34236 }
34237
34238
34239
34240 func (c *ReportsCompatibleFieldsQueryCall) Header() http.Header {
34241 if c.header_ == nil {
34242 c.header_ = make(http.Header)
34243 }
34244 return c.header_
34245 }
34246
34247 func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
34248 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34249 var body io.Reader = nil
34250 body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
34251 if err != nil {
34252 return nil, err
34253 }
34254 c.urlParams_.Set("alt", alt)
34255 c.urlParams_.Set("prettyPrint", "false")
34256 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/compatiblefields/query")
34257 urls += "?" + c.urlParams_.Encode()
34258 req, err := http.NewRequest("POST", urls, body)
34259 if err != nil {
34260 return nil, err
34261 }
34262 req.Header = reqHeaders
34263 googleapi.Expand(req.URL, map[string]string{
34264 "profileId": strconv.FormatInt(c.profileId, 10),
34265 })
34266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34267 }
34268
34269
34270
34271
34272
34273
34274
34275 func (c *ReportsCompatibleFieldsQueryCall) Do(opts ...googleapi.CallOption) (*CompatibleFields, error) {
34276 gensupport.SetOptions(c.urlParams_, opts...)
34277 res, err := c.doRequest("json")
34278 if res != nil && res.StatusCode == http.StatusNotModified {
34279 if res.Body != nil {
34280 res.Body.Close()
34281 }
34282 return nil, gensupport.WrapError(&googleapi.Error{
34283 Code: res.StatusCode,
34284 Header: res.Header,
34285 })
34286 }
34287 if err != nil {
34288 return nil, err
34289 }
34290 defer googleapi.CloseBody(res)
34291 if err := googleapi.CheckResponse(res); err != nil {
34292 return nil, gensupport.WrapError(err)
34293 }
34294 ret := &CompatibleFields{
34295 ServerResponse: googleapi.ServerResponse{
34296 Header: res.Header,
34297 HTTPStatusCode: res.StatusCode,
34298 },
34299 }
34300 target := &ret
34301 if err := gensupport.DecodeResponse(target, res); err != nil {
34302 return nil, err
34303 }
34304 return ret, nil
34305 }
34306
34307 type ReportsFilesGetCall struct {
34308 s *Service
34309 profileId int64
34310 reportId int64
34311 fileId int64
34312 urlParams_ gensupport.URLParams
34313 ifNoneMatch_ string
34314 ctx_ context.Context
34315 header_ http.Header
34316 }
34317
34318
34319
34320
34321
34322
34323
34324 func (r *ReportsFilesService) Get(profileId int64, reportId int64, fileId int64) *ReportsFilesGetCall {
34325 c := &ReportsFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34326 c.profileId = profileId
34327 c.reportId = reportId
34328 c.fileId = fileId
34329 return c
34330 }
34331
34332
34333
34334
34335 func (c *ReportsFilesGetCall) Fields(s ...googleapi.Field) *ReportsFilesGetCall {
34336 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34337 return c
34338 }
34339
34340
34341
34342
34343 func (c *ReportsFilesGetCall) IfNoneMatch(entityTag string) *ReportsFilesGetCall {
34344 c.ifNoneMatch_ = entityTag
34345 return c
34346 }
34347
34348
34349 func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
34350 c.ctx_ = ctx
34351 return c
34352 }
34353
34354
34355
34356 func (c *ReportsFilesGetCall) Header() http.Header {
34357 if c.header_ == nil {
34358 c.header_ = make(http.Header)
34359 }
34360 return c.header_
34361 }
34362
34363 func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
34364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34365 if c.ifNoneMatch_ != "" {
34366 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34367 }
34368 var body io.Reader = nil
34369 c.urlParams_.Set("alt", alt)
34370 c.urlParams_.Set("prettyPrint", "false")
34371 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files/{fileId}")
34372 urls += "?" + c.urlParams_.Encode()
34373 req, err := http.NewRequest("GET", urls, body)
34374 if err != nil {
34375 return nil, err
34376 }
34377 req.Header = reqHeaders
34378 googleapi.Expand(req.URL, map[string]string{
34379 "profileId": strconv.FormatInt(c.profileId, 10),
34380 "reportId": strconv.FormatInt(c.reportId, 10),
34381 "fileId": strconv.FormatInt(c.fileId, 10),
34382 })
34383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34384 }
34385
34386
34387
34388
34389 func (c *ReportsFilesGetCall) Download(opts ...googleapi.CallOption) (*http.Response, error) {
34390 gensupport.SetOptions(c.urlParams_, opts...)
34391 res, err := c.doRequest("media")
34392 if err != nil {
34393 return nil, err
34394 }
34395 if err := googleapi.CheckResponse(res); err != nil {
34396 res.Body.Close()
34397 return nil, gensupport.WrapError(err)
34398 }
34399 return res, nil
34400 }
34401
34402
34403
34404
34405
34406
34407 func (c *ReportsFilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) {
34408 gensupport.SetOptions(c.urlParams_, opts...)
34409 res, err := c.doRequest("json")
34410 if res != nil && res.StatusCode == http.StatusNotModified {
34411 if res.Body != nil {
34412 res.Body.Close()
34413 }
34414 return nil, gensupport.WrapError(&googleapi.Error{
34415 Code: res.StatusCode,
34416 Header: res.Header,
34417 })
34418 }
34419 if err != nil {
34420 return nil, err
34421 }
34422 defer googleapi.CloseBody(res)
34423 if err := googleapi.CheckResponse(res); err != nil {
34424 return nil, gensupport.WrapError(err)
34425 }
34426 ret := &File{
34427 ServerResponse: googleapi.ServerResponse{
34428 Header: res.Header,
34429 HTTPStatusCode: res.StatusCode,
34430 },
34431 }
34432 target := &ret
34433 if err := gensupport.DecodeResponse(target, res); err != nil {
34434 return nil, err
34435 }
34436 return ret, nil
34437 }
34438
34439 type ReportsFilesListCall struct {
34440 s *Service
34441 profileId int64
34442 reportId int64
34443 urlParams_ gensupport.URLParams
34444 ifNoneMatch_ string
34445 ctx_ context.Context
34446 header_ http.Header
34447 }
34448
34449
34450
34451
34452
34453 func (r *ReportsFilesService) List(profileId int64, reportId int64) *ReportsFilesListCall {
34454 c := &ReportsFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34455 c.profileId = profileId
34456 c.reportId = reportId
34457 return c
34458 }
34459
34460
34461
34462 func (c *ReportsFilesListCall) MaxResults(maxResults int64) *ReportsFilesListCall {
34463 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34464 return c
34465 }
34466
34467
34468
34469 func (c *ReportsFilesListCall) PageToken(pageToken string) *ReportsFilesListCall {
34470 c.urlParams_.Set("pageToken", pageToken)
34471 return c
34472 }
34473
34474
34475
34476
34477
34478
34479
34480
34481 func (c *ReportsFilesListCall) SortField(sortField string) *ReportsFilesListCall {
34482 c.urlParams_.Set("sortField", sortField)
34483 return c
34484 }
34485
34486
34487
34488
34489
34490
34491
34492 func (c *ReportsFilesListCall) SortOrder(sortOrder string) *ReportsFilesListCall {
34493 c.urlParams_.Set("sortOrder", sortOrder)
34494 return c
34495 }
34496
34497
34498
34499
34500 func (c *ReportsFilesListCall) Fields(s ...googleapi.Field) *ReportsFilesListCall {
34501 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34502 return c
34503 }
34504
34505
34506
34507
34508 func (c *ReportsFilesListCall) IfNoneMatch(entityTag string) *ReportsFilesListCall {
34509 c.ifNoneMatch_ = entityTag
34510 return c
34511 }
34512
34513
34514 func (c *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
34515 c.ctx_ = ctx
34516 return c
34517 }
34518
34519
34520
34521 func (c *ReportsFilesListCall) Header() http.Header {
34522 if c.header_ == nil {
34523 c.header_ = make(http.Header)
34524 }
34525 return c.header_
34526 }
34527
34528 func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
34529 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34530 if c.ifNoneMatch_ != "" {
34531 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34532 }
34533 var body io.Reader = nil
34534 c.urlParams_.Set("alt", alt)
34535 c.urlParams_.Set("prettyPrint", "false")
34536 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}/reports/{reportId}/files")
34537 urls += "?" + c.urlParams_.Encode()
34538 req, err := http.NewRequest("GET", urls, body)
34539 if err != nil {
34540 return nil, err
34541 }
34542 req.Header = reqHeaders
34543 googleapi.Expand(req.URL, map[string]string{
34544 "profileId": strconv.FormatInt(c.profileId, 10),
34545 "reportId": strconv.FormatInt(c.reportId, 10),
34546 })
34547 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34548 }
34549
34550
34551
34552
34553
34554
34555 func (c *ReportsFilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) {
34556 gensupport.SetOptions(c.urlParams_, opts...)
34557 res, err := c.doRequest("json")
34558 if res != nil && res.StatusCode == http.StatusNotModified {
34559 if res.Body != nil {
34560 res.Body.Close()
34561 }
34562 return nil, gensupport.WrapError(&googleapi.Error{
34563 Code: res.StatusCode,
34564 Header: res.Header,
34565 })
34566 }
34567 if err != nil {
34568 return nil, err
34569 }
34570 defer googleapi.CloseBody(res)
34571 if err := googleapi.CheckResponse(res); err != nil {
34572 return nil, gensupport.WrapError(err)
34573 }
34574 ret := &FileList{
34575 ServerResponse: googleapi.ServerResponse{
34576 Header: res.Header,
34577 HTTPStatusCode: res.StatusCode,
34578 },
34579 }
34580 target := &ret
34581 if err := gensupport.DecodeResponse(target, res); err != nil {
34582 return nil, err
34583 }
34584 return ret, nil
34585 }
34586
34587
34588
34589
34590 func (c *ReportsFilesListCall) Pages(ctx context.Context, f func(*FileList) error) error {
34591 c.ctx_ = ctx
34592 defer c.PageToken(c.urlParams_.Get("pageToken"))
34593 for {
34594 x, err := c.Do()
34595 if err != nil {
34596 return err
34597 }
34598 if err := f(x); err != nil {
34599 return err
34600 }
34601 if x.NextPageToken == "" {
34602 return nil
34603 }
34604 c.PageToken(x.NextPageToken)
34605 }
34606 }
34607
34608 type SitesGetCall struct {
34609 s *Service
34610 profileId int64
34611 id int64
34612 urlParams_ gensupport.URLParams
34613 ifNoneMatch_ string
34614 ctx_ context.Context
34615 header_ http.Header
34616 }
34617
34618
34619
34620
34621
34622 func (r *SitesService) Get(profileId int64, id int64) *SitesGetCall {
34623 c := &SitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34624 c.profileId = profileId
34625 c.id = id
34626 return c
34627 }
34628
34629
34630
34631
34632 func (c *SitesGetCall) Fields(s ...googleapi.Field) *SitesGetCall {
34633 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34634 return c
34635 }
34636
34637
34638
34639
34640 func (c *SitesGetCall) IfNoneMatch(entityTag string) *SitesGetCall {
34641 c.ifNoneMatch_ = entityTag
34642 return c
34643 }
34644
34645
34646 func (c *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
34647 c.ctx_ = ctx
34648 return c
34649 }
34650
34651
34652
34653 func (c *SitesGetCall) Header() http.Header {
34654 if c.header_ == nil {
34655 c.header_ = make(http.Header)
34656 }
34657 return c.header_
34658 }
34659
34660 func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
34661 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
34662 if c.ifNoneMatch_ != "" {
34663 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34664 }
34665 var body io.Reader = nil
34666 c.urlParams_.Set("alt", alt)
34667 c.urlParams_.Set("prettyPrint", "false")
34668 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sites/{+id}")
34669 urls += "?" + c.urlParams_.Encode()
34670 req, err := http.NewRequest("GET", urls, body)
34671 if err != nil {
34672 return nil, err
34673 }
34674 req.Header = reqHeaders
34675 googleapi.Expand(req.URL, map[string]string{
34676 "profileId": strconv.FormatInt(c.profileId, 10),
34677 "id": strconv.FormatInt(c.id, 10),
34678 })
34679 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34680 }
34681
34682
34683
34684
34685
34686
34687 func (c *SitesGetCall) Do(opts ...googleapi.CallOption) (*Site, error) {
34688 gensupport.SetOptions(c.urlParams_, opts...)
34689 res, err := c.doRequest("json")
34690 if res != nil && res.StatusCode == http.StatusNotModified {
34691 if res.Body != nil {
34692 res.Body.Close()
34693 }
34694 return nil, gensupport.WrapError(&googleapi.Error{
34695 Code: res.StatusCode,
34696 Header: res.Header,
34697 })
34698 }
34699 if err != nil {
34700 return nil, err
34701 }
34702 defer googleapi.CloseBody(res)
34703 if err := googleapi.CheckResponse(res); err != nil {
34704 return nil, gensupport.WrapError(err)
34705 }
34706 ret := &Site{
34707 ServerResponse: googleapi.ServerResponse{
34708 Header: res.Header,
34709 HTTPStatusCode: res.StatusCode,
34710 },
34711 }
34712 target := &ret
34713 if err := gensupport.DecodeResponse(target, res); err != nil {
34714 return nil, err
34715 }
34716 return ret, nil
34717 }
34718
34719 type SitesInsertCall struct {
34720 s *Service
34721 profileId int64
34722 site *Site
34723 urlParams_ gensupport.URLParams
34724 ctx_ context.Context
34725 header_ http.Header
34726 }
34727
34728
34729
34730
34731 func (r *SitesService) Insert(profileId int64, site *Site) *SitesInsertCall {
34732 c := &SitesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34733 c.profileId = profileId
34734 c.site = site
34735 return c
34736 }
34737
34738
34739
34740
34741 func (c *SitesInsertCall) Fields(s ...googleapi.Field) *SitesInsertCall {
34742 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34743 return c
34744 }
34745
34746
34747 func (c *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
34748 c.ctx_ = ctx
34749 return c
34750 }
34751
34752
34753
34754 func (c *SitesInsertCall) Header() http.Header {
34755 if c.header_ == nil {
34756 c.header_ = make(http.Header)
34757 }
34758 return c.header_
34759 }
34760
34761 func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
34762 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
34763 var body io.Reader = nil
34764 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
34765 if err != nil {
34766 return nil, err
34767 }
34768 c.urlParams_.Set("alt", alt)
34769 c.urlParams_.Set("prettyPrint", "false")
34770 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sites")
34771 urls += "?" + c.urlParams_.Encode()
34772 req, err := http.NewRequest("POST", urls, body)
34773 if err != nil {
34774 return nil, err
34775 }
34776 req.Header = reqHeaders
34777 googleapi.Expand(req.URL, map[string]string{
34778 "profileId": strconv.FormatInt(c.profileId, 10),
34779 })
34780 return gensupport.SendRequest(c.ctx_, c.s.client, req)
34781 }
34782
34783
34784
34785
34786
34787
34788 func (c *SitesInsertCall) Do(opts ...googleapi.CallOption) (*Site, error) {
34789 gensupport.SetOptions(c.urlParams_, opts...)
34790 res, err := c.doRequest("json")
34791 if res != nil && res.StatusCode == http.StatusNotModified {
34792 if res.Body != nil {
34793 res.Body.Close()
34794 }
34795 return nil, gensupport.WrapError(&googleapi.Error{
34796 Code: res.StatusCode,
34797 Header: res.Header,
34798 })
34799 }
34800 if err != nil {
34801 return nil, err
34802 }
34803 defer googleapi.CloseBody(res)
34804 if err := googleapi.CheckResponse(res); err != nil {
34805 return nil, gensupport.WrapError(err)
34806 }
34807 ret := &Site{
34808 ServerResponse: googleapi.ServerResponse{
34809 Header: res.Header,
34810 HTTPStatusCode: res.StatusCode,
34811 },
34812 }
34813 target := &ret
34814 if err := gensupport.DecodeResponse(target, res); err != nil {
34815 return nil, err
34816 }
34817 return ret, nil
34818 }
34819
34820 type SitesListCall struct {
34821 s *Service
34822 profileId int64
34823 urlParams_ gensupport.URLParams
34824 ifNoneMatch_ string
34825 ctx_ context.Context
34826 header_ http.Header
34827 }
34828
34829
34830
34831
34832
34833 func (r *SitesService) List(profileId int64) *SitesListCall {
34834 c := &SitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34835 c.profileId = profileId
34836 return c
34837 }
34838
34839
34840
34841
34842 func (c *SitesListCall) AcceptsInStreamVideoPlacements(acceptsInStreamVideoPlacements bool) *SitesListCall {
34843 c.urlParams_.Set("acceptsInStreamVideoPlacements", fmt.Sprint(acceptsInStreamVideoPlacements))
34844 return c
34845 }
34846
34847
34848
34849
34850 func (c *SitesListCall) AcceptsInterstitialPlacements(acceptsInterstitialPlacements bool) *SitesListCall {
34851 c.urlParams_.Set("acceptsInterstitialPlacements", fmt.Sprint(acceptsInterstitialPlacements))
34852 return c
34853 }
34854
34855
34856
34857
34858 func (c *SitesListCall) AcceptsPublisherPaidPlacements(acceptsPublisherPaidPlacements bool) *SitesListCall {
34859 c.urlParams_.Set("acceptsPublisherPaidPlacements", fmt.Sprint(acceptsPublisherPaidPlacements))
34860 return c
34861 }
34862
34863
34864
34865 func (c *SitesListCall) AdWordsSite(adWordsSite bool) *SitesListCall {
34866 c.urlParams_.Set("adWordsSite", fmt.Sprint(adWordsSite))
34867 return c
34868 }
34869
34870
34871 func (c *SitesListCall) Approved(approved bool) *SitesListCall {
34872 c.urlParams_.Set("approved", fmt.Sprint(approved))
34873 return c
34874 }
34875
34876
34877
34878 func (c *SitesListCall) CampaignIds(campaignIds ...int64) *SitesListCall {
34879 var campaignIds_ []string
34880 for _, v := range campaignIds {
34881 campaignIds_ = append(campaignIds_, fmt.Sprint(v))
34882 }
34883 c.urlParams_.SetMulti("campaignIds", campaignIds_)
34884 return c
34885 }
34886
34887
34888
34889 func (c *SitesListCall) DirectorySiteIds(directorySiteIds ...int64) *SitesListCall {
34890 var directorySiteIds_ []string
34891 for _, v := range directorySiteIds {
34892 directorySiteIds_ = append(directorySiteIds_, fmt.Sprint(v))
34893 }
34894 c.urlParams_.SetMulti("directorySiteIds", directorySiteIds_)
34895 return c
34896 }
34897
34898
34899 func (c *SitesListCall) Ids(ids ...int64) *SitesListCall {
34900 var ids_ []string
34901 for _, v := range ids {
34902 ids_ = append(ids_, fmt.Sprint(v))
34903 }
34904 c.urlParams_.SetMulti("ids", ids_)
34905 return c
34906 }
34907
34908
34909
34910 func (c *SitesListCall) MaxResults(maxResults int64) *SitesListCall {
34911 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34912 return c
34913 }
34914
34915
34916
34917 func (c *SitesListCall) PageToken(pageToken string) *SitesListCall {
34918 c.urlParams_.Set("pageToken", pageToken)
34919 return c
34920 }
34921
34922
34923
34924
34925
34926
34927
34928
34929 func (c *SitesListCall) SearchString(searchString string) *SitesListCall {
34930 c.urlParams_.Set("searchString", searchString)
34931 return c
34932 }
34933
34934
34935
34936
34937
34938
34939
34940
34941 func (c *SitesListCall) SortField(sortField string) *SitesListCall {
34942 c.urlParams_.Set("sortField", sortField)
34943 return c
34944 }
34945
34946
34947
34948
34949
34950
34951
34952 func (c *SitesListCall) SortOrder(sortOrder string) *SitesListCall {
34953 c.urlParams_.Set("sortOrder", sortOrder)
34954 return c
34955 }
34956
34957
34958
34959 func (c *SitesListCall) SubaccountId(subaccountId int64) *SitesListCall {
34960 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
34961 return c
34962 }
34963
34964
34965
34966 func (c *SitesListCall) UnmappedSite(unmappedSite bool) *SitesListCall {
34967 c.urlParams_.Set("unmappedSite", fmt.Sprint(unmappedSite))
34968 return c
34969 }
34970
34971
34972
34973
34974 func (c *SitesListCall) Fields(s ...googleapi.Field) *SitesListCall {
34975 c.urlParams_.Set("fields", googleapi.CombineFields(s))
34976 return c
34977 }
34978
34979
34980
34981
34982 func (c *SitesListCall) IfNoneMatch(entityTag string) *SitesListCall {
34983 c.ifNoneMatch_ = entityTag
34984 return c
34985 }
34986
34987
34988 func (c *SitesListCall) Context(ctx context.Context) *SitesListCall {
34989 c.ctx_ = ctx
34990 return c
34991 }
34992
34993
34994
34995 func (c *SitesListCall) Header() http.Header {
34996 if c.header_ == nil {
34997 c.header_ = make(http.Header)
34998 }
34999 return c.header_
35000 }
35001
35002 func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
35003 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35004 if c.ifNoneMatch_ != "" {
35005 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35006 }
35007 var body io.Reader = nil
35008 c.urlParams_.Set("alt", alt)
35009 c.urlParams_.Set("prettyPrint", "false")
35010 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sites")
35011 urls += "?" + c.urlParams_.Encode()
35012 req, err := http.NewRequest("GET", urls, body)
35013 if err != nil {
35014 return nil, err
35015 }
35016 req.Header = reqHeaders
35017 googleapi.Expand(req.URL, map[string]string{
35018 "profileId": strconv.FormatInt(c.profileId, 10),
35019 })
35020 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35021 }
35022
35023
35024
35025
35026
35027
35028
35029 func (c *SitesListCall) Do(opts ...googleapi.CallOption) (*SitesListResponse, error) {
35030 gensupport.SetOptions(c.urlParams_, opts...)
35031 res, err := c.doRequest("json")
35032 if res != nil && res.StatusCode == http.StatusNotModified {
35033 if res.Body != nil {
35034 res.Body.Close()
35035 }
35036 return nil, gensupport.WrapError(&googleapi.Error{
35037 Code: res.StatusCode,
35038 Header: res.Header,
35039 })
35040 }
35041 if err != nil {
35042 return nil, err
35043 }
35044 defer googleapi.CloseBody(res)
35045 if err := googleapi.CheckResponse(res); err != nil {
35046 return nil, gensupport.WrapError(err)
35047 }
35048 ret := &SitesListResponse{
35049 ServerResponse: googleapi.ServerResponse{
35050 Header: res.Header,
35051 HTTPStatusCode: res.StatusCode,
35052 },
35053 }
35054 target := &ret
35055 if err := gensupport.DecodeResponse(target, res); err != nil {
35056 return nil, err
35057 }
35058 return ret, nil
35059 }
35060
35061
35062
35063
35064 func (c *SitesListCall) Pages(ctx context.Context, f func(*SitesListResponse) error) error {
35065 c.ctx_ = ctx
35066 defer c.PageToken(c.urlParams_.Get("pageToken"))
35067 for {
35068 x, err := c.Do()
35069 if err != nil {
35070 return err
35071 }
35072 if err := f(x); err != nil {
35073 return err
35074 }
35075 if x.NextPageToken == "" {
35076 return nil
35077 }
35078 c.PageToken(x.NextPageToken)
35079 }
35080 }
35081
35082 type SitesPatchCall struct {
35083 s *Service
35084 profileId int64
35085 site *Site
35086 urlParams_ gensupport.URLParams
35087 ctx_ context.Context
35088 header_ http.Header
35089 }
35090
35091
35092
35093
35094
35095 func (r *SitesService) Patch(profileId int64, id int64, site *Site) *SitesPatchCall {
35096 c := &SitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35097 c.profileId = profileId
35098 c.urlParams_.Set("id", fmt.Sprint(id))
35099 c.site = site
35100 return c
35101 }
35102
35103
35104
35105
35106 func (c *SitesPatchCall) Fields(s ...googleapi.Field) *SitesPatchCall {
35107 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35108 return c
35109 }
35110
35111
35112 func (c *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
35113 c.ctx_ = ctx
35114 return c
35115 }
35116
35117
35118
35119 func (c *SitesPatchCall) Header() http.Header {
35120 if c.header_ == nil {
35121 c.header_ = make(http.Header)
35122 }
35123 return c.header_
35124 }
35125
35126 func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
35127 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35128 var body io.Reader = nil
35129 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
35130 if err != nil {
35131 return nil, err
35132 }
35133 c.urlParams_.Set("alt", alt)
35134 c.urlParams_.Set("prettyPrint", "false")
35135 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sites")
35136 urls += "?" + c.urlParams_.Encode()
35137 req, err := http.NewRequest("PATCH", urls, body)
35138 if err != nil {
35139 return nil, err
35140 }
35141 req.Header = reqHeaders
35142 googleapi.Expand(req.URL, map[string]string{
35143 "profileId": strconv.FormatInt(c.profileId, 10),
35144 })
35145 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35146 }
35147
35148
35149
35150
35151
35152
35153 func (c *SitesPatchCall) Do(opts ...googleapi.CallOption) (*Site, error) {
35154 gensupport.SetOptions(c.urlParams_, opts...)
35155 res, err := c.doRequest("json")
35156 if res != nil && res.StatusCode == http.StatusNotModified {
35157 if res.Body != nil {
35158 res.Body.Close()
35159 }
35160 return nil, gensupport.WrapError(&googleapi.Error{
35161 Code: res.StatusCode,
35162 Header: res.Header,
35163 })
35164 }
35165 if err != nil {
35166 return nil, err
35167 }
35168 defer googleapi.CloseBody(res)
35169 if err := googleapi.CheckResponse(res); err != nil {
35170 return nil, gensupport.WrapError(err)
35171 }
35172 ret := &Site{
35173 ServerResponse: googleapi.ServerResponse{
35174 Header: res.Header,
35175 HTTPStatusCode: res.StatusCode,
35176 },
35177 }
35178 target := &ret
35179 if err := gensupport.DecodeResponse(target, res); err != nil {
35180 return nil, err
35181 }
35182 return ret, nil
35183 }
35184
35185 type SitesUpdateCall struct {
35186 s *Service
35187 profileId int64
35188 site *Site
35189 urlParams_ gensupport.URLParams
35190 ctx_ context.Context
35191 header_ http.Header
35192 }
35193
35194
35195
35196
35197 func (r *SitesService) Update(profileId int64, site *Site) *SitesUpdateCall {
35198 c := &SitesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35199 c.profileId = profileId
35200 c.site = site
35201 return c
35202 }
35203
35204
35205
35206
35207 func (c *SitesUpdateCall) Fields(s ...googleapi.Field) *SitesUpdateCall {
35208 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35209 return c
35210 }
35211
35212
35213 func (c *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
35214 c.ctx_ = ctx
35215 return c
35216 }
35217
35218
35219
35220 func (c *SitesUpdateCall) Header() http.Header {
35221 if c.header_ == nil {
35222 c.header_ = make(http.Header)
35223 }
35224 return c.header_
35225 }
35226
35227 func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
35228 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35229 var body io.Reader = nil
35230 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
35231 if err != nil {
35232 return nil, err
35233 }
35234 c.urlParams_.Set("alt", alt)
35235 c.urlParams_.Set("prettyPrint", "false")
35236 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sites")
35237 urls += "?" + c.urlParams_.Encode()
35238 req, err := http.NewRequest("PUT", urls, body)
35239 if err != nil {
35240 return nil, err
35241 }
35242 req.Header = reqHeaders
35243 googleapi.Expand(req.URL, map[string]string{
35244 "profileId": strconv.FormatInt(c.profileId, 10),
35245 })
35246 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35247 }
35248
35249
35250
35251
35252
35253
35254 func (c *SitesUpdateCall) Do(opts ...googleapi.CallOption) (*Site, error) {
35255 gensupport.SetOptions(c.urlParams_, opts...)
35256 res, err := c.doRequest("json")
35257 if res != nil && res.StatusCode == http.StatusNotModified {
35258 if res.Body != nil {
35259 res.Body.Close()
35260 }
35261 return nil, gensupport.WrapError(&googleapi.Error{
35262 Code: res.StatusCode,
35263 Header: res.Header,
35264 })
35265 }
35266 if err != nil {
35267 return nil, err
35268 }
35269 defer googleapi.CloseBody(res)
35270 if err := googleapi.CheckResponse(res); err != nil {
35271 return nil, gensupport.WrapError(err)
35272 }
35273 ret := &Site{
35274 ServerResponse: googleapi.ServerResponse{
35275 Header: res.Header,
35276 HTTPStatusCode: res.StatusCode,
35277 },
35278 }
35279 target := &ret
35280 if err := gensupport.DecodeResponse(target, res); err != nil {
35281 return nil, err
35282 }
35283 return ret, nil
35284 }
35285
35286 type SizesGetCall struct {
35287 s *Service
35288 profileId int64
35289 id int64
35290 urlParams_ gensupport.URLParams
35291 ifNoneMatch_ string
35292 ctx_ context.Context
35293 header_ http.Header
35294 }
35295
35296
35297
35298
35299
35300 func (r *SizesService) Get(profileId int64, id int64) *SizesGetCall {
35301 c := &SizesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35302 c.profileId = profileId
35303 c.id = id
35304 return c
35305 }
35306
35307
35308
35309
35310 func (c *SizesGetCall) Fields(s ...googleapi.Field) *SizesGetCall {
35311 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35312 return c
35313 }
35314
35315
35316
35317
35318 func (c *SizesGetCall) IfNoneMatch(entityTag string) *SizesGetCall {
35319 c.ifNoneMatch_ = entityTag
35320 return c
35321 }
35322
35323
35324 func (c *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
35325 c.ctx_ = ctx
35326 return c
35327 }
35328
35329
35330
35331 func (c *SizesGetCall) Header() http.Header {
35332 if c.header_ == nil {
35333 c.header_ = make(http.Header)
35334 }
35335 return c.header_
35336 }
35337
35338 func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
35339 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35340 if c.ifNoneMatch_ != "" {
35341 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35342 }
35343 var body io.Reader = nil
35344 c.urlParams_.Set("alt", alt)
35345 c.urlParams_.Set("prettyPrint", "false")
35346 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sizes/{+id}")
35347 urls += "?" + c.urlParams_.Encode()
35348 req, err := http.NewRequest("GET", urls, body)
35349 if err != nil {
35350 return nil, err
35351 }
35352 req.Header = reqHeaders
35353 googleapi.Expand(req.URL, map[string]string{
35354 "profileId": strconv.FormatInt(c.profileId, 10),
35355 "id": strconv.FormatInt(c.id, 10),
35356 })
35357 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35358 }
35359
35360
35361
35362
35363
35364
35365 func (c *SizesGetCall) Do(opts ...googleapi.CallOption) (*Size, error) {
35366 gensupport.SetOptions(c.urlParams_, opts...)
35367 res, err := c.doRequest("json")
35368 if res != nil && res.StatusCode == http.StatusNotModified {
35369 if res.Body != nil {
35370 res.Body.Close()
35371 }
35372 return nil, gensupport.WrapError(&googleapi.Error{
35373 Code: res.StatusCode,
35374 Header: res.Header,
35375 })
35376 }
35377 if err != nil {
35378 return nil, err
35379 }
35380 defer googleapi.CloseBody(res)
35381 if err := googleapi.CheckResponse(res); err != nil {
35382 return nil, gensupport.WrapError(err)
35383 }
35384 ret := &Size{
35385 ServerResponse: googleapi.ServerResponse{
35386 Header: res.Header,
35387 HTTPStatusCode: res.StatusCode,
35388 },
35389 }
35390 target := &ret
35391 if err := gensupport.DecodeResponse(target, res); err != nil {
35392 return nil, err
35393 }
35394 return ret, nil
35395 }
35396
35397 type SizesInsertCall struct {
35398 s *Service
35399 profileId int64
35400 size *Size
35401 urlParams_ gensupport.URLParams
35402 ctx_ context.Context
35403 header_ http.Header
35404 }
35405
35406
35407
35408
35409 func (r *SizesService) Insert(profileId int64, size *Size) *SizesInsertCall {
35410 c := &SizesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35411 c.profileId = profileId
35412 c.size = size
35413 return c
35414 }
35415
35416
35417
35418
35419 func (c *SizesInsertCall) Fields(s ...googleapi.Field) *SizesInsertCall {
35420 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35421 return c
35422 }
35423
35424
35425 func (c *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
35426 c.ctx_ = ctx
35427 return c
35428 }
35429
35430
35431
35432 func (c *SizesInsertCall) Header() http.Header {
35433 if c.header_ == nil {
35434 c.header_ = make(http.Header)
35435 }
35436 return c.header_
35437 }
35438
35439 func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
35440 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35441 var body io.Reader = nil
35442 body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
35443 if err != nil {
35444 return nil, err
35445 }
35446 c.urlParams_.Set("alt", alt)
35447 c.urlParams_.Set("prettyPrint", "false")
35448 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sizes")
35449 urls += "?" + c.urlParams_.Encode()
35450 req, err := http.NewRequest("POST", urls, body)
35451 if err != nil {
35452 return nil, err
35453 }
35454 req.Header = reqHeaders
35455 googleapi.Expand(req.URL, map[string]string{
35456 "profileId": strconv.FormatInt(c.profileId, 10),
35457 })
35458 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35459 }
35460
35461
35462
35463
35464
35465
35466 func (c *SizesInsertCall) Do(opts ...googleapi.CallOption) (*Size, error) {
35467 gensupport.SetOptions(c.urlParams_, opts...)
35468 res, err := c.doRequest("json")
35469 if res != nil && res.StatusCode == http.StatusNotModified {
35470 if res.Body != nil {
35471 res.Body.Close()
35472 }
35473 return nil, gensupport.WrapError(&googleapi.Error{
35474 Code: res.StatusCode,
35475 Header: res.Header,
35476 })
35477 }
35478 if err != nil {
35479 return nil, err
35480 }
35481 defer googleapi.CloseBody(res)
35482 if err := googleapi.CheckResponse(res); err != nil {
35483 return nil, gensupport.WrapError(err)
35484 }
35485 ret := &Size{
35486 ServerResponse: googleapi.ServerResponse{
35487 Header: res.Header,
35488 HTTPStatusCode: res.StatusCode,
35489 },
35490 }
35491 target := &ret
35492 if err := gensupport.DecodeResponse(target, res); err != nil {
35493 return nil, err
35494 }
35495 return ret, nil
35496 }
35497
35498 type SizesListCall struct {
35499 s *Service
35500 profileId int64
35501 urlParams_ gensupport.URLParams
35502 ifNoneMatch_ string
35503 ctx_ context.Context
35504 header_ http.Header
35505 }
35506
35507
35508
35509
35510
35511
35512
35513 func (r *SizesService) List(profileId int64) *SizesListCall {
35514 c := &SizesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35515 c.profileId = profileId
35516 return c
35517 }
35518
35519
35520
35521 func (c *SizesListCall) Height(height int64) *SizesListCall {
35522 c.urlParams_.Set("height", fmt.Sprint(height))
35523 return c
35524 }
35525
35526
35527
35528 func (c *SizesListCall) IabStandard(iabStandard bool) *SizesListCall {
35529 c.urlParams_.Set("iabStandard", fmt.Sprint(iabStandard))
35530 return c
35531 }
35532
35533
35534 func (c *SizesListCall) Ids(ids ...int64) *SizesListCall {
35535 var ids_ []string
35536 for _, v := range ids {
35537 ids_ = append(ids_, fmt.Sprint(v))
35538 }
35539 c.urlParams_.SetMulti("ids", ids_)
35540 return c
35541 }
35542
35543
35544
35545 func (c *SizesListCall) Width(width int64) *SizesListCall {
35546 c.urlParams_.Set("width", fmt.Sprint(width))
35547 return c
35548 }
35549
35550
35551
35552
35553 func (c *SizesListCall) Fields(s ...googleapi.Field) *SizesListCall {
35554 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35555 return c
35556 }
35557
35558
35559
35560
35561 func (c *SizesListCall) IfNoneMatch(entityTag string) *SizesListCall {
35562 c.ifNoneMatch_ = entityTag
35563 return c
35564 }
35565
35566
35567 func (c *SizesListCall) Context(ctx context.Context) *SizesListCall {
35568 c.ctx_ = ctx
35569 return c
35570 }
35571
35572
35573
35574 func (c *SizesListCall) Header() http.Header {
35575 if c.header_ == nil {
35576 c.header_ = make(http.Header)
35577 }
35578 return c.header_
35579 }
35580
35581 func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
35582 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35583 if c.ifNoneMatch_ != "" {
35584 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35585 }
35586 var body io.Reader = nil
35587 c.urlParams_.Set("alt", alt)
35588 c.urlParams_.Set("prettyPrint", "false")
35589 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/sizes")
35590 urls += "?" + c.urlParams_.Encode()
35591 req, err := http.NewRequest("GET", urls, body)
35592 if err != nil {
35593 return nil, err
35594 }
35595 req.Header = reqHeaders
35596 googleapi.Expand(req.URL, map[string]string{
35597 "profileId": strconv.FormatInt(c.profileId, 10),
35598 })
35599 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35600 }
35601
35602
35603
35604
35605
35606
35607
35608 func (c *SizesListCall) Do(opts ...googleapi.CallOption) (*SizesListResponse, error) {
35609 gensupport.SetOptions(c.urlParams_, opts...)
35610 res, err := c.doRequest("json")
35611 if res != nil && res.StatusCode == http.StatusNotModified {
35612 if res.Body != nil {
35613 res.Body.Close()
35614 }
35615 return nil, gensupport.WrapError(&googleapi.Error{
35616 Code: res.StatusCode,
35617 Header: res.Header,
35618 })
35619 }
35620 if err != nil {
35621 return nil, err
35622 }
35623 defer googleapi.CloseBody(res)
35624 if err := googleapi.CheckResponse(res); err != nil {
35625 return nil, gensupport.WrapError(err)
35626 }
35627 ret := &SizesListResponse{
35628 ServerResponse: googleapi.ServerResponse{
35629 Header: res.Header,
35630 HTTPStatusCode: res.StatusCode,
35631 },
35632 }
35633 target := &ret
35634 if err := gensupport.DecodeResponse(target, res); err != nil {
35635 return nil, err
35636 }
35637 return ret, nil
35638 }
35639
35640 type SubaccountsGetCall struct {
35641 s *Service
35642 profileId int64
35643 id int64
35644 urlParams_ gensupport.URLParams
35645 ifNoneMatch_ string
35646 ctx_ context.Context
35647 header_ http.Header
35648 }
35649
35650
35651
35652
35653
35654 func (r *SubaccountsService) Get(profileId int64, id int64) *SubaccountsGetCall {
35655 c := &SubaccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35656 c.profileId = profileId
35657 c.id = id
35658 return c
35659 }
35660
35661
35662
35663
35664 func (c *SubaccountsGetCall) Fields(s ...googleapi.Field) *SubaccountsGetCall {
35665 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35666 return c
35667 }
35668
35669
35670
35671
35672 func (c *SubaccountsGetCall) IfNoneMatch(entityTag string) *SubaccountsGetCall {
35673 c.ifNoneMatch_ = entityTag
35674 return c
35675 }
35676
35677
35678 func (c *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
35679 c.ctx_ = ctx
35680 return c
35681 }
35682
35683
35684
35685 func (c *SubaccountsGetCall) Header() http.Header {
35686 if c.header_ == nil {
35687 c.header_ = make(http.Header)
35688 }
35689 return c.header_
35690 }
35691
35692 func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
35693 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35694 if c.ifNoneMatch_ != "" {
35695 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35696 }
35697 var body io.Reader = nil
35698 c.urlParams_.Set("alt", alt)
35699 c.urlParams_.Set("prettyPrint", "false")
35700 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/subaccounts/{+id}")
35701 urls += "?" + c.urlParams_.Encode()
35702 req, err := http.NewRequest("GET", urls, body)
35703 if err != nil {
35704 return nil, err
35705 }
35706 req.Header = reqHeaders
35707 googleapi.Expand(req.URL, map[string]string{
35708 "profileId": strconv.FormatInt(c.profileId, 10),
35709 "id": strconv.FormatInt(c.id, 10),
35710 })
35711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35712 }
35713
35714
35715
35716
35717
35718
35719 func (c *SubaccountsGetCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
35720 gensupport.SetOptions(c.urlParams_, opts...)
35721 res, err := c.doRequest("json")
35722 if res != nil && res.StatusCode == http.StatusNotModified {
35723 if res.Body != nil {
35724 res.Body.Close()
35725 }
35726 return nil, gensupport.WrapError(&googleapi.Error{
35727 Code: res.StatusCode,
35728 Header: res.Header,
35729 })
35730 }
35731 if err != nil {
35732 return nil, err
35733 }
35734 defer googleapi.CloseBody(res)
35735 if err := googleapi.CheckResponse(res); err != nil {
35736 return nil, gensupport.WrapError(err)
35737 }
35738 ret := &Subaccount{
35739 ServerResponse: googleapi.ServerResponse{
35740 Header: res.Header,
35741 HTTPStatusCode: res.StatusCode,
35742 },
35743 }
35744 target := &ret
35745 if err := gensupport.DecodeResponse(target, res); err != nil {
35746 return nil, err
35747 }
35748 return ret, nil
35749 }
35750
35751 type SubaccountsInsertCall struct {
35752 s *Service
35753 profileId int64
35754 subaccount *Subaccount
35755 urlParams_ gensupport.URLParams
35756 ctx_ context.Context
35757 header_ http.Header
35758 }
35759
35760
35761
35762
35763 func (r *SubaccountsService) Insert(profileId int64, subaccount *Subaccount) *SubaccountsInsertCall {
35764 c := &SubaccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35765 c.profileId = profileId
35766 c.subaccount = subaccount
35767 return c
35768 }
35769
35770
35771
35772
35773 func (c *SubaccountsInsertCall) Fields(s ...googleapi.Field) *SubaccountsInsertCall {
35774 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35775 return c
35776 }
35777
35778
35779 func (c *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
35780 c.ctx_ = ctx
35781 return c
35782 }
35783
35784
35785
35786 func (c *SubaccountsInsertCall) Header() http.Header {
35787 if c.header_ == nil {
35788 c.header_ = make(http.Header)
35789 }
35790 return c.header_
35791 }
35792
35793 func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
35794 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
35795 var body io.Reader = nil
35796 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
35797 if err != nil {
35798 return nil, err
35799 }
35800 c.urlParams_.Set("alt", alt)
35801 c.urlParams_.Set("prettyPrint", "false")
35802 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/subaccounts")
35803 urls += "?" + c.urlParams_.Encode()
35804 req, err := http.NewRequest("POST", urls, body)
35805 if err != nil {
35806 return nil, err
35807 }
35808 req.Header = reqHeaders
35809 googleapi.Expand(req.URL, map[string]string{
35810 "profileId": strconv.FormatInt(c.profileId, 10),
35811 })
35812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35813 }
35814
35815
35816
35817
35818
35819
35820 func (c *SubaccountsInsertCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
35821 gensupport.SetOptions(c.urlParams_, opts...)
35822 res, err := c.doRequest("json")
35823 if res != nil && res.StatusCode == http.StatusNotModified {
35824 if res.Body != nil {
35825 res.Body.Close()
35826 }
35827 return nil, gensupport.WrapError(&googleapi.Error{
35828 Code: res.StatusCode,
35829 Header: res.Header,
35830 })
35831 }
35832 if err != nil {
35833 return nil, err
35834 }
35835 defer googleapi.CloseBody(res)
35836 if err := googleapi.CheckResponse(res); err != nil {
35837 return nil, gensupport.WrapError(err)
35838 }
35839 ret := &Subaccount{
35840 ServerResponse: googleapi.ServerResponse{
35841 Header: res.Header,
35842 HTTPStatusCode: res.StatusCode,
35843 },
35844 }
35845 target := &ret
35846 if err := gensupport.DecodeResponse(target, res); err != nil {
35847 return nil, err
35848 }
35849 return ret, nil
35850 }
35851
35852 type SubaccountsListCall struct {
35853 s *Service
35854 profileId int64
35855 urlParams_ gensupport.URLParams
35856 ifNoneMatch_ string
35857 ctx_ context.Context
35858 header_ http.Header
35859 }
35860
35861
35862
35863
35864
35865 func (r *SubaccountsService) List(profileId int64) *SubaccountsListCall {
35866 c := &SubaccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35867 c.profileId = profileId
35868 return c
35869 }
35870
35871
35872
35873 func (c *SubaccountsListCall) Ids(ids ...int64) *SubaccountsListCall {
35874 var ids_ []string
35875 for _, v := range ids {
35876 ids_ = append(ids_, fmt.Sprint(v))
35877 }
35878 c.urlParams_.SetMulti("ids", ids_)
35879 return c
35880 }
35881
35882
35883
35884 func (c *SubaccountsListCall) MaxResults(maxResults int64) *SubaccountsListCall {
35885 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35886 return c
35887 }
35888
35889
35890
35891 func (c *SubaccountsListCall) PageToken(pageToken string) *SubaccountsListCall {
35892 c.urlParams_.Set("pageToken", pageToken)
35893 return c
35894 }
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904 func (c *SubaccountsListCall) SearchString(searchString string) *SubaccountsListCall {
35905 c.urlParams_.Set("searchString", searchString)
35906 return c
35907 }
35908
35909
35910
35911
35912
35913
35914
35915
35916 func (c *SubaccountsListCall) SortField(sortField string) *SubaccountsListCall {
35917 c.urlParams_.Set("sortField", sortField)
35918 return c
35919 }
35920
35921
35922
35923
35924
35925
35926
35927 func (c *SubaccountsListCall) SortOrder(sortOrder string) *SubaccountsListCall {
35928 c.urlParams_.Set("sortOrder", sortOrder)
35929 return c
35930 }
35931
35932
35933
35934
35935 func (c *SubaccountsListCall) Fields(s ...googleapi.Field) *SubaccountsListCall {
35936 c.urlParams_.Set("fields", googleapi.CombineFields(s))
35937 return c
35938 }
35939
35940
35941
35942
35943 func (c *SubaccountsListCall) IfNoneMatch(entityTag string) *SubaccountsListCall {
35944 c.ifNoneMatch_ = entityTag
35945 return c
35946 }
35947
35948
35949 func (c *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
35950 c.ctx_ = ctx
35951 return c
35952 }
35953
35954
35955
35956 func (c *SubaccountsListCall) Header() http.Header {
35957 if c.header_ == nil {
35958 c.header_ = make(http.Header)
35959 }
35960 return c.header_
35961 }
35962
35963 func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
35964 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
35965 if c.ifNoneMatch_ != "" {
35966 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35967 }
35968 var body io.Reader = nil
35969 c.urlParams_.Set("alt", alt)
35970 c.urlParams_.Set("prettyPrint", "false")
35971 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/subaccounts")
35972 urls += "?" + c.urlParams_.Encode()
35973 req, err := http.NewRequest("GET", urls, body)
35974 if err != nil {
35975 return nil, err
35976 }
35977 req.Header = reqHeaders
35978 googleapi.Expand(req.URL, map[string]string{
35979 "profileId": strconv.FormatInt(c.profileId, 10),
35980 })
35981 return gensupport.SendRequest(c.ctx_, c.s.client, req)
35982 }
35983
35984
35985
35986
35987
35988
35989
35990 func (c *SubaccountsListCall) Do(opts ...googleapi.CallOption) (*SubaccountsListResponse, error) {
35991 gensupport.SetOptions(c.urlParams_, opts...)
35992 res, err := c.doRequest("json")
35993 if res != nil && res.StatusCode == http.StatusNotModified {
35994 if res.Body != nil {
35995 res.Body.Close()
35996 }
35997 return nil, gensupport.WrapError(&googleapi.Error{
35998 Code: res.StatusCode,
35999 Header: res.Header,
36000 })
36001 }
36002 if err != nil {
36003 return nil, err
36004 }
36005 defer googleapi.CloseBody(res)
36006 if err := googleapi.CheckResponse(res); err != nil {
36007 return nil, gensupport.WrapError(err)
36008 }
36009 ret := &SubaccountsListResponse{
36010 ServerResponse: googleapi.ServerResponse{
36011 Header: res.Header,
36012 HTTPStatusCode: res.StatusCode,
36013 },
36014 }
36015 target := &ret
36016 if err := gensupport.DecodeResponse(target, res); err != nil {
36017 return nil, err
36018 }
36019 return ret, nil
36020 }
36021
36022
36023
36024
36025 func (c *SubaccountsListCall) Pages(ctx context.Context, f func(*SubaccountsListResponse) error) error {
36026 c.ctx_ = ctx
36027 defer c.PageToken(c.urlParams_.Get("pageToken"))
36028 for {
36029 x, err := c.Do()
36030 if err != nil {
36031 return err
36032 }
36033 if err := f(x); err != nil {
36034 return err
36035 }
36036 if x.NextPageToken == "" {
36037 return nil
36038 }
36039 c.PageToken(x.NextPageToken)
36040 }
36041 }
36042
36043 type SubaccountsPatchCall struct {
36044 s *Service
36045 profileId int64
36046 subaccount *Subaccount
36047 urlParams_ gensupport.URLParams
36048 ctx_ context.Context
36049 header_ http.Header
36050 }
36051
36052
36053
36054
36055
36056 func (r *SubaccountsService) Patch(profileId int64, id int64, subaccount *Subaccount) *SubaccountsPatchCall {
36057 c := &SubaccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36058 c.profileId = profileId
36059 c.urlParams_.Set("id", fmt.Sprint(id))
36060 c.subaccount = subaccount
36061 return c
36062 }
36063
36064
36065
36066
36067 func (c *SubaccountsPatchCall) Fields(s ...googleapi.Field) *SubaccountsPatchCall {
36068 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36069 return c
36070 }
36071
36072
36073 func (c *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
36074 c.ctx_ = ctx
36075 return c
36076 }
36077
36078
36079
36080 func (c *SubaccountsPatchCall) Header() http.Header {
36081 if c.header_ == nil {
36082 c.header_ = make(http.Header)
36083 }
36084 return c.header_
36085 }
36086
36087 func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
36088 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36089 var body io.Reader = nil
36090 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
36091 if err != nil {
36092 return nil, err
36093 }
36094 c.urlParams_.Set("alt", alt)
36095 c.urlParams_.Set("prettyPrint", "false")
36096 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/subaccounts")
36097 urls += "?" + c.urlParams_.Encode()
36098 req, err := http.NewRequest("PATCH", urls, body)
36099 if err != nil {
36100 return nil, err
36101 }
36102 req.Header = reqHeaders
36103 googleapi.Expand(req.URL, map[string]string{
36104 "profileId": strconv.FormatInt(c.profileId, 10),
36105 })
36106 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36107 }
36108
36109
36110
36111
36112
36113
36114 func (c *SubaccountsPatchCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
36115 gensupport.SetOptions(c.urlParams_, opts...)
36116 res, err := c.doRequest("json")
36117 if res != nil && res.StatusCode == http.StatusNotModified {
36118 if res.Body != nil {
36119 res.Body.Close()
36120 }
36121 return nil, gensupport.WrapError(&googleapi.Error{
36122 Code: res.StatusCode,
36123 Header: res.Header,
36124 })
36125 }
36126 if err != nil {
36127 return nil, err
36128 }
36129 defer googleapi.CloseBody(res)
36130 if err := googleapi.CheckResponse(res); err != nil {
36131 return nil, gensupport.WrapError(err)
36132 }
36133 ret := &Subaccount{
36134 ServerResponse: googleapi.ServerResponse{
36135 Header: res.Header,
36136 HTTPStatusCode: res.StatusCode,
36137 },
36138 }
36139 target := &ret
36140 if err := gensupport.DecodeResponse(target, res); err != nil {
36141 return nil, err
36142 }
36143 return ret, nil
36144 }
36145
36146 type SubaccountsUpdateCall struct {
36147 s *Service
36148 profileId int64
36149 subaccount *Subaccount
36150 urlParams_ gensupport.URLParams
36151 ctx_ context.Context
36152 header_ http.Header
36153 }
36154
36155
36156
36157
36158 func (r *SubaccountsService) Update(profileId int64, subaccount *Subaccount) *SubaccountsUpdateCall {
36159 c := &SubaccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36160 c.profileId = profileId
36161 c.subaccount = subaccount
36162 return c
36163 }
36164
36165
36166
36167
36168 func (c *SubaccountsUpdateCall) Fields(s ...googleapi.Field) *SubaccountsUpdateCall {
36169 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36170 return c
36171 }
36172
36173
36174 func (c *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
36175 c.ctx_ = ctx
36176 return c
36177 }
36178
36179
36180
36181 func (c *SubaccountsUpdateCall) Header() http.Header {
36182 if c.header_ == nil {
36183 c.header_ = make(http.Header)
36184 }
36185 return c.header_
36186 }
36187
36188 func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
36189 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36190 var body io.Reader = nil
36191 body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
36192 if err != nil {
36193 return nil, err
36194 }
36195 c.urlParams_.Set("alt", alt)
36196 c.urlParams_.Set("prettyPrint", "false")
36197 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/subaccounts")
36198 urls += "?" + c.urlParams_.Encode()
36199 req, err := http.NewRequest("PUT", urls, body)
36200 if err != nil {
36201 return nil, err
36202 }
36203 req.Header = reqHeaders
36204 googleapi.Expand(req.URL, map[string]string{
36205 "profileId": strconv.FormatInt(c.profileId, 10),
36206 })
36207 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36208 }
36209
36210
36211
36212
36213
36214
36215 func (c *SubaccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Subaccount, error) {
36216 gensupport.SetOptions(c.urlParams_, opts...)
36217 res, err := c.doRequest("json")
36218 if res != nil && res.StatusCode == http.StatusNotModified {
36219 if res.Body != nil {
36220 res.Body.Close()
36221 }
36222 return nil, gensupport.WrapError(&googleapi.Error{
36223 Code: res.StatusCode,
36224 Header: res.Header,
36225 })
36226 }
36227 if err != nil {
36228 return nil, err
36229 }
36230 defer googleapi.CloseBody(res)
36231 if err := googleapi.CheckResponse(res); err != nil {
36232 return nil, gensupport.WrapError(err)
36233 }
36234 ret := &Subaccount{
36235 ServerResponse: googleapi.ServerResponse{
36236 Header: res.Header,
36237 HTTPStatusCode: res.StatusCode,
36238 },
36239 }
36240 target := &ret
36241 if err := gensupport.DecodeResponse(target, res); err != nil {
36242 return nil, err
36243 }
36244 return ret, nil
36245 }
36246
36247 type TargetableRemarketingListsGetCall struct {
36248 s *Service
36249 profileId int64
36250 id int64
36251 urlParams_ gensupport.URLParams
36252 ifNoneMatch_ string
36253 ctx_ context.Context
36254 header_ http.Header
36255 }
36256
36257
36258
36259
36260
36261 func (r *TargetableRemarketingListsService) Get(profileId int64, id int64) *TargetableRemarketingListsGetCall {
36262 c := &TargetableRemarketingListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36263 c.profileId = profileId
36264 c.id = id
36265 return c
36266 }
36267
36268
36269
36270
36271 func (c *TargetableRemarketingListsGetCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsGetCall {
36272 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36273 return c
36274 }
36275
36276
36277
36278
36279 func (c *TargetableRemarketingListsGetCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsGetCall {
36280 c.ifNoneMatch_ = entityTag
36281 return c
36282 }
36283
36284
36285 func (c *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
36286 c.ctx_ = ctx
36287 return c
36288 }
36289
36290
36291
36292 func (c *TargetableRemarketingListsGetCall) Header() http.Header {
36293 if c.header_ == nil {
36294 c.header_ = make(http.Header)
36295 }
36296 return c.header_
36297 }
36298
36299 func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
36300 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36301 if c.ifNoneMatch_ != "" {
36302 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36303 }
36304 var body io.Reader = nil
36305 c.urlParams_.Set("alt", alt)
36306 c.urlParams_.Set("prettyPrint", "false")
36307 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetableRemarketingLists/{+id}")
36308 urls += "?" + c.urlParams_.Encode()
36309 req, err := http.NewRequest("GET", urls, body)
36310 if err != nil {
36311 return nil, err
36312 }
36313 req.Header = reqHeaders
36314 googleapi.Expand(req.URL, map[string]string{
36315 "profileId": strconv.FormatInt(c.profileId, 10),
36316 "id": strconv.FormatInt(c.id, 10),
36317 })
36318 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36319 }
36320
36321
36322
36323
36324
36325
36326
36327 func (c *TargetableRemarketingListsGetCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingList, error) {
36328 gensupport.SetOptions(c.urlParams_, opts...)
36329 res, err := c.doRequest("json")
36330 if res != nil && res.StatusCode == http.StatusNotModified {
36331 if res.Body != nil {
36332 res.Body.Close()
36333 }
36334 return nil, gensupport.WrapError(&googleapi.Error{
36335 Code: res.StatusCode,
36336 Header: res.Header,
36337 })
36338 }
36339 if err != nil {
36340 return nil, err
36341 }
36342 defer googleapi.CloseBody(res)
36343 if err := googleapi.CheckResponse(res); err != nil {
36344 return nil, gensupport.WrapError(err)
36345 }
36346 ret := &TargetableRemarketingList{
36347 ServerResponse: googleapi.ServerResponse{
36348 Header: res.Header,
36349 HTTPStatusCode: res.StatusCode,
36350 },
36351 }
36352 target := &ret
36353 if err := gensupport.DecodeResponse(target, res); err != nil {
36354 return nil, err
36355 }
36356 return ret, nil
36357 }
36358
36359 type TargetableRemarketingListsListCall struct {
36360 s *Service
36361 profileId int64
36362 urlParams_ gensupport.URLParams
36363 ifNoneMatch_ string
36364 ctx_ context.Context
36365 header_ http.Header
36366 }
36367
36368
36369
36370
36371
36372
36373
36374 func (r *TargetableRemarketingListsService) List(profileId int64, advertiserId int64) *TargetableRemarketingListsListCall {
36375 c := &TargetableRemarketingListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36376 c.profileId = profileId
36377 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
36378 return c
36379 }
36380
36381
36382
36383 func (c *TargetableRemarketingListsListCall) Active(active bool) *TargetableRemarketingListsListCall {
36384 c.urlParams_.Set("active", fmt.Sprint(active))
36385 return c
36386 }
36387
36388
36389
36390 func (c *TargetableRemarketingListsListCall) MaxResults(maxResults int64) *TargetableRemarketingListsListCall {
36391 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36392 return c
36393 }
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403 func (c *TargetableRemarketingListsListCall) Name(name string) *TargetableRemarketingListsListCall {
36404 c.urlParams_.Set("name", name)
36405 return c
36406 }
36407
36408
36409
36410 func (c *TargetableRemarketingListsListCall) PageToken(pageToken string) *TargetableRemarketingListsListCall {
36411 c.urlParams_.Set("pageToken", pageToken)
36412 return c
36413 }
36414
36415
36416
36417
36418
36419
36420
36421
36422 func (c *TargetableRemarketingListsListCall) SortField(sortField string) *TargetableRemarketingListsListCall {
36423 c.urlParams_.Set("sortField", sortField)
36424 return c
36425 }
36426
36427
36428
36429
36430
36431
36432
36433 func (c *TargetableRemarketingListsListCall) SortOrder(sortOrder string) *TargetableRemarketingListsListCall {
36434 c.urlParams_.Set("sortOrder", sortOrder)
36435 return c
36436 }
36437
36438
36439
36440
36441 func (c *TargetableRemarketingListsListCall) Fields(s ...googleapi.Field) *TargetableRemarketingListsListCall {
36442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36443 return c
36444 }
36445
36446
36447
36448
36449 func (c *TargetableRemarketingListsListCall) IfNoneMatch(entityTag string) *TargetableRemarketingListsListCall {
36450 c.ifNoneMatch_ = entityTag
36451 return c
36452 }
36453
36454
36455 func (c *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
36456 c.ctx_ = ctx
36457 return c
36458 }
36459
36460
36461
36462 func (c *TargetableRemarketingListsListCall) Header() http.Header {
36463 if c.header_ == nil {
36464 c.header_ = make(http.Header)
36465 }
36466 return c.header_
36467 }
36468
36469 func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
36470 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36471 if c.ifNoneMatch_ != "" {
36472 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36473 }
36474 var body io.Reader = nil
36475 c.urlParams_.Set("alt", alt)
36476 c.urlParams_.Set("prettyPrint", "false")
36477 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetableRemarketingLists")
36478 urls += "?" + c.urlParams_.Encode()
36479 req, err := http.NewRequest("GET", urls, body)
36480 if err != nil {
36481 return nil, err
36482 }
36483 req.Header = reqHeaders
36484 googleapi.Expand(req.URL, map[string]string{
36485 "profileId": strconv.FormatInt(c.profileId, 10),
36486 })
36487 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36488 }
36489
36490
36491
36492
36493
36494
36495
36496 func (c *TargetableRemarketingListsListCall) Do(opts ...googleapi.CallOption) (*TargetableRemarketingListsListResponse, error) {
36497 gensupport.SetOptions(c.urlParams_, opts...)
36498 res, err := c.doRequest("json")
36499 if res != nil && res.StatusCode == http.StatusNotModified {
36500 if res.Body != nil {
36501 res.Body.Close()
36502 }
36503 return nil, gensupport.WrapError(&googleapi.Error{
36504 Code: res.StatusCode,
36505 Header: res.Header,
36506 })
36507 }
36508 if err != nil {
36509 return nil, err
36510 }
36511 defer googleapi.CloseBody(res)
36512 if err := googleapi.CheckResponse(res); err != nil {
36513 return nil, gensupport.WrapError(err)
36514 }
36515 ret := &TargetableRemarketingListsListResponse{
36516 ServerResponse: googleapi.ServerResponse{
36517 Header: res.Header,
36518 HTTPStatusCode: res.StatusCode,
36519 },
36520 }
36521 target := &ret
36522 if err := gensupport.DecodeResponse(target, res); err != nil {
36523 return nil, err
36524 }
36525 return ret, nil
36526 }
36527
36528
36529
36530
36531 func (c *TargetableRemarketingListsListCall) Pages(ctx context.Context, f func(*TargetableRemarketingListsListResponse) error) error {
36532 c.ctx_ = ctx
36533 defer c.PageToken(c.urlParams_.Get("pageToken"))
36534 for {
36535 x, err := c.Do()
36536 if err != nil {
36537 return err
36538 }
36539 if err := f(x); err != nil {
36540 return err
36541 }
36542 if x.NextPageToken == "" {
36543 return nil
36544 }
36545 c.PageToken(x.NextPageToken)
36546 }
36547 }
36548
36549 type TargetingTemplatesGetCall struct {
36550 s *Service
36551 profileId int64
36552 id int64
36553 urlParams_ gensupport.URLParams
36554 ifNoneMatch_ string
36555 ctx_ context.Context
36556 header_ http.Header
36557 }
36558
36559
36560
36561
36562
36563 func (r *TargetingTemplatesService) Get(profileId int64, id int64) *TargetingTemplatesGetCall {
36564 c := &TargetingTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36565 c.profileId = profileId
36566 c.id = id
36567 return c
36568 }
36569
36570
36571
36572
36573 func (c *TargetingTemplatesGetCall) Fields(s ...googleapi.Field) *TargetingTemplatesGetCall {
36574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36575 return c
36576 }
36577
36578
36579
36580
36581 func (c *TargetingTemplatesGetCall) IfNoneMatch(entityTag string) *TargetingTemplatesGetCall {
36582 c.ifNoneMatch_ = entityTag
36583 return c
36584 }
36585
36586
36587 func (c *TargetingTemplatesGetCall) Context(ctx context.Context) *TargetingTemplatesGetCall {
36588 c.ctx_ = ctx
36589 return c
36590 }
36591
36592
36593
36594 func (c *TargetingTemplatesGetCall) Header() http.Header {
36595 if c.header_ == nil {
36596 c.header_ = make(http.Header)
36597 }
36598 return c.header_
36599 }
36600
36601 func (c *TargetingTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
36602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36603 if c.ifNoneMatch_ != "" {
36604 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36605 }
36606 var body io.Reader = nil
36607 c.urlParams_.Set("alt", alt)
36608 c.urlParams_.Set("prettyPrint", "false")
36609 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetingTemplates/{+id}")
36610 urls += "?" + c.urlParams_.Encode()
36611 req, err := http.NewRequest("GET", urls, body)
36612 if err != nil {
36613 return nil, err
36614 }
36615 req.Header = reqHeaders
36616 googleapi.Expand(req.URL, map[string]string{
36617 "profileId": strconv.FormatInt(c.profileId, 10),
36618 "id": strconv.FormatInt(c.id, 10),
36619 })
36620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36621 }
36622
36623
36624
36625
36626
36627
36628
36629 func (c *TargetingTemplatesGetCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
36630 gensupport.SetOptions(c.urlParams_, opts...)
36631 res, err := c.doRequest("json")
36632 if res != nil && res.StatusCode == http.StatusNotModified {
36633 if res.Body != nil {
36634 res.Body.Close()
36635 }
36636 return nil, gensupport.WrapError(&googleapi.Error{
36637 Code: res.StatusCode,
36638 Header: res.Header,
36639 })
36640 }
36641 if err != nil {
36642 return nil, err
36643 }
36644 defer googleapi.CloseBody(res)
36645 if err := googleapi.CheckResponse(res); err != nil {
36646 return nil, gensupport.WrapError(err)
36647 }
36648 ret := &TargetingTemplate{
36649 ServerResponse: googleapi.ServerResponse{
36650 Header: res.Header,
36651 HTTPStatusCode: res.StatusCode,
36652 },
36653 }
36654 target := &ret
36655 if err := gensupport.DecodeResponse(target, res); err != nil {
36656 return nil, err
36657 }
36658 return ret, nil
36659 }
36660
36661 type TargetingTemplatesInsertCall struct {
36662 s *Service
36663 profileId int64
36664 targetingtemplate *TargetingTemplate
36665 urlParams_ gensupport.URLParams
36666 ctx_ context.Context
36667 header_ http.Header
36668 }
36669
36670
36671
36672
36673 func (r *TargetingTemplatesService) Insert(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesInsertCall {
36674 c := &TargetingTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36675 c.profileId = profileId
36676 c.targetingtemplate = targetingtemplate
36677 return c
36678 }
36679
36680
36681
36682
36683 func (c *TargetingTemplatesInsertCall) Fields(s ...googleapi.Field) *TargetingTemplatesInsertCall {
36684 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36685 return c
36686 }
36687
36688
36689 func (c *TargetingTemplatesInsertCall) Context(ctx context.Context) *TargetingTemplatesInsertCall {
36690 c.ctx_ = ctx
36691 return c
36692 }
36693
36694
36695
36696 func (c *TargetingTemplatesInsertCall) Header() http.Header {
36697 if c.header_ == nil {
36698 c.header_ = make(http.Header)
36699 }
36700 return c.header_
36701 }
36702
36703 func (c *TargetingTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
36704 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
36705 var body io.Reader = nil
36706 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
36707 if err != nil {
36708 return nil, err
36709 }
36710 c.urlParams_.Set("alt", alt)
36711 c.urlParams_.Set("prettyPrint", "false")
36712 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetingTemplates")
36713 urls += "?" + c.urlParams_.Encode()
36714 req, err := http.NewRequest("POST", urls, body)
36715 if err != nil {
36716 return nil, err
36717 }
36718 req.Header = reqHeaders
36719 googleapi.Expand(req.URL, map[string]string{
36720 "profileId": strconv.FormatInt(c.profileId, 10),
36721 })
36722 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36723 }
36724
36725
36726
36727
36728
36729
36730
36731 func (c *TargetingTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
36732 gensupport.SetOptions(c.urlParams_, opts...)
36733 res, err := c.doRequest("json")
36734 if res != nil && res.StatusCode == http.StatusNotModified {
36735 if res.Body != nil {
36736 res.Body.Close()
36737 }
36738 return nil, gensupport.WrapError(&googleapi.Error{
36739 Code: res.StatusCode,
36740 Header: res.Header,
36741 })
36742 }
36743 if err != nil {
36744 return nil, err
36745 }
36746 defer googleapi.CloseBody(res)
36747 if err := googleapi.CheckResponse(res); err != nil {
36748 return nil, gensupport.WrapError(err)
36749 }
36750 ret := &TargetingTemplate{
36751 ServerResponse: googleapi.ServerResponse{
36752 Header: res.Header,
36753 HTTPStatusCode: res.StatusCode,
36754 },
36755 }
36756 target := &ret
36757 if err := gensupport.DecodeResponse(target, res); err != nil {
36758 return nil, err
36759 }
36760 return ret, nil
36761 }
36762
36763 type TargetingTemplatesListCall struct {
36764 s *Service
36765 profileId int64
36766 urlParams_ gensupport.URLParams
36767 ifNoneMatch_ string
36768 ctx_ context.Context
36769 header_ http.Header
36770 }
36771
36772
36773
36774
36775
36776 func (r *TargetingTemplatesService) List(profileId int64) *TargetingTemplatesListCall {
36777 c := &TargetingTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36778 c.profileId = profileId
36779 return c
36780 }
36781
36782
36783
36784 func (c *TargetingTemplatesListCall) AdvertiserId(advertiserId int64) *TargetingTemplatesListCall {
36785 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId))
36786 return c
36787 }
36788
36789
36790
36791 func (c *TargetingTemplatesListCall) Ids(ids ...int64) *TargetingTemplatesListCall {
36792 var ids_ []string
36793 for _, v := range ids {
36794 ids_ = append(ids_, fmt.Sprint(v))
36795 }
36796 c.urlParams_.SetMulti("ids", ids_)
36797 return c
36798 }
36799
36800
36801
36802 func (c *TargetingTemplatesListCall) MaxResults(maxResults int64) *TargetingTemplatesListCall {
36803 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36804 return c
36805 }
36806
36807
36808
36809 func (c *TargetingTemplatesListCall) PageToken(pageToken string) *TargetingTemplatesListCall {
36810 c.urlParams_.Set("pageToken", pageToken)
36811 return c
36812 }
36813
36814
36815
36816
36817
36818
36819
36820
36821 func (c *TargetingTemplatesListCall) SearchString(searchString string) *TargetingTemplatesListCall {
36822 c.urlParams_.Set("searchString", searchString)
36823 return c
36824 }
36825
36826
36827
36828
36829
36830
36831
36832
36833 func (c *TargetingTemplatesListCall) SortField(sortField string) *TargetingTemplatesListCall {
36834 c.urlParams_.Set("sortField", sortField)
36835 return c
36836 }
36837
36838
36839
36840
36841
36842
36843
36844 func (c *TargetingTemplatesListCall) SortOrder(sortOrder string) *TargetingTemplatesListCall {
36845 c.urlParams_.Set("sortOrder", sortOrder)
36846 return c
36847 }
36848
36849
36850
36851
36852 func (c *TargetingTemplatesListCall) Fields(s ...googleapi.Field) *TargetingTemplatesListCall {
36853 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36854 return c
36855 }
36856
36857
36858
36859
36860 func (c *TargetingTemplatesListCall) IfNoneMatch(entityTag string) *TargetingTemplatesListCall {
36861 c.ifNoneMatch_ = entityTag
36862 return c
36863 }
36864
36865
36866 func (c *TargetingTemplatesListCall) Context(ctx context.Context) *TargetingTemplatesListCall {
36867 c.ctx_ = ctx
36868 return c
36869 }
36870
36871
36872
36873 func (c *TargetingTemplatesListCall) Header() http.Header {
36874 if c.header_ == nil {
36875 c.header_ = make(http.Header)
36876 }
36877 return c.header_
36878 }
36879
36880 func (c *TargetingTemplatesListCall) doRequest(alt string) (*http.Response, error) {
36881 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
36882 if c.ifNoneMatch_ != "" {
36883 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36884 }
36885 var body io.Reader = nil
36886 c.urlParams_.Set("alt", alt)
36887 c.urlParams_.Set("prettyPrint", "false")
36888 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetingTemplates")
36889 urls += "?" + c.urlParams_.Encode()
36890 req, err := http.NewRequest("GET", urls, body)
36891 if err != nil {
36892 return nil, err
36893 }
36894 req.Header = reqHeaders
36895 googleapi.Expand(req.URL, map[string]string{
36896 "profileId": strconv.FormatInt(c.profileId, 10),
36897 })
36898 return gensupport.SendRequest(c.ctx_, c.s.client, req)
36899 }
36900
36901
36902
36903
36904
36905
36906
36907 func (c *TargetingTemplatesListCall) Do(opts ...googleapi.CallOption) (*TargetingTemplatesListResponse, error) {
36908 gensupport.SetOptions(c.urlParams_, opts...)
36909 res, err := c.doRequest("json")
36910 if res != nil && res.StatusCode == http.StatusNotModified {
36911 if res.Body != nil {
36912 res.Body.Close()
36913 }
36914 return nil, gensupport.WrapError(&googleapi.Error{
36915 Code: res.StatusCode,
36916 Header: res.Header,
36917 })
36918 }
36919 if err != nil {
36920 return nil, err
36921 }
36922 defer googleapi.CloseBody(res)
36923 if err := googleapi.CheckResponse(res); err != nil {
36924 return nil, gensupport.WrapError(err)
36925 }
36926 ret := &TargetingTemplatesListResponse{
36927 ServerResponse: googleapi.ServerResponse{
36928 Header: res.Header,
36929 HTTPStatusCode: res.StatusCode,
36930 },
36931 }
36932 target := &ret
36933 if err := gensupport.DecodeResponse(target, res); err != nil {
36934 return nil, err
36935 }
36936 return ret, nil
36937 }
36938
36939
36940
36941
36942 func (c *TargetingTemplatesListCall) Pages(ctx context.Context, f func(*TargetingTemplatesListResponse) error) error {
36943 c.ctx_ = ctx
36944 defer c.PageToken(c.urlParams_.Get("pageToken"))
36945 for {
36946 x, err := c.Do()
36947 if err != nil {
36948 return err
36949 }
36950 if err := f(x); err != nil {
36951 return err
36952 }
36953 if x.NextPageToken == "" {
36954 return nil
36955 }
36956 c.PageToken(x.NextPageToken)
36957 }
36958 }
36959
36960 type TargetingTemplatesPatchCall struct {
36961 s *Service
36962 profileId int64
36963 targetingtemplate *TargetingTemplate
36964 urlParams_ gensupport.URLParams
36965 ctx_ context.Context
36966 header_ http.Header
36967 }
36968
36969
36970
36971
36972
36973
36974 func (r *TargetingTemplatesService) Patch(profileId int64, id int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesPatchCall {
36975 c := &TargetingTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36976 c.profileId = profileId
36977 c.urlParams_.Set("id", fmt.Sprint(id))
36978 c.targetingtemplate = targetingtemplate
36979 return c
36980 }
36981
36982
36983
36984
36985 func (c *TargetingTemplatesPatchCall) Fields(s ...googleapi.Field) *TargetingTemplatesPatchCall {
36986 c.urlParams_.Set("fields", googleapi.CombineFields(s))
36987 return c
36988 }
36989
36990
36991 func (c *TargetingTemplatesPatchCall) Context(ctx context.Context) *TargetingTemplatesPatchCall {
36992 c.ctx_ = ctx
36993 return c
36994 }
36995
36996
36997
36998 func (c *TargetingTemplatesPatchCall) Header() http.Header {
36999 if c.header_ == nil {
37000 c.header_ = make(http.Header)
37001 }
37002 return c.header_
37003 }
37004
37005 func (c *TargetingTemplatesPatchCall) doRequest(alt string) (*http.Response, error) {
37006 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
37007 var body io.Reader = nil
37008 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
37009 if err != nil {
37010 return nil, err
37011 }
37012 c.urlParams_.Set("alt", alt)
37013 c.urlParams_.Set("prettyPrint", "false")
37014 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetingTemplates")
37015 urls += "?" + c.urlParams_.Encode()
37016 req, err := http.NewRequest("PATCH", urls, body)
37017 if err != nil {
37018 return nil, err
37019 }
37020 req.Header = reqHeaders
37021 googleapi.Expand(req.URL, map[string]string{
37022 "profileId": strconv.FormatInt(c.profileId, 10),
37023 })
37024 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37025 }
37026
37027
37028
37029
37030
37031
37032
37033 func (c *TargetingTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
37034 gensupport.SetOptions(c.urlParams_, opts...)
37035 res, err := c.doRequest("json")
37036 if res != nil && res.StatusCode == http.StatusNotModified {
37037 if res.Body != nil {
37038 res.Body.Close()
37039 }
37040 return nil, gensupport.WrapError(&googleapi.Error{
37041 Code: res.StatusCode,
37042 Header: res.Header,
37043 })
37044 }
37045 if err != nil {
37046 return nil, err
37047 }
37048 defer googleapi.CloseBody(res)
37049 if err := googleapi.CheckResponse(res); err != nil {
37050 return nil, gensupport.WrapError(err)
37051 }
37052 ret := &TargetingTemplate{
37053 ServerResponse: googleapi.ServerResponse{
37054 Header: res.Header,
37055 HTTPStatusCode: res.StatusCode,
37056 },
37057 }
37058 target := &ret
37059 if err := gensupport.DecodeResponse(target, res); err != nil {
37060 return nil, err
37061 }
37062 return ret, nil
37063 }
37064
37065 type TargetingTemplatesUpdateCall struct {
37066 s *Service
37067 profileId int64
37068 targetingtemplate *TargetingTemplate
37069 urlParams_ gensupport.URLParams
37070 ctx_ context.Context
37071 header_ http.Header
37072 }
37073
37074
37075
37076
37077 func (r *TargetingTemplatesService) Update(profileId int64, targetingtemplate *TargetingTemplate) *TargetingTemplatesUpdateCall {
37078 c := &TargetingTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37079 c.profileId = profileId
37080 c.targetingtemplate = targetingtemplate
37081 return c
37082 }
37083
37084
37085
37086
37087 func (c *TargetingTemplatesUpdateCall) Fields(s ...googleapi.Field) *TargetingTemplatesUpdateCall {
37088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37089 return c
37090 }
37091
37092
37093 func (c *TargetingTemplatesUpdateCall) Context(ctx context.Context) *TargetingTemplatesUpdateCall {
37094 c.ctx_ = ctx
37095 return c
37096 }
37097
37098
37099
37100 func (c *TargetingTemplatesUpdateCall) Header() http.Header {
37101 if c.header_ == nil {
37102 c.header_ = make(http.Header)
37103 }
37104 return c.header_
37105 }
37106
37107 func (c *TargetingTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
37108 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
37109 var body io.Reader = nil
37110 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetingtemplate)
37111 if err != nil {
37112 return nil, err
37113 }
37114 c.urlParams_.Set("alt", alt)
37115 c.urlParams_.Set("prettyPrint", "false")
37116 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/targetingTemplates")
37117 urls += "?" + c.urlParams_.Encode()
37118 req, err := http.NewRequest("PUT", urls, body)
37119 if err != nil {
37120 return nil, err
37121 }
37122 req.Header = reqHeaders
37123 googleapi.Expand(req.URL, map[string]string{
37124 "profileId": strconv.FormatInt(c.profileId, 10),
37125 })
37126 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37127 }
37128
37129
37130
37131
37132
37133
37134
37135 func (c *TargetingTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*TargetingTemplate, error) {
37136 gensupport.SetOptions(c.urlParams_, opts...)
37137 res, err := c.doRequest("json")
37138 if res != nil && res.StatusCode == http.StatusNotModified {
37139 if res.Body != nil {
37140 res.Body.Close()
37141 }
37142 return nil, gensupport.WrapError(&googleapi.Error{
37143 Code: res.StatusCode,
37144 Header: res.Header,
37145 })
37146 }
37147 if err != nil {
37148 return nil, err
37149 }
37150 defer googleapi.CloseBody(res)
37151 if err := googleapi.CheckResponse(res); err != nil {
37152 return nil, gensupport.WrapError(err)
37153 }
37154 ret := &TargetingTemplate{
37155 ServerResponse: googleapi.ServerResponse{
37156 Header: res.Header,
37157 HTTPStatusCode: res.StatusCode,
37158 },
37159 }
37160 target := &ret
37161 if err := gensupport.DecodeResponse(target, res); err != nil {
37162 return nil, err
37163 }
37164 return ret, nil
37165 }
37166
37167 type UserProfilesGetCall struct {
37168 s *Service
37169 profileId int64
37170 urlParams_ gensupport.URLParams
37171 ifNoneMatch_ string
37172 ctx_ context.Context
37173 header_ http.Header
37174 }
37175
37176
37177
37178
37179 func (r *UserProfilesService) Get(profileId int64) *UserProfilesGetCall {
37180 c := &UserProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37181 c.profileId = profileId
37182 return c
37183 }
37184
37185
37186
37187
37188 func (c *UserProfilesGetCall) Fields(s ...googleapi.Field) *UserProfilesGetCall {
37189 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37190 return c
37191 }
37192
37193
37194
37195
37196 func (c *UserProfilesGetCall) IfNoneMatch(entityTag string) *UserProfilesGetCall {
37197 c.ifNoneMatch_ = entityTag
37198 return c
37199 }
37200
37201
37202 func (c *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
37203 c.ctx_ = ctx
37204 return c
37205 }
37206
37207
37208
37209 func (c *UserProfilesGetCall) Header() http.Header {
37210 if c.header_ == nil {
37211 c.header_ = make(http.Header)
37212 }
37213 return c.header_
37214 }
37215
37216 func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
37217 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37218 if c.ifNoneMatch_ != "" {
37219 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37220 }
37221 var body io.Reader = nil
37222 c.urlParams_.Set("alt", alt)
37223 c.urlParams_.Set("prettyPrint", "false")
37224 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{profileId}")
37225 urls += "?" + c.urlParams_.Encode()
37226 req, err := http.NewRequest("GET", urls, body)
37227 if err != nil {
37228 return nil, err
37229 }
37230 req.Header = reqHeaders
37231 googleapi.Expand(req.URL, map[string]string{
37232 "profileId": strconv.FormatInt(c.profileId, 10),
37233 })
37234 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37235 }
37236
37237
37238
37239
37240
37241
37242 func (c *UserProfilesGetCall) Do(opts ...googleapi.CallOption) (*UserProfile, error) {
37243 gensupport.SetOptions(c.urlParams_, opts...)
37244 res, err := c.doRequest("json")
37245 if res != nil && res.StatusCode == http.StatusNotModified {
37246 if res.Body != nil {
37247 res.Body.Close()
37248 }
37249 return nil, gensupport.WrapError(&googleapi.Error{
37250 Code: res.StatusCode,
37251 Header: res.Header,
37252 })
37253 }
37254 if err != nil {
37255 return nil, err
37256 }
37257 defer googleapi.CloseBody(res)
37258 if err := googleapi.CheckResponse(res); err != nil {
37259 return nil, gensupport.WrapError(err)
37260 }
37261 ret := &UserProfile{
37262 ServerResponse: googleapi.ServerResponse{
37263 Header: res.Header,
37264 HTTPStatusCode: res.StatusCode,
37265 },
37266 }
37267 target := &ret
37268 if err := gensupport.DecodeResponse(target, res); err != nil {
37269 return nil, err
37270 }
37271 return ret, nil
37272 }
37273
37274 type UserProfilesListCall struct {
37275 s *Service
37276 urlParams_ gensupport.URLParams
37277 ifNoneMatch_ string
37278 ctx_ context.Context
37279 header_ http.Header
37280 }
37281
37282
37283 func (r *UserProfilesService) List() *UserProfilesListCall {
37284 c := &UserProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37285 return c
37286 }
37287
37288
37289
37290
37291 func (c *UserProfilesListCall) Fields(s ...googleapi.Field) *UserProfilesListCall {
37292 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37293 return c
37294 }
37295
37296
37297
37298
37299 func (c *UserProfilesListCall) IfNoneMatch(entityTag string) *UserProfilesListCall {
37300 c.ifNoneMatch_ = entityTag
37301 return c
37302 }
37303
37304
37305 func (c *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
37306 c.ctx_ = ctx
37307 return c
37308 }
37309
37310
37311
37312 func (c *UserProfilesListCall) Header() http.Header {
37313 if c.header_ == nil {
37314 c.header_ = make(http.Header)
37315 }
37316 return c.header_
37317 }
37318
37319 func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
37320 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37321 if c.ifNoneMatch_ != "" {
37322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37323 }
37324 var body io.Reader = nil
37325 c.urlParams_.Set("alt", alt)
37326 c.urlParams_.Set("prettyPrint", "false")
37327 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles")
37328 urls += "?" + c.urlParams_.Encode()
37329 req, err := http.NewRequest("GET", urls, body)
37330 if err != nil {
37331 return nil, err
37332 }
37333 req.Header = reqHeaders
37334 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37335 }
37336
37337
37338
37339
37340
37341
37342
37343 func (c *UserProfilesListCall) Do(opts ...googleapi.CallOption) (*UserProfileList, error) {
37344 gensupport.SetOptions(c.urlParams_, opts...)
37345 res, err := c.doRequest("json")
37346 if res != nil && res.StatusCode == http.StatusNotModified {
37347 if res.Body != nil {
37348 res.Body.Close()
37349 }
37350 return nil, gensupport.WrapError(&googleapi.Error{
37351 Code: res.StatusCode,
37352 Header: res.Header,
37353 })
37354 }
37355 if err != nil {
37356 return nil, err
37357 }
37358 defer googleapi.CloseBody(res)
37359 if err := googleapi.CheckResponse(res); err != nil {
37360 return nil, gensupport.WrapError(err)
37361 }
37362 ret := &UserProfileList{
37363 ServerResponse: googleapi.ServerResponse{
37364 Header: res.Header,
37365 HTTPStatusCode: res.StatusCode,
37366 },
37367 }
37368 target := &ret
37369 if err := gensupport.DecodeResponse(target, res); err != nil {
37370 return nil, err
37371 }
37372 return ret, nil
37373 }
37374
37375 type UserRolePermissionGroupsGetCall struct {
37376 s *Service
37377 profileId int64
37378 id int64
37379 urlParams_ gensupport.URLParams
37380 ifNoneMatch_ string
37381 ctx_ context.Context
37382 header_ http.Header
37383 }
37384
37385
37386
37387
37388
37389 func (r *UserRolePermissionGroupsService) Get(profileId int64, id int64) *UserRolePermissionGroupsGetCall {
37390 c := &UserRolePermissionGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37391 c.profileId = profileId
37392 c.id = id
37393 return c
37394 }
37395
37396
37397
37398
37399 func (c *UserRolePermissionGroupsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsGetCall {
37400 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37401 return c
37402 }
37403
37404
37405
37406
37407 func (c *UserRolePermissionGroupsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsGetCall {
37408 c.ifNoneMatch_ = entityTag
37409 return c
37410 }
37411
37412
37413 func (c *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
37414 c.ctx_ = ctx
37415 return c
37416 }
37417
37418
37419
37420 func (c *UserRolePermissionGroupsGetCall) Header() http.Header {
37421 if c.header_ == nil {
37422 c.header_ = make(http.Header)
37423 }
37424 return c.header_
37425 }
37426
37427 func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
37428 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37429 if c.ifNoneMatch_ != "" {
37430 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37431 }
37432 var body io.Reader = nil
37433 c.urlParams_.Set("alt", alt)
37434 c.urlParams_.Set("prettyPrint", "false")
37435 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRolePermissionGroups/{+id}")
37436 urls += "?" + c.urlParams_.Encode()
37437 req, err := http.NewRequest("GET", urls, body)
37438 if err != nil {
37439 return nil, err
37440 }
37441 req.Header = reqHeaders
37442 googleapi.Expand(req.URL, map[string]string{
37443 "profileId": strconv.FormatInt(c.profileId, 10),
37444 "id": strconv.FormatInt(c.id, 10),
37445 })
37446 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37447 }
37448
37449
37450
37451
37452
37453
37454
37455 func (c *UserRolePermissionGroupsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroup, error) {
37456 gensupport.SetOptions(c.urlParams_, opts...)
37457 res, err := c.doRequest("json")
37458 if res != nil && res.StatusCode == http.StatusNotModified {
37459 if res.Body != nil {
37460 res.Body.Close()
37461 }
37462 return nil, gensupport.WrapError(&googleapi.Error{
37463 Code: res.StatusCode,
37464 Header: res.Header,
37465 })
37466 }
37467 if err != nil {
37468 return nil, err
37469 }
37470 defer googleapi.CloseBody(res)
37471 if err := googleapi.CheckResponse(res); err != nil {
37472 return nil, gensupport.WrapError(err)
37473 }
37474 ret := &UserRolePermissionGroup{
37475 ServerResponse: googleapi.ServerResponse{
37476 Header: res.Header,
37477 HTTPStatusCode: res.StatusCode,
37478 },
37479 }
37480 target := &ret
37481 if err := gensupport.DecodeResponse(target, res); err != nil {
37482 return nil, err
37483 }
37484 return ret, nil
37485 }
37486
37487 type UserRolePermissionGroupsListCall struct {
37488 s *Service
37489 profileId int64
37490 urlParams_ gensupport.URLParams
37491 ifNoneMatch_ string
37492 ctx_ context.Context
37493 header_ http.Header
37494 }
37495
37496
37497
37498
37499 func (r *UserRolePermissionGroupsService) List(profileId int64) *UserRolePermissionGroupsListCall {
37500 c := &UserRolePermissionGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37501 c.profileId = profileId
37502 return c
37503 }
37504
37505
37506
37507
37508 func (c *UserRolePermissionGroupsListCall) Fields(s ...googleapi.Field) *UserRolePermissionGroupsListCall {
37509 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37510 return c
37511 }
37512
37513
37514
37515
37516 func (c *UserRolePermissionGroupsListCall) IfNoneMatch(entityTag string) *UserRolePermissionGroupsListCall {
37517 c.ifNoneMatch_ = entityTag
37518 return c
37519 }
37520
37521
37522 func (c *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
37523 c.ctx_ = ctx
37524 return c
37525 }
37526
37527
37528
37529 func (c *UserRolePermissionGroupsListCall) Header() http.Header {
37530 if c.header_ == nil {
37531 c.header_ = make(http.Header)
37532 }
37533 return c.header_
37534 }
37535
37536 func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
37537 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37538 if c.ifNoneMatch_ != "" {
37539 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37540 }
37541 var body io.Reader = nil
37542 c.urlParams_.Set("alt", alt)
37543 c.urlParams_.Set("prettyPrint", "false")
37544 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRolePermissionGroups")
37545 urls += "?" + c.urlParams_.Encode()
37546 req, err := http.NewRequest("GET", urls, body)
37547 if err != nil {
37548 return nil, err
37549 }
37550 req.Header = reqHeaders
37551 googleapi.Expand(req.URL, map[string]string{
37552 "profileId": strconv.FormatInt(c.profileId, 10),
37553 })
37554 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37555 }
37556
37557
37558
37559
37560
37561
37562
37563 func (c *UserRolePermissionGroupsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionGroupsListResponse, error) {
37564 gensupport.SetOptions(c.urlParams_, opts...)
37565 res, err := c.doRequest("json")
37566 if res != nil && res.StatusCode == http.StatusNotModified {
37567 if res.Body != nil {
37568 res.Body.Close()
37569 }
37570 return nil, gensupport.WrapError(&googleapi.Error{
37571 Code: res.StatusCode,
37572 Header: res.Header,
37573 })
37574 }
37575 if err != nil {
37576 return nil, err
37577 }
37578 defer googleapi.CloseBody(res)
37579 if err := googleapi.CheckResponse(res); err != nil {
37580 return nil, gensupport.WrapError(err)
37581 }
37582 ret := &UserRolePermissionGroupsListResponse{
37583 ServerResponse: googleapi.ServerResponse{
37584 Header: res.Header,
37585 HTTPStatusCode: res.StatusCode,
37586 },
37587 }
37588 target := &ret
37589 if err := gensupport.DecodeResponse(target, res); err != nil {
37590 return nil, err
37591 }
37592 return ret, nil
37593 }
37594
37595 type UserRolePermissionsGetCall struct {
37596 s *Service
37597 profileId int64
37598 id int64
37599 urlParams_ gensupport.URLParams
37600 ifNoneMatch_ string
37601 ctx_ context.Context
37602 header_ http.Header
37603 }
37604
37605
37606
37607
37608
37609 func (r *UserRolePermissionsService) Get(profileId int64, id int64) *UserRolePermissionsGetCall {
37610 c := &UserRolePermissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37611 c.profileId = profileId
37612 c.id = id
37613 return c
37614 }
37615
37616
37617
37618
37619 func (c *UserRolePermissionsGetCall) Fields(s ...googleapi.Field) *UserRolePermissionsGetCall {
37620 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37621 return c
37622 }
37623
37624
37625
37626
37627 func (c *UserRolePermissionsGetCall) IfNoneMatch(entityTag string) *UserRolePermissionsGetCall {
37628 c.ifNoneMatch_ = entityTag
37629 return c
37630 }
37631
37632
37633 func (c *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
37634 c.ctx_ = ctx
37635 return c
37636 }
37637
37638
37639
37640 func (c *UserRolePermissionsGetCall) Header() http.Header {
37641 if c.header_ == nil {
37642 c.header_ = make(http.Header)
37643 }
37644 return c.header_
37645 }
37646
37647 func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
37648 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37649 if c.ifNoneMatch_ != "" {
37650 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37651 }
37652 var body io.Reader = nil
37653 c.urlParams_.Set("alt", alt)
37654 c.urlParams_.Set("prettyPrint", "false")
37655 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRolePermissions/{+id}")
37656 urls += "?" + c.urlParams_.Encode()
37657 req, err := http.NewRequest("GET", urls, body)
37658 if err != nil {
37659 return nil, err
37660 }
37661 req.Header = reqHeaders
37662 googleapi.Expand(req.URL, map[string]string{
37663 "profileId": strconv.FormatInt(c.profileId, 10),
37664 "id": strconv.FormatInt(c.id, 10),
37665 })
37666 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37667 }
37668
37669
37670
37671
37672
37673
37674
37675 func (c *UserRolePermissionsGetCall) Do(opts ...googleapi.CallOption) (*UserRolePermission, error) {
37676 gensupport.SetOptions(c.urlParams_, opts...)
37677 res, err := c.doRequest("json")
37678 if res != nil && res.StatusCode == http.StatusNotModified {
37679 if res.Body != nil {
37680 res.Body.Close()
37681 }
37682 return nil, gensupport.WrapError(&googleapi.Error{
37683 Code: res.StatusCode,
37684 Header: res.Header,
37685 })
37686 }
37687 if err != nil {
37688 return nil, err
37689 }
37690 defer googleapi.CloseBody(res)
37691 if err := googleapi.CheckResponse(res); err != nil {
37692 return nil, gensupport.WrapError(err)
37693 }
37694 ret := &UserRolePermission{
37695 ServerResponse: googleapi.ServerResponse{
37696 Header: res.Header,
37697 HTTPStatusCode: res.StatusCode,
37698 },
37699 }
37700 target := &ret
37701 if err := gensupport.DecodeResponse(target, res); err != nil {
37702 return nil, err
37703 }
37704 return ret, nil
37705 }
37706
37707 type UserRolePermissionsListCall struct {
37708 s *Service
37709 profileId int64
37710 urlParams_ gensupport.URLParams
37711 ifNoneMatch_ string
37712 ctx_ context.Context
37713 header_ http.Header
37714 }
37715
37716
37717
37718
37719 func (r *UserRolePermissionsService) List(profileId int64) *UserRolePermissionsListCall {
37720 c := &UserRolePermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37721 c.profileId = profileId
37722 return c
37723 }
37724
37725
37726
37727 func (c *UserRolePermissionsListCall) Ids(ids ...int64) *UserRolePermissionsListCall {
37728 var ids_ []string
37729 for _, v := range ids {
37730 ids_ = append(ids_, fmt.Sprint(v))
37731 }
37732 c.urlParams_.SetMulti("ids", ids_)
37733 return c
37734 }
37735
37736
37737
37738
37739 func (c *UserRolePermissionsListCall) Fields(s ...googleapi.Field) *UserRolePermissionsListCall {
37740 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37741 return c
37742 }
37743
37744
37745
37746
37747 func (c *UserRolePermissionsListCall) IfNoneMatch(entityTag string) *UserRolePermissionsListCall {
37748 c.ifNoneMatch_ = entityTag
37749 return c
37750 }
37751
37752
37753 func (c *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
37754 c.ctx_ = ctx
37755 return c
37756 }
37757
37758
37759
37760 func (c *UserRolePermissionsListCall) Header() http.Header {
37761 if c.header_ == nil {
37762 c.header_ = make(http.Header)
37763 }
37764 return c.header_
37765 }
37766
37767 func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
37768 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37769 if c.ifNoneMatch_ != "" {
37770 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37771 }
37772 var body io.Reader = nil
37773 c.urlParams_.Set("alt", alt)
37774 c.urlParams_.Set("prettyPrint", "false")
37775 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRolePermissions")
37776 urls += "?" + c.urlParams_.Encode()
37777 req, err := http.NewRequest("GET", urls, body)
37778 if err != nil {
37779 return nil, err
37780 }
37781 req.Header = reqHeaders
37782 googleapi.Expand(req.URL, map[string]string{
37783 "profileId": strconv.FormatInt(c.profileId, 10),
37784 })
37785 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37786 }
37787
37788
37789
37790
37791
37792
37793
37794 func (c *UserRolePermissionsListCall) Do(opts ...googleapi.CallOption) (*UserRolePermissionsListResponse, error) {
37795 gensupport.SetOptions(c.urlParams_, opts...)
37796 res, err := c.doRequest("json")
37797 if res != nil && res.StatusCode == http.StatusNotModified {
37798 if res.Body != nil {
37799 res.Body.Close()
37800 }
37801 return nil, gensupport.WrapError(&googleapi.Error{
37802 Code: res.StatusCode,
37803 Header: res.Header,
37804 })
37805 }
37806 if err != nil {
37807 return nil, err
37808 }
37809 defer googleapi.CloseBody(res)
37810 if err := googleapi.CheckResponse(res); err != nil {
37811 return nil, gensupport.WrapError(err)
37812 }
37813 ret := &UserRolePermissionsListResponse{
37814 ServerResponse: googleapi.ServerResponse{
37815 Header: res.Header,
37816 HTTPStatusCode: res.StatusCode,
37817 },
37818 }
37819 target := &ret
37820 if err := gensupport.DecodeResponse(target, res); err != nil {
37821 return nil, err
37822 }
37823 return ret, nil
37824 }
37825
37826 type UserRolesDeleteCall struct {
37827 s *Service
37828 profileId int64
37829 id int64
37830 urlParams_ gensupport.URLParams
37831 ctx_ context.Context
37832 header_ http.Header
37833 }
37834
37835
37836
37837
37838
37839 func (r *UserRolesService) Delete(profileId int64, id int64) *UserRolesDeleteCall {
37840 c := &UserRolesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37841 c.profileId = profileId
37842 c.id = id
37843 return c
37844 }
37845
37846
37847
37848
37849 func (c *UserRolesDeleteCall) Fields(s ...googleapi.Field) *UserRolesDeleteCall {
37850 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37851 return c
37852 }
37853
37854
37855 func (c *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
37856 c.ctx_ = ctx
37857 return c
37858 }
37859
37860
37861
37862 func (c *UserRolesDeleteCall) Header() http.Header {
37863 if c.header_ == nil {
37864 c.header_ = make(http.Header)
37865 }
37866 return c.header_
37867 }
37868
37869 func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
37870 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37871 var body io.Reader = nil
37872 c.urlParams_.Set("alt", alt)
37873 c.urlParams_.Set("prettyPrint", "false")
37874 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles/{+id}")
37875 urls += "?" + c.urlParams_.Encode()
37876 req, err := http.NewRequest("DELETE", urls, body)
37877 if err != nil {
37878 return nil, err
37879 }
37880 req.Header = reqHeaders
37881 googleapi.Expand(req.URL, map[string]string{
37882 "profileId": strconv.FormatInt(c.profileId, 10),
37883 "id": strconv.FormatInt(c.id, 10),
37884 })
37885 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37886 }
37887
37888
37889 func (c *UserRolesDeleteCall) Do(opts ...googleapi.CallOption) error {
37890 gensupport.SetOptions(c.urlParams_, opts...)
37891 res, err := c.doRequest("json")
37892 if err != nil {
37893 return err
37894 }
37895 defer googleapi.CloseBody(res)
37896 if err := googleapi.CheckResponse(res); err != nil {
37897 return gensupport.WrapError(err)
37898 }
37899 return nil
37900 }
37901
37902 type UserRolesGetCall struct {
37903 s *Service
37904 profileId int64
37905 id int64
37906 urlParams_ gensupport.URLParams
37907 ifNoneMatch_ string
37908 ctx_ context.Context
37909 header_ http.Header
37910 }
37911
37912
37913
37914
37915
37916 func (r *UserRolesService) Get(profileId int64, id int64) *UserRolesGetCall {
37917 c := &UserRolesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37918 c.profileId = profileId
37919 c.id = id
37920 return c
37921 }
37922
37923
37924
37925
37926 func (c *UserRolesGetCall) Fields(s ...googleapi.Field) *UserRolesGetCall {
37927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
37928 return c
37929 }
37930
37931
37932
37933
37934 func (c *UserRolesGetCall) IfNoneMatch(entityTag string) *UserRolesGetCall {
37935 c.ifNoneMatch_ = entityTag
37936 return c
37937 }
37938
37939
37940 func (c *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
37941 c.ctx_ = ctx
37942 return c
37943 }
37944
37945
37946
37947 func (c *UserRolesGetCall) Header() http.Header {
37948 if c.header_ == nil {
37949 c.header_ = make(http.Header)
37950 }
37951 return c.header_
37952 }
37953
37954 func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
37955 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
37956 if c.ifNoneMatch_ != "" {
37957 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37958 }
37959 var body io.Reader = nil
37960 c.urlParams_.Set("alt", alt)
37961 c.urlParams_.Set("prettyPrint", "false")
37962 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles/{+id}")
37963 urls += "?" + c.urlParams_.Encode()
37964 req, err := http.NewRequest("GET", urls, body)
37965 if err != nil {
37966 return nil, err
37967 }
37968 req.Header = reqHeaders
37969 googleapi.Expand(req.URL, map[string]string{
37970 "profileId": strconv.FormatInt(c.profileId, 10),
37971 "id": strconv.FormatInt(c.id, 10),
37972 })
37973 return gensupport.SendRequest(c.ctx_, c.s.client, req)
37974 }
37975
37976
37977
37978
37979
37980
37981 func (c *UserRolesGetCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
37982 gensupport.SetOptions(c.urlParams_, opts...)
37983 res, err := c.doRequest("json")
37984 if res != nil && res.StatusCode == http.StatusNotModified {
37985 if res.Body != nil {
37986 res.Body.Close()
37987 }
37988 return nil, gensupport.WrapError(&googleapi.Error{
37989 Code: res.StatusCode,
37990 Header: res.Header,
37991 })
37992 }
37993 if err != nil {
37994 return nil, err
37995 }
37996 defer googleapi.CloseBody(res)
37997 if err := googleapi.CheckResponse(res); err != nil {
37998 return nil, gensupport.WrapError(err)
37999 }
38000 ret := &UserRole{
38001 ServerResponse: googleapi.ServerResponse{
38002 Header: res.Header,
38003 HTTPStatusCode: res.StatusCode,
38004 },
38005 }
38006 target := &ret
38007 if err := gensupport.DecodeResponse(target, res); err != nil {
38008 return nil, err
38009 }
38010 return ret, nil
38011 }
38012
38013 type UserRolesInsertCall struct {
38014 s *Service
38015 profileId int64
38016 userrole *UserRole
38017 urlParams_ gensupport.URLParams
38018 ctx_ context.Context
38019 header_ http.Header
38020 }
38021
38022
38023
38024
38025 func (r *UserRolesService) Insert(profileId int64, userrole *UserRole) *UserRolesInsertCall {
38026 c := &UserRolesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38027 c.profileId = profileId
38028 c.userrole = userrole
38029 return c
38030 }
38031
38032
38033
38034
38035 func (c *UserRolesInsertCall) Fields(s ...googleapi.Field) *UserRolesInsertCall {
38036 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38037 return c
38038 }
38039
38040
38041 func (c *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
38042 c.ctx_ = ctx
38043 return c
38044 }
38045
38046
38047
38048 func (c *UserRolesInsertCall) Header() http.Header {
38049 if c.header_ == nil {
38050 c.header_ = make(http.Header)
38051 }
38052 return c.header_
38053 }
38054
38055 func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
38056 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
38057 var body io.Reader = nil
38058 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
38059 if err != nil {
38060 return nil, err
38061 }
38062 c.urlParams_.Set("alt", alt)
38063 c.urlParams_.Set("prettyPrint", "false")
38064 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles")
38065 urls += "?" + c.urlParams_.Encode()
38066 req, err := http.NewRequest("POST", urls, body)
38067 if err != nil {
38068 return nil, err
38069 }
38070 req.Header = reqHeaders
38071 googleapi.Expand(req.URL, map[string]string{
38072 "profileId": strconv.FormatInt(c.profileId, 10),
38073 })
38074 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38075 }
38076
38077
38078
38079
38080
38081
38082 func (c *UserRolesInsertCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
38083 gensupport.SetOptions(c.urlParams_, opts...)
38084 res, err := c.doRequest("json")
38085 if res != nil && res.StatusCode == http.StatusNotModified {
38086 if res.Body != nil {
38087 res.Body.Close()
38088 }
38089 return nil, gensupport.WrapError(&googleapi.Error{
38090 Code: res.StatusCode,
38091 Header: res.Header,
38092 })
38093 }
38094 if err != nil {
38095 return nil, err
38096 }
38097 defer googleapi.CloseBody(res)
38098 if err := googleapi.CheckResponse(res); err != nil {
38099 return nil, gensupport.WrapError(err)
38100 }
38101 ret := &UserRole{
38102 ServerResponse: googleapi.ServerResponse{
38103 Header: res.Header,
38104 HTTPStatusCode: res.StatusCode,
38105 },
38106 }
38107 target := &ret
38108 if err := gensupport.DecodeResponse(target, res); err != nil {
38109 return nil, err
38110 }
38111 return ret, nil
38112 }
38113
38114 type UserRolesListCall struct {
38115 s *Service
38116 profileId int64
38117 urlParams_ gensupport.URLParams
38118 ifNoneMatch_ string
38119 ctx_ context.Context
38120 header_ http.Header
38121 }
38122
38123
38124
38125
38126
38127 func (r *UserRolesService) List(profileId int64) *UserRolesListCall {
38128 c := &UserRolesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38129 c.profileId = profileId
38130 return c
38131 }
38132
38133
38134
38135
38136 func (c *UserRolesListCall) AccountUserRoleOnly(accountUserRoleOnly bool) *UserRolesListCall {
38137 c.urlParams_.Set("accountUserRoleOnly", fmt.Sprint(accountUserRoleOnly))
38138 return c
38139 }
38140
38141
38142
38143 func (c *UserRolesListCall) Ids(ids ...int64) *UserRolesListCall {
38144 var ids_ []string
38145 for _, v := range ids {
38146 ids_ = append(ids_, fmt.Sprint(v))
38147 }
38148 c.urlParams_.SetMulti("ids", ids_)
38149 return c
38150 }
38151
38152
38153
38154 func (c *UserRolesListCall) MaxResults(maxResults int64) *UserRolesListCall {
38155 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38156 return c
38157 }
38158
38159
38160
38161 func (c *UserRolesListCall) PageToken(pageToken string) *UserRolesListCall {
38162 c.urlParams_.Set("pageToken", pageToken)
38163 return c
38164 }
38165
38166
38167
38168
38169
38170
38171
38172
38173 func (c *UserRolesListCall) SearchString(searchString string) *UserRolesListCall {
38174 c.urlParams_.Set("searchString", searchString)
38175 return c
38176 }
38177
38178
38179
38180
38181
38182
38183
38184
38185 func (c *UserRolesListCall) SortField(sortField string) *UserRolesListCall {
38186 c.urlParams_.Set("sortField", sortField)
38187 return c
38188 }
38189
38190
38191
38192
38193
38194
38195
38196 func (c *UserRolesListCall) SortOrder(sortOrder string) *UserRolesListCall {
38197 c.urlParams_.Set("sortOrder", sortOrder)
38198 return c
38199 }
38200
38201
38202
38203 func (c *UserRolesListCall) SubaccountId(subaccountId int64) *UserRolesListCall {
38204 c.urlParams_.Set("subaccountId", fmt.Sprint(subaccountId))
38205 return c
38206 }
38207
38208
38209
38210
38211 func (c *UserRolesListCall) Fields(s ...googleapi.Field) *UserRolesListCall {
38212 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38213 return c
38214 }
38215
38216
38217
38218
38219 func (c *UserRolesListCall) IfNoneMatch(entityTag string) *UserRolesListCall {
38220 c.ifNoneMatch_ = entityTag
38221 return c
38222 }
38223
38224
38225 func (c *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
38226 c.ctx_ = ctx
38227 return c
38228 }
38229
38230
38231
38232 func (c *UserRolesListCall) Header() http.Header {
38233 if c.header_ == nil {
38234 c.header_ = make(http.Header)
38235 }
38236 return c.header_
38237 }
38238
38239 func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
38240 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
38241 if c.ifNoneMatch_ != "" {
38242 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38243 }
38244 var body io.Reader = nil
38245 c.urlParams_.Set("alt", alt)
38246 c.urlParams_.Set("prettyPrint", "false")
38247 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles")
38248 urls += "?" + c.urlParams_.Encode()
38249 req, err := http.NewRequest("GET", urls, body)
38250 if err != nil {
38251 return nil, err
38252 }
38253 req.Header = reqHeaders
38254 googleapi.Expand(req.URL, map[string]string{
38255 "profileId": strconv.FormatInt(c.profileId, 10),
38256 })
38257 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38258 }
38259
38260
38261
38262
38263
38264
38265
38266 func (c *UserRolesListCall) Do(opts ...googleapi.CallOption) (*UserRolesListResponse, error) {
38267 gensupport.SetOptions(c.urlParams_, opts...)
38268 res, err := c.doRequest("json")
38269 if res != nil && res.StatusCode == http.StatusNotModified {
38270 if res.Body != nil {
38271 res.Body.Close()
38272 }
38273 return nil, gensupport.WrapError(&googleapi.Error{
38274 Code: res.StatusCode,
38275 Header: res.Header,
38276 })
38277 }
38278 if err != nil {
38279 return nil, err
38280 }
38281 defer googleapi.CloseBody(res)
38282 if err := googleapi.CheckResponse(res); err != nil {
38283 return nil, gensupport.WrapError(err)
38284 }
38285 ret := &UserRolesListResponse{
38286 ServerResponse: googleapi.ServerResponse{
38287 Header: res.Header,
38288 HTTPStatusCode: res.StatusCode,
38289 },
38290 }
38291 target := &ret
38292 if err := gensupport.DecodeResponse(target, res); err != nil {
38293 return nil, err
38294 }
38295 return ret, nil
38296 }
38297
38298
38299
38300
38301 func (c *UserRolesListCall) Pages(ctx context.Context, f func(*UserRolesListResponse) error) error {
38302 c.ctx_ = ctx
38303 defer c.PageToken(c.urlParams_.Get("pageToken"))
38304 for {
38305 x, err := c.Do()
38306 if err != nil {
38307 return err
38308 }
38309 if err := f(x); err != nil {
38310 return err
38311 }
38312 if x.NextPageToken == "" {
38313 return nil
38314 }
38315 c.PageToken(x.NextPageToken)
38316 }
38317 }
38318
38319 type UserRolesPatchCall struct {
38320 s *Service
38321 profileId int64
38322 userrole *UserRole
38323 urlParams_ gensupport.URLParams
38324 ctx_ context.Context
38325 header_ http.Header
38326 }
38327
38328
38329
38330
38331
38332 func (r *UserRolesService) Patch(profileId int64, id int64, userrole *UserRole) *UserRolesPatchCall {
38333 c := &UserRolesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38334 c.profileId = profileId
38335 c.urlParams_.Set("id", fmt.Sprint(id))
38336 c.userrole = userrole
38337 return c
38338 }
38339
38340
38341
38342
38343 func (c *UserRolesPatchCall) Fields(s ...googleapi.Field) *UserRolesPatchCall {
38344 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38345 return c
38346 }
38347
38348
38349 func (c *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
38350 c.ctx_ = ctx
38351 return c
38352 }
38353
38354
38355
38356 func (c *UserRolesPatchCall) Header() http.Header {
38357 if c.header_ == nil {
38358 c.header_ = make(http.Header)
38359 }
38360 return c.header_
38361 }
38362
38363 func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
38364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
38365 var body io.Reader = nil
38366 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
38367 if err != nil {
38368 return nil, err
38369 }
38370 c.urlParams_.Set("alt", alt)
38371 c.urlParams_.Set("prettyPrint", "false")
38372 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles")
38373 urls += "?" + c.urlParams_.Encode()
38374 req, err := http.NewRequest("PATCH", urls, body)
38375 if err != nil {
38376 return nil, err
38377 }
38378 req.Header = reqHeaders
38379 googleapi.Expand(req.URL, map[string]string{
38380 "profileId": strconv.FormatInt(c.profileId, 10),
38381 })
38382 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38383 }
38384
38385
38386
38387
38388
38389
38390 func (c *UserRolesPatchCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
38391 gensupport.SetOptions(c.urlParams_, opts...)
38392 res, err := c.doRequest("json")
38393 if res != nil && res.StatusCode == http.StatusNotModified {
38394 if res.Body != nil {
38395 res.Body.Close()
38396 }
38397 return nil, gensupport.WrapError(&googleapi.Error{
38398 Code: res.StatusCode,
38399 Header: res.Header,
38400 })
38401 }
38402 if err != nil {
38403 return nil, err
38404 }
38405 defer googleapi.CloseBody(res)
38406 if err := googleapi.CheckResponse(res); err != nil {
38407 return nil, gensupport.WrapError(err)
38408 }
38409 ret := &UserRole{
38410 ServerResponse: googleapi.ServerResponse{
38411 Header: res.Header,
38412 HTTPStatusCode: res.StatusCode,
38413 },
38414 }
38415 target := &ret
38416 if err := gensupport.DecodeResponse(target, res); err != nil {
38417 return nil, err
38418 }
38419 return ret, nil
38420 }
38421
38422 type UserRolesUpdateCall struct {
38423 s *Service
38424 profileId int64
38425 userrole *UserRole
38426 urlParams_ gensupport.URLParams
38427 ctx_ context.Context
38428 header_ http.Header
38429 }
38430
38431
38432
38433
38434 func (r *UserRolesService) Update(profileId int64, userrole *UserRole) *UserRolesUpdateCall {
38435 c := &UserRolesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38436 c.profileId = profileId
38437 c.userrole = userrole
38438 return c
38439 }
38440
38441
38442
38443
38444 func (c *UserRolesUpdateCall) Fields(s ...googleapi.Field) *UserRolesUpdateCall {
38445 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38446 return c
38447 }
38448
38449
38450 func (c *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
38451 c.ctx_ = ctx
38452 return c
38453 }
38454
38455
38456
38457 func (c *UserRolesUpdateCall) Header() http.Header {
38458 if c.header_ == nil {
38459 c.header_ = make(http.Header)
38460 }
38461 return c.header_
38462 }
38463
38464 func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
38465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
38466 var body io.Reader = nil
38467 body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
38468 if err != nil {
38469 return nil, err
38470 }
38471 c.urlParams_.Set("alt", alt)
38472 c.urlParams_.Set("prettyPrint", "false")
38473 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/userRoles")
38474 urls += "?" + c.urlParams_.Encode()
38475 req, err := http.NewRequest("PUT", urls, body)
38476 if err != nil {
38477 return nil, err
38478 }
38479 req.Header = reqHeaders
38480 googleapi.Expand(req.URL, map[string]string{
38481 "profileId": strconv.FormatInt(c.profileId, 10),
38482 })
38483 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38484 }
38485
38486
38487
38488
38489
38490
38491 func (c *UserRolesUpdateCall) Do(opts ...googleapi.CallOption) (*UserRole, error) {
38492 gensupport.SetOptions(c.urlParams_, opts...)
38493 res, err := c.doRequest("json")
38494 if res != nil && res.StatusCode == http.StatusNotModified {
38495 if res.Body != nil {
38496 res.Body.Close()
38497 }
38498 return nil, gensupport.WrapError(&googleapi.Error{
38499 Code: res.StatusCode,
38500 Header: res.Header,
38501 })
38502 }
38503 if err != nil {
38504 return nil, err
38505 }
38506 defer googleapi.CloseBody(res)
38507 if err := googleapi.CheckResponse(res); err != nil {
38508 return nil, gensupport.WrapError(err)
38509 }
38510 ret := &UserRole{
38511 ServerResponse: googleapi.ServerResponse{
38512 Header: res.Header,
38513 HTTPStatusCode: res.StatusCode,
38514 },
38515 }
38516 target := &ret
38517 if err := gensupport.DecodeResponse(target, res); err != nil {
38518 return nil, err
38519 }
38520 return ret, nil
38521 }
38522
38523 type VideoFormatsGetCall struct {
38524 s *Service
38525 profileId int64
38526 id int64
38527 urlParams_ gensupport.URLParams
38528 ifNoneMatch_ string
38529 ctx_ context.Context
38530 header_ http.Header
38531 }
38532
38533
38534
38535
38536
38537 func (r *VideoFormatsService) Get(profileId int64, id int64) *VideoFormatsGetCall {
38538 c := &VideoFormatsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38539 c.profileId = profileId
38540 c.id = id
38541 return c
38542 }
38543
38544
38545
38546
38547 func (c *VideoFormatsGetCall) Fields(s ...googleapi.Field) *VideoFormatsGetCall {
38548 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38549 return c
38550 }
38551
38552
38553
38554
38555 func (c *VideoFormatsGetCall) IfNoneMatch(entityTag string) *VideoFormatsGetCall {
38556 c.ifNoneMatch_ = entityTag
38557 return c
38558 }
38559
38560
38561 func (c *VideoFormatsGetCall) Context(ctx context.Context) *VideoFormatsGetCall {
38562 c.ctx_ = ctx
38563 return c
38564 }
38565
38566
38567
38568 func (c *VideoFormatsGetCall) Header() http.Header {
38569 if c.header_ == nil {
38570 c.header_ = make(http.Header)
38571 }
38572 return c.header_
38573 }
38574
38575 func (c *VideoFormatsGetCall) doRequest(alt string) (*http.Response, error) {
38576 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
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}/videoFormats/{+id}")
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 "id": strconv.FormatInt(c.id, 10),
38593 })
38594 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38595 }
38596
38597
38598
38599
38600
38601
38602 func (c *VideoFormatsGetCall) Do(opts ...googleapi.CallOption) (*VideoFormat, error) {
38603 gensupport.SetOptions(c.urlParams_, opts...)
38604 res, err := c.doRequest("json")
38605 if res != nil && res.StatusCode == http.StatusNotModified {
38606 if res.Body != nil {
38607 res.Body.Close()
38608 }
38609 return nil, gensupport.WrapError(&googleapi.Error{
38610 Code: res.StatusCode,
38611 Header: res.Header,
38612 })
38613 }
38614 if err != nil {
38615 return nil, err
38616 }
38617 defer googleapi.CloseBody(res)
38618 if err := googleapi.CheckResponse(res); err != nil {
38619 return nil, gensupport.WrapError(err)
38620 }
38621 ret := &VideoFormat{
38622 ServerResponse: googleapi.ServerResponse{
38623 Header: res.Header,
38624 HTTPStatusCode: res.StatusCode,
38625 },
38626 }
38627 target := &ret
38628 if err := gensupport.DecodeResponse(target, res); err != nil {
38629 return nil, err
38630 }
38631 return ret, nil
38632 }
38633
38634 type VideoFormatsListCall struct {
38635 s *Service
38636 profileId int64
38637 urlParams_ gensupport.URLParams
38638 ifNoneMatch_ string
38639 ctx_ context.Context
38640 header_ http.Header
38641 }
38642
38643
38644
38645
38646 func (r *VideoFormatsService) List(profileId int64) *VideoFormatsListCall {
38647 c := &VideoFormatsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38648 c.profileId = profileId
38649 return c
38650 }
38651
38652
38653
38654
38655 func (c *VideoFormatsListCall) Fields(s ...googleapi.Field) *VideoFormatsListCall {
38656 c.urlParams_.Set("fields", googleapi.CombineFields(s))
38657 return c
38658 }
38659
38660
38661
38662
38663 func (c *VideoFormatsListCall) IfNoneMatch(entityTag string) *VideoFormatsListCall {
38664 c.ifNoneMatch_ = entityTag
38665 return c
38666 }
38667
38668
38669 func (c *VideoFormatsListCall) Context(ctx context.Context) *VideoFormatsListCall {
38670 c.ctx_ = ctx
38671 return c
38672 }
38673
38674
38675
38676 func (c *VideoFormatsListCall) Header() http.Header {
38677 if c.header_ == nil {
38678 c.header_ = make(http.Header)
38679 }
38680 return c.header_
38681 }
38682
38683 func (c *VideoFormatsListCall) doRequest(alt string) (*http.Response, error) {
38684 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
38685 if c.ifNoneMatch_ != "" {
38686 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38687 }
38688 var body io.Reader = nil
38689 c.urlParams_.Set("alt", alt)
38690 c.urlParams_.Set("prettyPrint", "false")
38691 urls := googleapi.ResolveRelative(c.s.BasePath, "userprofiles/{+profileId}/videoFormats")
38692 urls += "?" + c.urlParams_.Encode()
38693 req, err := http.NewRequest("GET", urls, body)
38694 if err != nil {
38695 return nil, err
38696 }
38697 req.Header = reqHeaders
38698 googleapi.Expand(req.URL, map[string]string{
38699 "profileId": strconv.FormatInt(c.profileId, 10),
38700 })
38701 return gensupport.SendRequest(c.ctx_, c.s.client, req)
38702 }
38703
38704
38705
38706
38707
38708
38709
38710 func (c *VideoFormatsListCall) Do(opts ...googleapi.CallOption) (*VideoFormatsListResponse, error) {
38711 gensupport.SetOptions(c.urlParams_, opts...)
38712 res, err := c.doRequest("json")
38713 if res != nil && res.StatusCode == http.StatusNotModified {
38714 if res.Body != nil {
38715 res.Body.Close()
38716 }
38717 return nil, gensupport.WrapError(&googleapi.Error{
38718 Code: res.StatusCode,
38719 Header: res.Header,
38720 })
38721 }
38722 if err != nil {
38723 return nil, err
38724 }
38725 defer googleapi.CloseBody(res)
38726 if err := googleapi.CheckResponse(res); err != nil {
38727 return nil, gensupport.WrapError(err)
38728 }
38729 ret := &VideoFormatsListResponse{
38730 ServerResponse: googleapi.ServerResponse{
38731 Header: res.Header,
38732 HTTPStatusCode: res.StatusCode,
38733 },
38734 }
38735 target := &ret
38736 if err := gensupport.DecodeResponse(target, res); err != nil {
38737 return nil, err
38738 }
38739 return ret, nil
38740 }
38741
View as plain text